Skip to content

Package: EMFFormsSpreadsheetImporter

EMFFormsSpreadsheetImporter

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

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.core.transfer;
15:
16: import org.apache.poi.ss.usermodel.Workbook;
17: import org.eclipse.emf.ecore.EClass;
18: import org.eclipse.emfforms.internal.spreadsheet.core.transfer.EMFFormsSpreadsheetImporterImpl;
19: import org.eclipse.emfforms.spi.spreadsheet.core.error.model.SpreadsheetImportResult;
20:
21: /**
22: * Entry point for triggering the import from an Spreadsheet document.
23: *
24: * @author Eugen Neufeld
25: *
26: */
27: public interface EMFFormsSpreadsheetImporter {
28:         /**
29:          * Singleton to get access to the importer.
30:          */
31:         EMFFormsSpreadsheetImporter INSTANCE = new EMFFormsSpreadsheetImporterImpl();
32:
33:         /**
34:          * Starts the import from an Spreadsheet document.
35:          *
36:          * @param workbook The Workbook to read from.
37:          * @param eClass The {@link EClass} of the stored objects
38:          * @return The result containing the collection of all read objects and the collected errors.
39:          */
40:         SpreadsheetImportResult importSpreadsheet(Workbook workbook, EClass eClass);
41:
42: }