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, rootObject

    Fields inherited from class com.amalgamasimulation.emf.excel.EMFTransform

    resourceErrors, resourceWarnings
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    EMFExcelLoaderWithEdapt(com.amalgamasimulation.emf.excel.EMFSetting emfSetting, String filePath)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.eclipse.emf.edapt.spi.history.Release
    Returns an instance of Edapt's Release object representing an actual release of the file, or null if no Edapt functionality was used for loading.
    org.eclipse.emf.edapt.spi.history.Release
    Returns the default Edapt release if it was specified by calling setDefaultRelease(int) method, or null if no default release was specified
    org.eclipse.emf.edapt.migration.execution.Migrator
     
    org.eclipse.emf.edapt.spi.history.Release
    Returns the Edapt release directly specified in the file, or null if no release is specified or it is impossible to determine the release looking at the file
    boolean
    Checks if releases (i.e.
    boolean
    Checks if any Edapt migration was applied during loading.
    boolean
    Tries to load the file and do the migration if necessary.
    boolean
    migrateAndLoad(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, setAndCheckLoadedData

    Methods inherited from class com.amalgamasimulation.emf.excel.EMFExcelTransform

    createLoader, createResourceSetInternal, createResourceSetInternal, createResourceSetInternal, createSaver

    Methods inherited from class com.amalgamasimulation.emf.excel.EMFTransform

    addClassWithIgnoredIdentifiers, addCustomTableHandler, addDistributionFlattenings, addIgnoredClass, addIgnoredStructuralFeature, addPackage, clearErrorsAndWarnings, getEmfSetting, getErrors, getErrorsAndWarnings, getWarnings, setColumnHeaderProvider, setCustomSheetName, setCustomSheetName, setCustomUniqIdOnSheet, setRootClass, setValuesConverter

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods 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

      public EMFExcelLoaderWithEdapt<E> setDefaultRelease(int defaultReleaseNumber)
    • setFilePath

      public EMFExcelLoaderWithEdapt<E> setFilePath(String filePath)
      Overrides:
      setFilePath in class com.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:
      true if there are several Edapt releases for the specified packages, false otherwise
    • getSpecifiedRelease

      public org.eclipse.emf.edapt.spi.history.Release getSpecifiedRelease()
      Returns the Edapt release directly specified in the file, or null if 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 calling setDefaultRelease(int) method, or null if 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:
      true if the migration was successful and went without errors, false otherwise
    • 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:
      true if migration and loading completed successfully, false otherwise
    • isMigrated

      public boolean isMigrated()
      Checks if any Edapt migration was applied during loading.
      Returns:
      true if some Edapt migration was applied during loading, false otherwise
    • getActualRelease

      public org.eclipse.emf.edapt.spi.history.Release getActualRelease()
      Returns an instance of Edapt's Release object representing an actual release of the file, or null if no Edapt functionality was used for loading.
      Returns:
      instance of Edapt's Release object representing an actual release of the file, or null