Package com.amalgamasimulation.emf.json
Class EMFJSONLoader<E extends org.eclipse.emf.ecore.EObject>
java.lang.Object
com.amalgamasimulation.emf.json.EMFJSONSaverAndLoaderFactory<E>
com.amalgamasimulation.emf.json.EMFJSONLoader<E>
- All Implemented Interfaces:
EMFLoader<E>,EMFLoaderFactory<E>,EMFSaverAndLoaderFactory<E>,EMFSaverFactory<E>,ErrorsContainer
public class EMFJSONLoader<E extends org.eclipse.emf.ecore.EObject>
extends EMFJSONSaverAndLoaderFactory<E>
implements EMFLoader<E>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected org.eclipse.emf.ecore.resource.Resourceprotected EFields inherited from class com.amalgamasimulation.emf.json.EMFJSONSaverAndLoaderFactory
emfModuleModifier, ePackages, resourceErrors, resourceWarnings, simpleModuleModifier -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEMFJSONLoader(String filePath, List<org.eclipse.emf.ecore.EPackage> ePackages) -
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.Methods inherited from class com.amalgamasimulation.emf.json.EMFJSONSaverAndLoaderFactory
clearErrorsAndWarnings, createJsonResourceFactory, createLoader, createSaver, customFieldsSimpleModule, emfModule, getErrors, getWarnings, setEmfModuleModifier, setSimpleModuleModifierMethods 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
-
EMFJSONLoader
-
-
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. -
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.
-