Class IDataSource

java.lang.Object
com.amalgamasimulation.emf.datastructure.IDataSource
Direct Known Subclasses:
EMFCSVArchive, EMFExcelFile

public abstract class IDataSource extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected List<org.eclipse.emf.ecore.EClass>
     
    protected final com.amalgamasimulation.emf.excel.EObjectsContext
     
    protected org.eclipse.emf.ecore.EClass
     
    protected List<EMFSheet<?>>
     
    protected final com.amalgamasimulation.emf.excel.EMFTransform<?>
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    IDataSource(com.amalgamasimulation.emf.excel.EMFTransform<?> transform, com.amalgamasimulation.emf.excel.EObjectsContext eObjectsContext)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addError(org.eclipse.emf.ecore.resource.Resource.Diagnostic error)
     
    protected void
    addSheetForEClass(org.eclipse.emf.ecore.EClass eClass)
     
    void
    addWarning(org.eclipse.emf.ecore.resource.Resource.Diagnostic warning)
     
    List<org.eclipse.emf.ecore.EReference>
    getContainmentReferences(org.eclipse.emf.ecore.EClass eClass)
     
    com.amalgamasimulation.emf.excel.EObjectsContext
     
    List<org.eclipse.emf.ecore.resource.Resource.Diagnostic>
     
    Set<org.eclipse.emf.ecore.EClass>
     
    org.eclipse.emf.ecore.EClass
     
     
    List<org.eclipse.emf.ecore.EClass>
    getSubTypes(org.eclipse.emf.ecore.EClass eClass)
     
    com.amalgamasimulation.emf.excel.EMFTransform<?>
     
    List<org.eclipse.emf.ecore.resource.Resource.Diagnostic>
     
    protected void
     
    protected boolean
    preRead(AtomicReference<String> currentSheetName, com.amalgamasimulation.emf.excel.TableFileContext tableFileContext)
    Calls EMFInstanceSheet.preRead() for all EMFInstanceSheets.
    void
    read(com.amalgamasimulation.emf.excel.TableFileContext tableFileContext)
     
    abstract <R extends DataStorage<?>>
    void
    write(R dataStorage)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • eObjectsContext

      protected final com.amalgamasimulation.emf.excel.EObjectsContext eObjectsContext
    • eClasses

      protected List<org.eclipse.emf.ecore.EClass> eClasses
    • transform

      protected final com.amalgamasimulation.emf.excel.EMFTransform<?> transform
    • sheets

      protected List<EMFSheet<?>> sheets
    • rootEClass

      protected org.eclipse.emf.ecore.EClass rootEClass
  • Constructor Details

    • IDataSource

      protected IDataSource(com.amalgamasimulation.emf.excel.EMFTransform<?> transform, com.amalgamasimulation.emf.excel.EObjectsContext eObjectsContext)
  • Method Details

    • write

      public abstract <R extends DataStorage<?>> void write(R dataStorage)
    • initRootEClassAndSheets

      protected void initRootEClassAndSheets()
    • addSheetForEClass

      protected void addSheetForEClass(org.eclipse.emf.ecore.EClass eClass)
    • getSubTypes

      public List<org.eclipse.emf.ecore.EClass> getSubTypes(org.eclipse.emf.ecore.EClass eClass)
    • getContainmentReferences

      public List<org.eclipse.emf.ecore.EReference> getContainmentReferences(org.eclipse.emf.ecore.EClass eClass)
    • getSheets

      public List<EMFSheet<?>> getSheets()
    • getEObjectsContext

      public com.amalgamasimulation.emf.excel.EObjectsContext getEObjectsContext()
    • getReferencedClasses

      public Set<org.eclipse.emf.ecore.EClass> getReferencedClasses()
    • getTransform

      public com.amalgamasimulation.emf.excel.EMFTransform<?> getTransform()
    • addError

      public void addError(org.eclipse.emf.ecore.resource.Resource.Diagnostic error)
    • addWarning

      public void addWarning(org.eclipse.emf.ecore.resource.Resource.Diagnostic warning)
    • getRootEClass

      public org.eclipse.emf.ecore.EClass getRootEClass()
    • preRead

      protected boolean preRead(AtomicReference<String> currentSheetName, com.amalgamasimulation.emf.excel.TableFileContext tableFileContext)
      Calls EMFInstanceSheet.preRead() for all EMFInstanceSheets.
      Parameters:
      currentSheetName - Contains the name of the current EMFInstanceSheet whose EMFInstanceSheet.preRead() method is being called. The currentSheetName must be updated in this method before each EMFInstanceSheet.preRead() call.
    • read

      public void read(com.amalgamasimulation.emf.excel.TableFileContext tableFileContext)
    • getWarnings

      public List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> getWarnings()
    • getErrors

      public List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> getErrors()