Class BaseSingleEmfResourceObjectImporter

    • Constructor Detail

      • BaseSingleEmfResourceObjectImporter

        protected BaseSingleEmfResourceObjectImporter​(IResourceContentImporter.IMergeStrategy mergeStrategy,
                                                      IQualifiedNameFilePathConverter qualifiedNameFilePathConverter,
                                                      ISymbolicNameService symbolicNameService,
                                                      IRuntimeVersionSupport runtimeVersionSupport,
                                                      IResourceContentImporterExtensionManager resourceContentImporterExtensionManager)
        Constructs a new instance.
        Parameters:
        mergeStrategy - the merge strategy to use, may not be null.
        qualifiedNameFilePathConverter - the qualified name file path converter to use, may not be null.
        symbolicNameService - the symbolic name service to use, may not be null.
        runtimeVersionSupport - the runtime version support to use, may not be null.
        resourceContentImporterExtensionManager - the import extensions manager, may not be null.
    • Method Detail

      • getLoadOptions

        protected Map<Object,​Object> getLoadOptions​(org.eclipse.emf.ecore.resource.Resource resource)
        Subclasses override this method to provide custom resource load options. The default implementation always returns null.
        Parameters:
        resource - The resource to provide load options for. May not be null.
        Returns:
        the load options. May be null.
      • resolveExternalReferencesDuringImport

        protected boolean resolveExternalReferencesDuringImport()
        Subclasses override this method to configure external reference resolving during the import of original XML document.
        Returns:
        true if the external refererences need to be resolved during the import, false otherwise.
      • doImportContent

        protected final void doImportContent​(IBmEngine engine,
                                             IBmTransaction transaction,
                                             IDtProject project,
                                             org.eclipse.core.runtime.IPath objectPath,
                                             IResourceAccessor resourceAccessor,
                                             boolean fullOverride)
        Description copied from class: BaseSingleResourceObjectImporter
        Subclasses implement this method to provide import logics.
        Specified by:
        doImportContent in class BaseSingleResourceObjectImporter
        Parameters:
        engine - The BM engine to import the object into. May not be null.
        transaction - The BM transaction to import the object within. May not be null.
        project - The project the object belongs to. May not be null.
        objectPath - The resource path to import the object from. May not be null.
        resourceAccessor - The accessor to use to obtain the resource content etc. May not be null.
        fullOverride - The flag indicating that the full override strategy rather than merge must be used in case the object already exists.