public interface IModelConverter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
OPTION_RESOURCE_VERSION_DESCRIPTOR
Deprecated.
Use
ExtendedResource.OPTION_RESOURCE_VERSION_DESCRIPTOR instead. |
Modifier and Type | Method and Description |
---|---|
void |
addExtraAttributesToSavedRootElement(org.eclipse.emf.ecore.xmi.impl.XMLString rootElement,
java.util.Map<?,?> options)
Provides a hook for adding additional attributes to the model root element during the save operation for
specified resource.
|
org.xml.sax.InputSource |
convertLoad(org.eclipse.emf.ecore.xmi.XMLResource resource,
java.io.InputStream inputStream,
java.util.Map<?,?> options)
Creates an
InputSource from given InputStream during the load operation for specified resource. |
void |
convertSave(org.eclipse.emf.ecore.xmi.impl.XMLString xml,
int flushThreshold,
org.eclipse.emf.common.util.URI uri,
java.io.OutputStream outputStream,
java.lang.String encoding,
org.eclipse.emf.ecore.xmi.XMLHelper helper,
java.util.Map<?,?> options)
During a save operation, writes to given
OutputStream with specified encoding the content of given
XMLString , using the XMLHelper . |
void |
dispose() |
IMetaModelDescriptor |
getMetaModelVersionDescriptor() |
IMetaModelDescriptor |
getResourceVersionDescriptor() |
boolean |
isLoadConverterFor(org.eclipse.emf.ecore.xmi.XMLResource resource,
java.util.Map<?,?> options)
During a load operation, returns
true if this converter applies to given XMLResource, taking into
account that the in memory meta-model defines given descriptor. |
boolean |
isSaveConverterFor(org.eclipse.emf.ecore.xmi.XMLResource resource,
java.util.Map<?,?> options)
During a save operation, returns true if this converter applies to given XMLResource.
|
@Deprecated static final java.lang.String OPTION_RESOURCE_VERSION_DESCRIPTOR
ExtendedResource.OPTION_RESOURCE_VERSION_DESCRIPTOR
instead.IMetaModelDescriptor getMetaModelVersionDescriptor()
IMetaModelDescriptor getResourceVersionDescriptor()
boolean isLoadConverterFor(org.eclipse.emf.ecore.xmi.XMLResource resource, java.util.Map<?,?> options)
true
if this converter applies to given XMLResource, taking into
account that the in memory meta-model defines given descriptor.resource
- The resource that might eventually be converted.options
- The load options.boolean isSaveConverterFor(org.eclipse.emf.ecore.xmi.XMLResource resource, java.util.Map<?,?> options)
resource
- The resource that might eventually be converted.options
- The save options.org.xml.sax.InputSource convertLoad(org.eclipse.emf.ecore.xmi.XMLResource resource, java.io.InputStream inputStream, java.util.Map<?,?> options) throws java.io.IOException
InputSource
from given InputStream
during the load operation for specified resource.resource
- The resource being loaded.inputStream
- The InputStream
being read from.options
- The load options.InputSource
that may be later processed by the parser.java.io.IOException
void convertSave(org.eclipse.emf.ecore.xmi.impl.XMLString xml, int flushThreshold, org.eclipse.emf.common.util.URI uri, java.io.OutputStream outputStream, java.lang.String encoding, org.eclipse.emf.ecore.xmi.XMLHelper helper, java.util.Map<?,?> options) throws java.io.IOException
OutputStream
with specified encoding the content of given
XMLString
, using the XMLHelper
.xml
- The XML content to be converted.flushThreshold
- The number of bytes to write before the outputStream is flushed.uri
- The URI to which the converted XML content will be written.outputStream
- The stream into which the converted XML data will be written.encoding
- The encoding to use in the outputStream.helper
- The XMLHelper.options
- The save options.java.io.IOException
PipedOutputStream
void addExtraAttributesToSavedRootElement(org.eclipse.emf.ecore.xmi.impl.XMLString rootElement, java.util.Map<?,?> options)
rootElement
- The XMLString
to write to, using doc.addAttribute.options
- The save options.XMLResource.getDefaultSaveOptions()
void dispose()