Skip to content

Package: EMFFormsSpreadsheetFileImporter

EMFFormsSpreadsheetFileImporter

nameinstructionbranchcomplexitylinemethod
static {...}
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2015 EclipseSource Muenchen GmbH and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * Eugen Neufeld - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emfforms.spi.spreadsheet.file;
15:
16: import java.io.File;
17:
18: import org.eclipse.emf.ecore.EClass;
19: import org.eclipse.emfforms.internal.spreadsheet.file.EMFFormsSpreadsheetFileImporterImpl;
20: import org.eclipse.emfforms.spi.spreadsheet.core.error.model.SpreadsheetImportResult;
21:
22: /**
23: * Entry point for triggering the import from an Spreadsheet document.
24: *
25: * @author Eugen Neufeld
26: *
27: */
28: public interface EMFFormsSpreadsheetFileImporter {
29:         /**
30:          * Singleton to get access to the importer.
31:          */
32:         EMFFormsSpreadsheetFileImporter INSTANCE = new EMFFormsSpreadsheetFileImporterImpl();
33:
34:         /**
35:          * Starts the import from an Spreadsheet document.
36:          *
37:          * @param file The File to read from.
38:          * @param eClass The {@link EClass} of the stored objects
39:          * @return The result containing the collection of all read objects and the collected errors. This may be
40:          * <code>null</code> if no workbook can be created from the file.
41:          */
42:         SpreadsheetImportResult importSpreadsheet(File file, EClass eClass);
43:
44: }