|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.converter.ModelConverter
org.eclipse.emf.exporter.ModelExporter
public abstract class ModelExporter
Nested Class Summary | |
---|---|
static class |
ModelExporter.EPackageExportInfo
|
static class |
ModelExporter.ExportData
|
protected static class |
ModelExporter.GenPackagesTreeIterator
|
static class |
ModelExporter.ReferencedGenPackageExportInfo
|
Nested classes/interfaces inherited from class org.eclipse.emf.converter.ModelConverter |
---|
ModelConverter.EPackageConvertInfo, ModelConverter.ReferencedEPackageFilter, ModelConverter.ReferencedGenPackageConvertInfo |
Field Summary | |
---|---|
protected URI |
directoryURI
|
protected java.util.Map<EPackage,GenPackage> |
ePackageToGenPackageMap
|
static java.lang.String |
GENANNOTATION_KEY_DIRECTORY_URI
|
static java.lang.String |
GENANNOTATION_SOURCE_PREFIX
|
static java.lang.String |
GENANNOTATION_SOURCE_SELECTED_EPACKAGES
|
static java.lang.String |
GENANNOTATION_SOURCE_SELECTED_REFERENCES
|
protected java.util.Map<GenBase,EMap<java.lang.String,java.lang.String>> |
genBaseToDetailsMap
|
protected boolean |
saveEPackageArtifactURI
|
protected boolean |
saveExporter
|
Fields inherited from class org.eclipse.emf.converter.ModelConverter |
---|
ePackages, ePackageToInfoMap, externalGenModelList, externalGenModelResourceSet, genModel, referencedEPackageFilter, referencedEPackageFilterToConvert, referencedGenPackages, referencedGenPackageToInfoMap |
Constructor Summary | |
---|---|
ModelExporter()
|
Method Summary | |
---|---|
protected void |
adjustGenModel()
|
protected boolean |
canConvert(EPackage ePackage)
Returns true if the EPackage can be converted. |
Diagnostic |
checkEPackageArtifactLocation(java.lang.String location,
java.lang.String packageName)
|
protected URI |
computeArtifactURI(java.lang.String location)
Returns the artifact URI for a given artifact location. |
protected URI |
createEncodedURI(java.lang.String location)
|
protected ModelConverter.EPackageConvertInfo |
createEPackageInfo(EPackage ePackage)
|
protected java.util.List<EPackage> |
createEPackagesList()
|
protected ModelConverter.ReferencedGenPackageConvertInfo |
createGenPackageConvertInfo(GenPackage genPackage)
|
protected ModelConverter.ReferencedEPackageFilter |
createReferencedEPackageFilterToConvert()
|
protected java.util.List<GenPackage> |
createReferencedGenPackagesList()
|
void |
dispose()
|
protected java.lang.String |
doCheckEPackageArtifactLocation(java.lang.String location,
java.lang.String packageName)
|
protected Diagnostic |
doExport(Monitor monitor,
ModelExporter.ExportData exportData)
Subclasses should overwrite this method, adding the code that performs the actions required to export the model. |
Diagnostic |
export(Monitor monitor)
Creates the ModelExporter.ExportData instance and delegates the export work to
the doExport(Monitor, ModelExporter.ExportData) method. |
java.util.List<URI> |
getArtifactURIs(GenPackage genPackage)
|
protected java.lang.String |
getConverterGenAnnotationSource()
|
protected java.lang.String |
getDefaultArtifactFileName(EPackage ePackage)
|
protected java.lang.String |
getDefaultArtifactLocation(EPackage ePackage)
|
URI |
getDirectoryURI()
|
ModelExporter.EPackageExportInfo |
getEPackageExportInfo(EPackage ePackage)
|
protected java.util.Map<EPackage,GenPackage> |
getEPackageToGenPackageMap()
|
protected EMap<java.lang.String,java.lang.String> |
getExporterGenAnnotationDetails(GenBase genBase)
Returns the GenBase object's GenAnnotation Details map
associated with this Model Exporter or ECollections.EMPTY_EMAP |
protected EMap<java.lang.String,java.lang.String> |
getExporterNestedGenAnnotationDetails(GenBase genBase,
java.lang.String nestedGenAnnotationSource)
|
protected java.util.List<GenAnnotation> |
getExporterNestedGenAnnotations(GenBase genBase)
|
protected java.util.Map<GenBase,EMap<java.lang.String,java.lang.String>> |
getGenBaseToGenAnnotationDetailsMap()
|
ModelExporter.ReferencedGenPackageExportInfo |
getReferencedGenPackageExportInfo(GenPackage genPackage)
|
boolean |
isSaveEPackageArtifactURI()
|
boolean |
isSaveExporter()
|
protected boolean |
isValidEPackage(GenPackage genPackage)
Returns whether the EPackage associated with the specified GenPackage should be added to the ePackage list. |
protected boolean |
isValidReferencedGenPackage(GenPackage genPackage)
Returns whether the specified GenPackage should be added to the referenced GenPackage list. |
void |
loadGenModel(URI uri)
|
protected void |
printExportData(ModelExporter.ExportData exportData)
|
void |
save()
Saves this exporters settings in the selected GenModel. |
protected boolean |
saveEPackageArtifactURI()
Saves the exported artifact URI as annotations on the respective GenPackage. |
protected boolean |
saveExporter()
Saves this exporter settings. |
void |
setDirectoryURI(java.lang.String location)
|
void |
setDirectoryURI(URI directoryURI)
|
void |
setGenModel(GenModel genModel)
|
void |
setSaveEPackageArtifactURI(boolean saveEPackageArtifactURI)
|
void |
setSaveExporter(boolean saveExporter)
|
Diagnostic |
validateDirectoryURI(java.lang.String uri)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String GENANNOTATION_SOURCE_PREFIX
public static final java.lang.String GENANNOTATION_KEY_DIRECTORY_URI
public static final java.lang.String GENANNOTATION_SOURCE_SELECTED_EPACKAGES
public static final java.lang.String GENANNOTATION_SOURCE_SELECTED_REFERENCES
protected java.util.Map<EPackage,GenPackage> ePackageToGenPackageMap
protected URI directoryURI
protected java.util.Map<GenBase,EMap<java.lang.String,java.lang.String>> genBaseToDetailsMap
protected boolean saveExporter
protected boolean saveEPackageArtifactURI
Constructor Detail |
---|
public ModelExporter()
Method Detail |
---|
public void dispose()
dispose
in class ModelConverter
protected java.lang.String getConverterGenAnnotationSource()
getConverterGenAnnotationSource
in class ModelConverter
protected java.util.Map<EPackage,GenPackage> getEPackageToGenPackageMap()
protected java.util.Map<GenBase,EMap<java.lang.String,java.lang.String>> getGenBaseToGenAnnotationDetailsMap()
protected EMap<java.lang.String,java.lang.String> getExporterGenAnnotationDetails(GenBase genBase)
GenBase
object's GenAnnotation
Details map
associated with this Model Exporter or ECollections.EMPTY_EMAP
protected java.util.List<GenAnnotation> getExporterNestedGenAnnotations(GenBase genBase)
protected EMap<java.lang.String,java.lang.String> getExporterNestedGenAnnotationDetails(GenBase genBase, java.lang.String nestedGenAnnotationSource)
public java.util.List<URI> getArtifactURIs(GenPackage genPackage)
public void setGenModel(GenModel genModel) throws DiagnosticException
DiagnosticException
protected void adjustGenModel()
protected java.lang.String getDefaultArtifactLocation(EPackage ePackage)
protected boolean isValidEPackage(GenPackage genPackage)
protected boolean isValidReferencedGenPackage(GenPackage genPackage)
protected java.util.List<EPackage> createEPackagesList()
createEPackagesList
in class ModelConverter
protected java.util.List<GenPackage> createReferencedGenPackagesList()
createReferencedGenPackagesList
in class ModelConverter
public void loadGenModel(URI uri) throws DiagnosticException
DiagnosticException
public ModelExporter.EPackageExportInfo getEPackageExportInfo(EPackage ePackage)
protected ModelConverter.EPackageConvertInfo createEPackageInfo(EPackage ePackage)
createEPackageInfo
in class ModelConverter
public ModelExporter.ReferencedGenPackageExportInfo getReferencedGenPackageExportInfo(GenPackage genPackage)
protected ModelConverter.ReferencedGenPackageConvertInfo createGenPackageConvertInfo(GenPackage genPackage)
createGenPackageConvertInfo
in class ModelConverter
protected ModelConverter.ReferencedEPackageFilter createReferencedEPackageFilterToConvert()
createReferencedEPackageFilterToConvert
in class ModelConverter
protected boolean canConvert(EPackage ePackage)
ModelConverter
canConvert
in class ModelConverter
public Diagnostic export(Monitor monitor) throws java.lang.Exception
Creates the ModelExporter.ExportData
instance and delegates the export work to
the doExport(Monitor, ModelExporter.ExportData)
method.
The Diagnostic
returned by this method should be used to provide
the user some information regarding a successful export. If the
export fails, an exception should be thrown.
monitor
-
Diagnostic
java.lang.Exception
protected Diagnostic doExport(Monitor monitor, ModelExporter.ExportData exportData) throws java.lang.Exception
Subclasses should overwrite this method, adding the code that performs the actions required to export the model.
The Diagnostic
returned by this method should be used to provide
the user some information regarding a successfull export. If the
export fails, an exception should be thrown.
monitor
-
Diagnostic
java.lang.Exception
public Diagnostic checkEPackageArtifactLocation(java.lang.String location, java.lang.String packageName)
protected java.lang.String doCheckEPackageArtifactLocation(java.lang.String location, java.lang.String packageName)
public URI getDirectoryURI()
public void setDirectoryURI(URI directoryURI)
public void setDirectoryURI(java.lang.String location)
protected URI computeArtifactURI(java.lang.String location)
protected URI createEncodedURI(java.lang.String location)
public Diagnostic validateDirectoryURI(java.lang.String uri)
public boolean isSaveEPackageArtifactURI()
public void setSaveEPackageArtifactURI(boolean saveEPackageArtifactURI)
public boolean isSaveExporter()
public void setSaveExporter(boolean saveExporter)
public void save() throws java.lang.Exception
java.lang.Exception
protected boolean saveExporter()
protected boolean saveEPackageArtifactURI()
protected java.lang.String getDefaultArtifactFileName(EPackage ePackage)
protected void printExportData(ModelExporter.ExportData exportData)
|
Copyright 2001-2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |