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

    Fields
    Modifier and Type
    Field
    Description
    protected String
     
    protected org.eclipse.emf.ecore.resource.Resource
     
    protected E
     

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

    resourceErrors, resourceWarnings
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    Returns the root object of the EMF data model if the file has been loaded and null otherwise.
    boolean
    Checks if the file was loaded successfully, i.e.
    boolean
    Tries to load the file.
    boolean
    load(boolean readWorkbookProperties)
    Tries to load the file.
    protected void
     

    Methods inherited from class com.amalgamasimulation.emf.csv.EMFCSVTransform

    createLoader, 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
  • Field Details

    • resource

      protected org.eclipse.emf.ecore.resource.Resource resource
    • rootObject

      protected E extends org.eclipse.emf.ecore.EObject rootObject
    • filePath

      protected String filePath
  • Constructor Details

    • EMFCSVLoader

      protected EMFCSVLoader(com.amalgamasimulation.emf.excel.EMFSetting emfSetting, String filePath)
  • Method Details

    • load

      public boolean load()
      Description copied from interface: EMFLoader
      Tries to load the file. Returns true if loading completed successfully, i.e. without errors. Note that in this case there still can be warnings.
      Specified by:
      load in interface EMFLoader<E extends org.eclipse.emf.ecore.EObject>
      Returns:
      true if loading completed successfully, false otherwise
    • removeExtensionFactory

      protected void removeExtensionFactory()
    • load

      public boolean load(boolean readWorkbookProperties)
      Description copied from interface: EMFLoader
      Tries to load the file. Returns true if loading completed successfully, i.e. without errors. Note that in this case there still can be warnings.
      Specified by:
      load in interface EMFLoader<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:
      true if loading completed successfully, false otherwise
    • getRootObject

      public E getRootObject()
      Description copied from interface: EMFLoader
      Returns the root object of the EMF data model if the file has been loaded and null otherwise.
      Specified by:
      getRootObject in interface EMFLoader<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: EMFLoader
      Checks if the file was loaded successfully, i.e. without any errors. Returns false if the file has not yet been loaded.
      Specified by:
      isLoaded in interface EMFLoader<E extends org.eclipse.emf.ecore.EObject>
      Returns:
      true if the file was loaded without any errors, false otherwise