Runtime

## org.eclipse.gmf.runtime.emf.core.resources
Class GMFResource

    java.lang.Object
      org.eclipse.emf.common.notify.impl.BasicNotifierImpl
          org.eclipse.emf.common.notify.impl.NotifierImpl
              org.eclipse.emf.ecore.resource.impl.ResourceImpl
                  org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl
                      org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl
                          org.eclipse.gmf.runtime.emf.core.resources.GMFResource

All Implemented Interfaces:
  Notifier, Resource, Resource.Internal, XMIResource, XMLResource

public class GMFResource
extends XMIResourceImpl

Custom implementation of an XMIResource.

Nested Class Summary

Nested classes inherited from class org.eclipse.emf.ecore.resource.impl.ResourceImpl
`ResourceImpl.ContentsEList, ResourceImpl.ModificationTrackingAdapter`

Nested classes inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
`BasicNotifierImpl.EAdapterList`

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 java.lang.String` `OPTION_ABORT_ON_ERROR` Use this option to abort loading a resource immediately when an error occurs.

Fields inherited from class org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl
`DETACHED_EOBJECT_TO_ID_MAP, domHandler, encoding, eObjectToExtensionMap, eObjectToIDMap, idToEObjectMap, publicId, systemId, useZip, xmlVersion`

Fields inherited from class org.eclipse.emf.ecore.resource.impl.ResourceImpl
`contents, defaultLoadOptions, defaultSaveOptions, errors, intrinsicIDToEObjectMap, isLoaded, isLoading, isModified, modificationTrackingAdapter, resourceSet, uri, warnings`

Fields inherited from class org.eclipse.emf.common.notify.impl.NotifierImpl
`eAdapters, EDELIVER, eFlags, ELAST_NOTIFIER_FLAG`

Fields inherited from interface org.eclipse.emf.ecore.xmi.XMIResource
`OPTION_USE_XMI_TYPE, VERSION_NAME, VERSION_VALUE, XMI_ID, XMI_NAMESPACE_PREFIX, XMI_NS, XMI_TAG_NAME, XMI_URI`

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_ATTACHMENT, 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_DEPRECATED_METHODS, 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, OPTION_XML_OPTIONS, OPTION_XML_VERSION, SCHEMA_LOCATION, TYPE, XML_NS, XML_SCHEMA_URI, XSI_NS, XSI_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`

Constructor Summary
`GMFResource(URI uri)` Constructor.

Method Summary
`NotificationChain` `basicSetResourceSet(ResourceSet rset, NotificationChain notifications)`
`protected Adapter` `createModificationTrackingAdapter()` The inherited implementation creates an adapter that always sets the modified state.
`protected XMLHelper` `createXMLHelper()`
`protected XMLLoad` `createXMLLoad()`
`protected XMLSave` `createXMLSave()`
`EObject` `getEObject(java.lang.String uriFragment)`
`static java.lang.String` `getSavedID(EObject eObject)` Get the saved ID of an EObject.
`void` `setRawURI(URI uri)` Set the URI of the resource without processing it.
`void` `setURI(URI uri)`
`void` `setUseIDAttributes(boolean b)` Should we use ID attribute?
`protected boolean` `useIDAttributes()` Should we use ID attribute?
`protected boolean` `useUUIDs()`

Methods inherited from class org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl
`getXMINamespace, getXMIVersion, setXMINamespace, setXMIVersion, useIDs`

Methods inherited from class org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl

`assignIDsWhileLoading, attachedHelper, detachedHelper, doLoad, doLoad, doLoad, doSave, doSave, doUnload, getDefaultLoadOptions, getDefaultSaveOptions, getDOMHelper, getEncoding, getEObjectByID, getEObjectToExtensionMap, getEObjectToIDMap, getID, getIDToEObjectMap, getPublicId, getSystemId, getURIFragment, getXMLVersion, init, isAttachedDetachedHelperRequired, isPath, load, load, save, save, setDoctypeInfo, setEncoding, setID, setUseZip, setXMLVersion, toKeyString, useZip`

Methods inherited from class org.eclipse.emf.ecore.resource.impl.ResourceImpl

`addModificationTrackingAdapters, attached, detached, getAllContents, getAllProperContents, getAllProperContents, getContents, getDefaultURIConverter, getEObject, getEObjectForURIFragmentRootSegment, getErrors, getIntrinsicIDToEObjectMap, getResourceSet, getURI, getURIConverter, getURIFragmentRootSegment, getWarnings, isContentZipEntry, isLoaded, isLoading, isModified, isTrackingModification, load, load, mergeMaps, newContentZipEntry, removeModificationTrackingAdapters, save, save, setIntrinsicIDToEObjectMap, setLoaded, setModified, setTrackingModification, toString, unload, unloaded`

Methods inherited from class org.eclipse.emf.common.notify.impl.NotifierImpl
`eAdapters, eBasicAdapters, eDeliver, eSetDeliver`

Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
`eNotificationRequired, eNotify`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

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, getErrors, getResourceSet, getURI, getURIFragment, getWarnings, isLoaded, isModified, isTrackingModification, load, load, save, save, setModified, setTrackingModification, unload`

Methods inherited from interface org.eclipse.emf.common.notify.Notifier
`eAdapters, eDeliver, eNotify, eSetDeliver`

Field Detail

### OPTION_ABORT_ON_ERROR

    public static final java.lang.String OPTION_ABORT_ON_ERROR

  Use this option to abort loading a resource immediately when an error occurs. The default is `Boolean.FALSE` unless set to `Boolean.TRUE` explicitly.

  See Also:
    Constant Field Values

Constructor Detail

### GMFResource

    public GMFResource(URI uri)

  Constructor.

Method Detail

### useUUIDs

    protected boolean useUUIDs()

### setUseIDAttributes

    public void setUseIDAttributes(boolean b)

  Should we use ID attribute?

### useIDAttributes

    protected boolean useIDAttributes()

  Should we use ID attribute?

### createXMLHelper

    protected XMLHelper createXMLHelper()

### createXMLLoad

    protected XMLLoad createXMLLoad()

### createXMLSave

    protected XMLSave createXMLSave()

### getEObject

    public EObject getEObject(java.lang.String uriFragment)

  See Also:
    `Resource.getEObject(java.lang.String)`

### getSavedID

    public static java.lang.String getSavedID(EObject eObject)

  Get the saved ID of an EObject.

### setURI

    public void setURI(URI uri)

  See Also:
    `Resource.setURI(org.eclipse.emf.common.util.URI)`

### basicSetResourceSet

    public NotificationChain basicSetResourceSet(ResourceSet rset,
                                                 NotificationChain notifications)

### setRawURI

    public void setRawURI(URI uri)

  Set the URI of the resource without processing it.

### createModificationTrackingAdapter

    protected Adapter createModificationTrackingAdapter()

  The inherited implementation creates an adapter that always sets the modified state. We prefer to check, first, whether the resource is already modified so that we don't generate redundant notifications. Moreover, we additionally set modified state only for changes that are in non-transient features of objects contained (recursively) by non-transient references.

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.