|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
Resource
,
ResourceImpl
,
XMIResourceImpl
Nested Class Summary |
Nested classes inherited from class org.eclipse.emf.ecore.xmi.XMLResource |
XMLResource.ResourceHandler, XMLResource.XMLInfo, XMLResource.XMLMap |
Nested classes inherited from class org.eclipse.emf.ecore.resource.Resource |
Resource.Diagnostic, Resource.Factory, Resource.Internal, Resource.IOWrappedException |
Field Summary | |
static 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 |
static String |
VERSION_NAME
|
static String |
VERSION_VALUE
|
static String |
XMI_ID
|
static String |
XMI_NAMESPACE_PREFIX
|
static String |
XMI_NS
|
static String |
XMI_TAG_NAME
|
static String |
XMI_URI
|
Fields inherited from interface org.eclipse.emf.ecore.resource.Resource |
OPTION_CIPHER, OPTION_ZIP, RESOURCE__CONTENTS, RESOURCE__ERRORS, RESOURCE__IS_LOADED, RESOURCE__IS_MODIFIED, RESOURCE__IS_TRACKING_MODIFICATION, RESOURCE__RESOURCE_SET, RESOURCE__URI, RESOURCE__WARNINGS |
Method Summary | |
String |
getXMINamespace()
|
String |
getXMIVersion()
|
void |
setXMINamespace(String namespace)
Sets XMI namespace and automatically assigns corresponding version |
void |
setXMIVersion(String version)
Sets XMI version and automatically assigns corresponding namespace |
Methods inherited from interface org.eclipse.emf.ecore.xmi.XMLResource |
getDefaultLoadOptions, getDefaultSaveOptions, getDOMHelper, getEncoding, getEObjectToExtensionMap, getEObjectToIDMap, getID, getIDToEObjectMap, getPublicId, getSystemId, getXMLVersion, load, load, save, save, setDoctypeInfo, setEncoding, setID, setUseZip, setXMLVersion, 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 |
Methods inherited from interface org.eclipse.emf.common.notify.Notifier |
eAdapters, eDeliver, eNotify, eSetDeliver |
Field Detail |
public static final String OPTION_USE_XMI_TYPE
public static final String VERSION_NAME
public static final String VERSION_VALUE
public static final String XMI_NAMESPACE_PREFIX
public static final String XMI_NS
public static final String XMI_ID
public static final String XMI_TAG_NAME
public static final String XMI_URI
Method Detail |
public String getXMIVersion()
public void setXMIVersion(String version)
version
- public String getXMINamespace()
public void setXMINamespace(String namespace)
namespace
-
|
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 |