Class EMFExcelLoaderWithEdapt<E extends org.eclipse.emf.ecore.EObject>
java.lang.Object
com.amalgamasimulation.emf.excel.EMFTransform<E>
com.amalgamasimulation.emf.excel.EMFExcelTransform<E>
com.amalgamasimulation.emf.excel.EMFExcelLoader<E>
com.amalgamasimulation.emf.excel.edapt.EMFExcelLoaderWithEdapt<E>
- All Implemented Interfaces:
EMFLoader<E>,EMFLoaderFactory<E>,EMFSaverAndLoaderFactory<E>,EMFSaverFactory<E>,ErrorsContainer
public class EMFExcelLoaderWithEdapt<E extends org.eclipse.emf.ecore.EObject>
extends com.amalgamasimulation.emf.excel.EMFExcelLoader<E>
-
Field Summary
Fields inherited from class com.amalgamasimulation.emf.excel.EMFExcelLoader
filePath, resource, rootObjectFields inherited from class com.amalgamasimulation.emf.excel.EMFTransform
resourceErrors, resourceWarnings -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEMFExcelLoaderWithEdapt(com.amalgamasimulation.emf.excel.EMFSetting emfSetting, String filePath) -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.emf.edapt.spi.history.ReleaseReturns an instance of Edapt'sReleaseobject representing an actual release of the file, ornullif no Edapt functionality was used for loading.org.eclipse.emf.edapt.spi.history.ReleaseReturns the default Edapt release if it was specified by callingsetDefaultRelease(int)method, ornullif no default release was specifiedorg.eclipse.emf.edapt.migration.execution.Migratororg.eclipse.emf.edapt.spi.history.ReleaseReturns the Edapt release directly specified in the file, ornullif no release is specified or it is impossible to determine the release looking at the filebooleanChecks if releases (i.e.booleanChecks if any Edapt migration was applied during loading.booleanTries to load the file and do the migration if necessary.booleanmigrateAndLoad(org.eclipse.emf.edapt.spi.history.Release previousRelease) Tries to migrate the file from the specified previous release and load the resource.setDefaultRelease(int defaultReleaseNumber) setFilePath(String filePath) Methods inherited from class com.amalgamasimulation.emf.excel.EMFExcelLoader
getRootObject, isLoaded, load, load, setAndCheckLoadedDataMethods inherited from class com.amalgamasimulation.emf.excel.EMFExcelTransform
createLoader, createResourceSetInternal, createResourceSetInternal, 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
-
Constructor Details
-
EMFExcelLoaderWithEdapt
protected EMFExcelLoaderWithEdapt(com.amalgamasimulation.emf.excel.EMFSetting emfSetting, String filePath)
-
-
Method Details
-
setDefaultRelease
-
setFilePath
- Overrides:
setFilePathin classcom.amalgamasimulation.emf.excel.EMFExcelLoader<E extends org.eclipse.emf.ecore.EObject>
-
getMigrator
public org.eclipse.emf.edapt.migration.execution.Migrator getMigrator() -
hasSeveralReleases
public boolean hasSeveralReleases()Checks if releases (i.e. Edapt functionality) are enabled for the specified packages and there are at least 2 releases so that it makes sense to check if migration is possible- Returns:
trueif there are several Edapt releases for the specified packages,falseotherwise
-
getSpecifiedRelease
public org.eclipse.emf.edapt.spi.history.Release getSpecifiedRelease()Returns the Edapt release directly specified in the file, ornullif no release is specified or it is impossible to determine the release looking at the file- Returns:
- Edapt release or
null
-
getDefaultRelease
public org.eclipse.emf.edapt.spi.history.Release getDefaultRelease()Returns the default Edapt release if it was specified by callingsetDefaultRelease(int)method, ornullif no default release was specified- Returns:
- Default Edapt release, or
null
-
migrateAndLoad
public boolean migrateAndLoad(org.eclipse.emf.edapt.spi.history.Release previousRelease) Tries to migrate the file from the specified previous release and load the resource. If the specified release is the latest one, simply loads the resource- Parameters:
previousRelease-- Returns:
trueif the migration was successful and went without errors,falseotherwise
-
migrateAndLoad
public boolean migrateAndLoad()Tries to load the file and do the migration if necessary. If the release is specified explicitly in the file, then tries to migrate from the specified release. Otherwise, if the default release is specified, tries to migrate from the default release. If no default release is specified or migration from the specified release completed unsuccessfully, tries to migrate from all known releases starting from the latest one.- Returns:
trueif migration and loading completed successfully,falseotherwise
-
isMigrated
public boolean isMigrated()Checks if any Edapt migration was applied during loading.- Returns:
trueif some Edapt migration was applied during loading,falseotherwise
-
getActualRelease
public org.eclipse.emf.edapt.spi.history.Release getActualRelease()Returns an instance of Edapt'sReleaseobject representing an actual release of the file, ornullif no Edapt functionality was used for loading.- Returns:
- instance of Edapt's
Releaseobject representing an actual release of the file, ornull
-