## org.eclipse.emf.importer
Class ModelImporter

    java.lang.Object
      org.eclipse.emf.converter.ModelConverter
          org.eclipse.emf.importer.ModelImporter

Direct Known Subclasses:
  EcoreImporter, JavaImporter, RoseImporter

    public abstract class ModelImporter

extends ModelConverter

Since:
  2.1.0

Nested Class Summary
`static class` `ModelImporter.EPackageImportInfo`

Nested classes/interfaces inherited from class org.eclipse.emf.converter.ModelConverter
`ModelConverter.EPackageConvertInfo, ModelConverter.ReferencedEPackageFilter, ModelConverter.ReferencedGenPackageConvertInfo`

Field Summary
`protected java.util.List<java.lang.String>` `fileExtensions`
`static java.lang.String` `GENANNOTATION_SOURCE_PREFIX`
`protected IPath` `genModelContainerPath`
`protected java.lang.String` `genModelFileName`
`protected IPath` `genModelPath`
`protected IPath` `genModelProjectLocation`
`protected java.lang.String` `modelLocation`
`protected java.util.List<URI>` `modelLocationURIs`
`protected java.lang.String` `modelPluginDirectory`
`protected java.lang.String` `modelPluginID`
`protected GenModel` `originalGenModel`
`protected IPath` `originalGenModelPath`
`protected java.lang.String` `projectName`
`protected boolean` `usePlatformURI`
`protected IWorkspaceRoot` `workspaceRoot`

Fields inherited from class org.eclipse.emf.converter.ModelConverter
`ePackages, ePackageToInfoMap, externalGenModelList, externalGenModelResourceSet, genModel, referencedEPackageFilter, referencedEPackageFilterToConvert, referencedGenPackages, referencedGenPackageToInfoMap`

Constructor Summary
`ModelImporter()`

Method Summary
`boolean` `addGenModelToResource(boolean replace)`
`void` `addToResource(EPackage ePackage, ResourceSet resourceSet)`
`protected void` `adjustEPackage(Monitor monitor, EPackage ePackage)`
`void` `adjustEPackages(Monitor monitor)`
`protected void` `adjustGenModel(Monitor monitor)`
`protected void` `adjustGenPackageDuringTraverse(GenPackage genPackage)`
`protected void` `adjustUsedGenPackages()`
`protected boolean` `canConvert(EPackage ePackage)` Returns true if the EPackage can be converted.
`Diagnostic` `checkEcoreModelFileName(java.lang.String fileName, java.lang.String packageName)`
`Diagnostic` `checkGenModelFileName()`
`java.lang.String` `computeDefaultGenModelFileName()`
`Diagnostic` `computeEPackages(Monitor monitor)`
`protected java.util.List<EPackage>` `computeEPackagesBeingReloaded()`
`IPath` `computeGenModelContainerPath(IPath projectPath)`
`protected java.lang.String` `computeModelProjectName()`
`protected java.util.List<Resource>` `computeResourcesToBeSaved()`
`protected ModelConverter.EPackageConvertInfo` `createEPackageInfo(EPackage ePackage)`
`protected ResourceSet` `createExternalGenModelResourceSet()`
`URI` `createFileURI(java.lang.String pathName)`
`protected void` `createProject(Monitor monitor, IProject project, java.util.Collection<GenModel> referencedGenModels)`
`void` `defineOriginalGenModelPath(IPath path)`
`void` `dispose()`
`protected Diagnostic` `doComputeEPackages(Monitor monitor)`
`protected java.lang.String` `getConverterGenAnnotationSource()`
`protected java.util.Map<?,?>` `getEcoreSaveOptions()`
`ModelImporter.EPackageImportInfo` `getEPackageImportInfo(EPackage ePackage)`
`java.util.List<java.lang.String>` `getFileExtensions()`
`URI` `getFirstModelLocationURI(boolean resolve)`
`GenModel` `getGenModel()`
`IPath` `getGenModelContainerPath()`
`protected IPath` `getGenModelDefaultFolderPath()`
`java.lang.String` `getGenModelFileName()`
`IPath` `getGenModelPath()`
`IPath` `getGenModelProjectLocation()`
`ResourceSet` `getGenModelResourceSet()`
`protected GenPackage` `getGenPackage(EPackage ePackage)`
`java.lang.String` `getModelLocation()`
`java.util.List<URI>` `getModelLocationURIs()`
`java.lang.String` `getModelPluginDirectory()`
`java.lang.String` `getModelPluginID()`
`java.lang.String` `getModelProjectName()`
`GenModel` `getOriginalGenModel()`
`IPath` `getOriginalGenModelPath()`
`protected IWorkspaceRoot` `getWorkspaceRoot()`
`protected void` `handleOriginalGenModel()` Subclasses may overwrite this method to perform actions on the reloaded genmodel.
`protected void` `loadOriginalGenModel(URI genModelURI)`
`protected URI` `makeAbsolute(URI uri, URI relativeTo)`
`protected URI` `makeRelative(URI uri, URI relativeTo)`
`void` `prepareGenModelAndEPackages(Monitor monitor)`
`protected void` `presetEPackagesToGenerate()`
`void` `saveGenModelAndEPackages(Monitor monitor)`
`void` `setGenModelContainerPath(IPath path)`
`void` `setGenModelFileName(java.lang.String name)`
`void` `setGenModelProjectLocation(IPath genModelProjectLocation)`
`void` `setModelFile(IFile file)`
`void` `setModelLocation(java.lang.String location)`
`void` `setModelPluginDirectory(java.lang.String modelPluginDirectory)`
`void` `setModelPluginID(java.lang.String modelPluginID)`
`void` `setModelProjectName(java.lang.String projectName)`
`void` `setUsePlatformURI(boolean usePlatformURI)`
`void` `traverseGenPackages(java.util.List<GenPackage> genPackages)`
`boolean` `usePlatformURI()`

Methods inherited from class org.eclipse.emf.converter.ModelConverter

`clearEPackageConvertInfoCache, clearEPackagesCollections, clearReferenceGenPackageConvertInfoCache, computeEPackagesToConvert, computeValidReferencedGenPackages, createEPackagesList, createGenPackageConvertInfo, createReferencedEPackageFilter, createReferencedEPackageFilterToConvert, createReferencedGenPackagesList, createResourceSet, filterReferencedEPackages, filterReferencedEPackagesToConvert, getEPackageConvertInfo, getEPackages, getEPackageToInfoMap, getExternalGenModels, getGenmodelSaveOptions, getGenModelSaveOptions, getID, getReferencedGenPackages, getReferencedGenPackageToInfoMap, getReferenceGenPackageConvertInfo, getReferredEPackage, makeEPackageConvertDataUnique`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### GENANNOTATION_SOURCE_PREFIX

    public static final java.lang.String GENANNOTATION_SOURCE_PREFIX

See Also:
  Constant Field Values

### fileExtensions

    protected java.util.List<java.lang.String> fileExtensions

### originalGenModelPath

    protected IPath originalGenModelPath

### originalGenModel

    protected GenModel originalGenModel

### genModelProjectLocation

    protected IPath genModelProjectLocation

### genModelContainerPath

    protected IPath genModelContainerPath

### genModelFileName

    protected java.lang.String genModelFileName

### genModelPath

    protected IPath genModelPath

### modelLocationURIs

    protected java.util.List<URI> modelLocationURIs

### modelLocation

    protected java.lang.String modelLocation

### modelPluginID

    protected java.lang.String modelPluginID

### modelPluginDirectory

    protected java.lang.String modelPluginDirectory

### projectName

    protected java.lang.String projectName

### usePlatformURI

    protected boolean usePlatformURI

### workspaceRoot

    protected IWorkspaceRoot workspaceRoot

Constructor Detail

### ModelImporter

    public ModelImporter()

Method Detail

### dispose

    public void dispose()

  Overrides:
    `dispose` in class `ModelConverter`

### getConverterGenAnnotationSource

    protected java.lang.String getConverterGenAnnotationSource()

  Overrides:
    `getConverterGenAnnotationSource` in class `ModelConverter`

### getFileExtensions

    public java.util.List<java.lang.String> getFileExtensions()

### usePlatformURI

    public boolean usePlatformURI()

### setUsePlatformURI

    public void setUsePlatformURI(boolean usePlatformURI)

### defineOriginalGenModelPath

    public void defineOriginalGenModelPath(IPath path)
                                    throws DiagnosticException

  Throws:
    `DiagnosticException`

### getOriginalGenModelPath

    public IPath getOriginalGenModelPath()

### computeEPackagesBeingReloaded

    protected java.util.List<EPackage> computeEPackagesBeingReloaded()

### setGenModelFileName

    public void setGenModelFileName(java.lang.String name)

### getGenModelFileName

    public java.lang.String getGenModelFileName()

### computeDefaultGenModelFileName

    public java.lang.String computeDefaultGenModelFileName()

### checkGenModelFileName

    public Diagnostic checkGenModelFileName()

### checkEcoreModelFileName

    public Diagnostic checkEcoreModelFileName(java.lang.String fileName,
                                              java.lang.String packageName)

### setGenModelProjectLocation

    public void setGenModelProjectLocation(IPath genModelProjectLocation)

### getGenModelProjectLocation

    public IPath getGenModelProjectLocation()

### setGenModelContainerPath

    public void setGenModelContainerPath(IPath path)

### getGenModelContainerPath

    public IPath getGenModelContainerPath()

### computeGenModelContainerPath

    public IPath computeGenModelContainerPath(IPath projectPath)

### getGenModelDefaultFolderPath

    protected IPath getGenModelDefaultFolderPath()

### getGenModelPath

    public IPath getGenModelPath()

### getGenModel

    public GenModel getGenModel()

  Overrides:
    `getGenModel` in class `ModelConverter`

### addGenModelToResource

    public boolean addGenModelToResource(boolean replace)

### getGenModelResourceSet

    public ResourceSet getGenModelResourceSet()

### getOriginalGenModel

    public GenModel getOriginalGenModel()

### getEPackageImportInfo

    public ModelImporter.EPackageImportInfo getEPackageImportInfo(EPackage ePackage)

### createEPackageInfo

    protected ModelConverter.EPackageConvertInfo createEPackageInfo(EPackage ePackage)

  Overrides:
    `createEPackageInfo` in class `ModelConverter`

### getGenPackage

    protected GenPackage getGenPackage(EPackage ePackage)

### setModelLocation

    public void setModelLocation(java.lang.String location)

### getModelLocation

    public java.lang.String getModelLocation()

### getModelLocationURIs

    public java.util.List<URI> getModelLocationURIs()

### getFirstModelLocationURI

    public URI getFirstModelLocationURI(boolean resolve)

### setModelFile

    public void setModelFile(IFile file)

### createExternalGenModelResourceSet

    protected ResourceSet createExternalGenModelResourceSet()

  Overrides:
    `createExternalGenModelResourceSet` in class `ModelConverter`

### loadOriginalGenModel

    protected void loadOriginalGenModel(URI genModelURI)
                                 throws DiagnosticException

  Throws:
    `DiagnosticException`

### handleOriginalGenModel

    protected void handleOriginalGenModel()
                                   throws DiagnosticException

  Subclasses may overwrite this method to perform actions on the reloaded genmodel.

  Throws:
    `DiagnosticException`

### computeEPackages

    public Diagnostic computeEPackages(Monitor monitor)
                                throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### presetEPackagesToGenerate

    protected void presetEPackagesToGenerate()

### doComputeEPackages

    protected Diagnostic doComputeEPackages(Monitor monitor)
                                     throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### adjustEPackages

    public void adjustEPackages(Monitor monitor)

### adjustEPackage

    protected void adjustEPackage(Monitor monitor,
                                  EPackage ePackage)

### getWorkspaceRoot

    protected IWorkspaceRoot getWorkspaceRoot()

### prepareGenModelAndEPackages

    public void prepareGenModelAndEPackages(Monitor monitor)

### addToResource

    public void addToResource(EPackage ePackage,
                              ResourceSet resourceSet)

### saveGenModelAndEPackages

    public void saveGenModelAndEPackages(Monitor monitor)
                                  throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### computeResourcesToBeSaved

    protected java.util.List<Resource> computeResourcesToBeSaved()

### createProject

    protected void createProject(Monitor monitor,
                                 IProject project,
                                 java.util.Collection<GenModel> referencedGenModels)

### adjustGenModel

    protected void adjustGenModel(Monitor monitor)

### adjustUsedGenPackages

    protected void adjustUsedGenPackages()

### canConvert

    protected boolean canConvert(EPackage ePackage)

  Description copied from class: `ModelConverter`
  Returns true if the EPackage can be converted. This method doesn't check for dependencies or anything, being focused in testing whether all the required information to generate an EPackage was gathered.

  Overrides:
    `canConvert` in class `ModelConverter`

### traverseGenPackages

    public void traverseGenPackages(java.util.List<GenPackage> genPackages)

### adjustGenPackageDuringTraverse

    protected void adjustGenPackageDuringTraverse(GenPackage genPackage)

### makeRelative

    protected URI makeRelative(URI uri,
                               URI relativeTo)

### makeAbsolute

    protected URI makeAbsolute(URI uri,
                               URI relativeTo)

### createFileURI

    public URI createFileURI(java.lang.String pathName)

### getModelPluginID

    public java.lang.String getModelPluginID()

### setModelPluginID

    public void setModelPluginID(java.lang.String modelPluginID)

### getModelPluginDirectory

    public java.lang.String getModelPluginDirectory()

### setModelPluginDirectory

    public void setModelPluginDirectory(java.lang.String modelPluginDirectory)

### setModelProjectName

    public void setModelProjectName(java.lang.String projectName)

### getModelProjectName

    public java.lang.String getModelProjectName()

### computeModelProjectName

    protected java.lang.String computeModelProjectName()

### getEcoreSaveOptions

    protected java.util.Map<?,?> getEcoreSaveOptions()

Copyright 2001-2006 IBM Corporation and others. All Rights Reserved.