|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XMIResource
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 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/interfaces inherited from interface org.eclipse.emf.ecore.xmi.XMLResource |
---|
XMLResource.ElementHandler, XMLResource.ResourceEntityHandler, XMLResource.ResourceHandler, XMLResource.URIHandler, XMLResource.XMLInfo, XMLResource.XMLMap |
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.resource.Resource |
---|
Resource.Diagnostic, Resource.Factory, Resource.Internal, Resource.IOWrappedException |
Field Summary | |
---|---|
static java.lang.String |
OPTION_SUPPRESS_XMI
A save or load option that when set to true, instructs the resource to produce regular XML, not XMI, or to consume, regular XML, not XMI. |
static java.lang.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 java.lang.String |
VERSION_NAME
|
static java.lang.String |
VERSION_VALUE
|
static java.lang.String |
XMI_ID
|
static java.lang.String |
XMI_NAMESPACE_PREFIX
|
static java.lang.String |
XMI_NS
|
static java.lang.String |
XMI_TAG_NAME
|
static java.lang.String |
XMI_URI
|
Fields inherited from interface org.eclipse.emf.ecore.resource.Resource |
---|
OPTION_CIPHER, OPTION_SAVE_ONLY_IF_CHANGED, OPTION_SAVE_ONLY_IF_CHANGED_FILE_BUFFER, OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER, OPTION_ZIP, RESOURCE__CONTENTS, RESOURCE__ERRORS, RESOURCE__IS_LOADED, RESOURCE__IS_MODIFIED, RESOURCE__IS_TRACKING_MODIFICATION, RESOURCE__RESOURCE_SET, RESOURCE__TIME_STAMP, RESOURCE__URI, RESOURCE__WARNINGS |
Method Summary | |
---|---|
java.lang.String |
getXMINamespace()
|
java.lang.String |
getXMIVersion()
|
void |
setXMINamespace(java.lang.String namespace)
Sets XMI namespace and automatically assigns corresponding version |
void |
setXMIVersion(java.lang.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 |
---|
delete, getAllContents, getContents, getEObject, getErrors, getResourceSet, getTimeStamp, getURI, getURIFragment, getWarnings, isLoaded, isModified, isTrackingModification, load, load, save, save, setModified, setTimeStamp, setTrackingModification, setURI, unload |
Methods inherited from interface org.eclipse.emf.common.notify.Notifier |
---|
eAdapters, eDeliver, eNotify, eSetDeliver |
Field Detail |
---|
static final java.lang.String OPTION_USE_XMI_TYPE
static final java.lang.String OPTION_SUPPRESS_XMI
static final java.lang.String VERSION_NAME
static final java.lang.String VERSION_VALUE
static final java.lang.String XMI_NAMESPACE_PREFIX
static final java.lang.String XMI_NS
static final java.lang.String XMI_ID
static final java.lang.String XMI_TAG_NAME
static final java.lang.String XMI_URI
Method Detail |
---|
java.lang.String getXMIVersion()
void setXMIVersion(java.lang.String version)
version
- java.lang.String getXMINamespace()
void setXMINamespace(java.lang.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 |