org.eclipse.emf.ecore.xmi
Interface XMIResource
- All Superinterfaces:
- Notifier, Resource, XMLResource
- All Known Subinterfaces:
- Ecore2XMLResource
- All Known Implementing Classes:
- Ecore2XMLResourceImpl, EMOFResourceImpl, XMIResourceImpl
- public interface XMIResource
- extends XMLResource
A resource that serializes to XMI. The serialization format is based
on the XMI 2.0 specification from the OMG. The various save and load
options in this interface enable you to tailor the XMI files that are
produced.
You may specify that the contents of the resource will be zipped by
using the setUseZip
method.
You may specify the XML encoding to be used when saving the resource
by using the setEncoding
method.
An XMIResource is capable of handling XMI files that contain IDs as
well as XMI files that use URI fragments rather than IDs. The IDs from
an XMI file are stored in the XMIResource in the idToEObjectMap
and the eObjectToIDMap
.
When saving an XMIResource, the ID of an object is saved if an object has
one. If a referenced object has an ID, it is used rather than a URI fragment.
You may clear the Maps that contain IDs if you wish to use URI fragments
rather than IDs.
An XMIResource does not create IDs for you automatically; you can set IDs
for objects yourself. However, we recommend that you use URI fragments
instead because their use reduces the size of XMI files and memory
consumption as well.
- See Also:
Resource
,
ResourceImpl
,
XMIResourceImpl
Fields inherited from interface org.eclipse.emf.ecore.xmi.XMLResource |
HREF, NIL, NO_NAMESPACE_SCHEMA_LOCATION, OPTION_ANY_SIMPLE_TYPE, OPTION_ANY_TYPE, OPTION_CONFIGURATION_CACHE, OPTION_DECLARE_XML, OPTION_DEFER_IDREF_RESOLUTION, OPTION_DISABLE_NOTIFY, OPTION_DOM_USE_NAMESPACES_IN_SCOPE, OPTION_ENCODING, OPTION_EXTENDED_META_DATA, OPTION_FLUSH_THRESHOLD, OPTION_FORMATTED, OPTION_KEEP_DEFAULT_CONTENT, OPTION_LAX_FEATURE_PROCESSING, OPTION_LINE_WIDTH, OPTION_PARSER_FEATURES, OPTION_PARSER_PROPERTIES, OPTION_PROCESS_DANGLING_HREF, OPTION_PROCESS_DANGLING_HREF_DISCARD, OPTION_PROCESS_DANGLING_HREF_RECORD, OPTION_PROCESS_DANGLING_HREF_THROW, OPTION_RECORD_ANY_TYPE_NAMESPACE_DECLARATIONS, OPTION_RECORD_UNKNOWN_FEATURE, OPTION_RESOURCE_HANDLER, OPTION_SAVE_DOCTYPE, OPTION_SAVE_TYPE_INFORMATION, OPTION_SCHEMA_LOCATION, OPTION_SCHEMA_LOCATION_IMPLEMENTATION, OPTION_SKIP_ESCAPE, OPTION_SKIP_ESCAPE_URI, OPTION_USE_CACHED_LOOKUP_TABLE, OPTION_USE_ENCODED_ATTRIBUTE_STYLE, OPTION_USE_FILE_BUFFER, OPTION_USE_LEXICAL_HANDLER, OPTION_USE_PARSER_POOL, OPTION_USE_XML_NAME_TO_FEATURE_MAP, OPTION_XML_MAP, SCHEMA_LOCATION, TYPE, XML_NS, XML_SCHEMA_URI, XSI_NS, XSI_URI |
Methods inherited from interface org.eclipse.emf.ecore.xmi.XMLResource |
getDefaultLoadOptions, getDefaultSaveOptions, getDOMHelper, getEncoding, getEObjectToExtensionMap, getEObjectToIDMap, getID, getIDToEObjectMap, getPublicId, getSystemId, load, save, setDoctypeInfo, setEncoding, setID, setUseZip, useZip |
Methods inherited from interface org.eclipse.emf.ecore.resource.Resource |
getAllContents, getContents, getEObject, getErrors, getResourceSet, getURI, getURIFragment, getWarnings, isLoaded, isModified, isTrackingModification, load, load, save, save, setModified, setTrackingModification, setURI, unload |
OPTION_USE_XMI_TYPE
public static final String OPTION_USE_XMI_TYPE
- Write the type of an element as "xmi:type" instead of "xsi:type"
which is useful for models with multiple inheritance that may
conflict with XML schema types
- See Also:
- Constant Field Values
VERSION_NAME
public static final String VERSION_NAME
- See Also:
- Constant Field Values
VERSION_VALUE
public static final String VERSION_VALUE
- See Also:
- Constant Field Values
XMI_NS
public static final String XMI_NS
- See Also:
- Constant Field Values
XMI_ID
public static final String XMI_ID
- See Also:
- Constant Field Values
XMI_TAG_NAME
public static final String XMI_TAG_NAME
- See Also:
- Constant Field Values
XMI_URI
public static final String XMI_URI
- See Also:
- Constant Field Values