Class AbstractEMFImporter<E>

java.lang.Object
io.lionweb.lioncore.java.emf.AbstractEMFImporter<E>
Type Parameters:
E - kind of imported element
Direct Known Subclasses:
EMFMetamodelImporter, EMFModelImporter

public abstract class AbstractEMFImporter<E> extends Object
Importer that given an EMF Resource imports something out of it.
  • Field Details

  • Constructor Details

    • AbstractEMFImporter

      public AbstractEMFImporter()
    • AbstractEMFImporter

      public AbstractEMFImporter(ConceptsToEClassesMapping conceptsToEClassesMapping)
  • Method Details

    • importFile

      public List<E> importFile(File emfFile)
      Import the file. The resource type is derived from the extension.
    • importInputStream

      public List<E> importInputStream(InputStream inputStream, Consumer<org.eclipse.emf.ecore.EPackage.Registry> packageRegistryInit) throws IOException
      Load the resource from the given InputStream. The Resource is considered to be of type Ecore.
      Throws:
      IOException
    • importInputStream

      public List<E> importInputStream(InputStream inputStream) throws IOException
      Load the resource from the given InputStream. The Resource is considered to be of type Ecore.
      Throws:
      IOException
    • importInputStream

      public List<E> importInputStream(InputStream inputStream, ResourceType resourceType) throws IOException
      Throws:
      IOException
    • importInputStream

      public List<E> importInputStream(InputStream inputStream, ResourceType resourceType, Consumer<org.eclipse.emf.ecore.EPackage.Registry> packageRegistryInit) throws IOException
      Import a given resource as a list of elements.
      Throws:
      IOException
    • importResource

      public abstract List<E> importResource(org.eclipse.emf.ecore.resource.Resource resource)