Package com.amalgamasimulation.emf.csv
Class EMFCSVLoader<E extends org.eclipse.emf.ecore.EObject>
java.lang.Object
com.amalgamasimulation.emf.excel.EMFTransform<E>
com.amalgamasimulation.emf.csv.EMFCSVTransform<E>
com.amalgamasimulation.emf.csv.EMFCSVLoader<E>
- All Implemented Interfaces:
EMFLoader<E>,EMFLoaderFactory<E>,EMFSaverAndLoaderFactory<E>,EMFSaverFactory<E>,ErrorsContainer
- Direct Known Subclasses:
EMFPartCSVLoader
public class EMFCSVLoader<E extends org.eclipse.emf.ecore.EObject>
extends EMFCSVTransform<E>
implements EMFLoader<E>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected org.eclipse.emf.ecore.resource.Resourceprotected EFields inherited from class com.amalgamasimulation.emf.excel.EMFTransform
resourceErrors, resourceWarnings -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEMFCSVLoader(com.amalgamasimulation.emf.excel.EMFSetting emfSetting, String filePath) -
Method Summary
Modifier and TypeMethodDescriptionReturns the root object of the EMF data model if the file has been loaded andnullotherwise.booleanisLoaded()Checks if the file was loaded successfully, i.e.booleanload()Tries to load the file.booleanload(boolean readWorkbookProperties) Tries to load the file.protected voidMethods inherited from class com.amalgamasimulation.emf.csv.EMFCSVTransform
createLoader, createResourceSetInternal, createSaverMethods inherited from class com.amalgamasimulation.emf.excel.EMFTransform
addClassWithIgnoredIdentifiers, addCustomTableHandler, addDistributionFlattenings, addIgnoredClass, addIgnoredStructuralFeature, addPackage, clearErrorsAndWarnings, getEmfSetting, getErrors, getErrorsAndWarnings, getWarnings, setColumnHeaderProvider, setCustomSheetName, setCustomSheetName, setCustomUniqIdOnSheet, setRootClass, setValuesConverterMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.amalgamasimulation.emf.common.ErrorsContainer
clearErrorsAndWarnings, getErrors, getWarnings
-
Field Details
-
resource
protected org.eclipse.emf.ecore.resource.Resource resource -
rootObject
-
filePath
-
-
Constructor Details
-
EMFCSVLoader
-
-
Method Details
-
load
public boolean load()Description copied from interface:EMFLoaderTries to load the file. Returnstrueif loading completed successfully, i.e. without errors. Note that in this case there still can be warnings. -
removeExtensionFactory
protected void removeExtensionFactory() -
load
public boolean load(boolean readWorkbookProperties) Description copied from interface:EMFLoaderTries to load the file. Returnstrueif loading completed successfully, i.e. without errors. Note that in this case there still can be warnings.- Specified by:
loadin interfaceEMFLoader<E extends org.eclipse.emf.ecore.EObject>- Parameters:
readWorkbookProperties- whether or not to read custom properties of the workbook. These properties define index of first data rows and columns. Reading these properties can slow down loading big data files- Returns:
trueif loading completed successfully,falseotherwise
-
getRootObject
Description copied from interface:EMFLoaderReturns the root object of the EMF data model if the file has been loaded andnullotherwise.- Specified by:
getRootObjectin interfaceEMFLoader<E extends org.eclipse.emf.ecore.EObject>- Returns:
- root object of the EMF data model, or
null - See Also:
-
isLoaded
public boolean isLoaded()Description copied from interface:EMFLoaderChecks if the file was loaded successfully, i.e. without any errors. Returnsfalseif the file has not yet been loaded.
-