## org.eclipse.emf.ecore.resource
Interface Resource.Internal

All Superinterfaces:
  Notifier, Resource

All Known Implementing Classes:
  BinaryResourceImpl, Ecore2EcoreResourceImpl, Ecore2XMLResourceImpl, EMOFResourceImpl, GenericXMLResourceImpl, ResourceImpl, XMIResourceImpl, XMLResourceImpl, XMLTypeResourceImpl

Enclosing interface:
  Resource

    public static interface Resource.Internal

extends Resource

An internal interface implemented by all resources.

It is used to maintain the referential integrity of the containment relation between a resource set and a resource. Clients must extend the default `implementation`, since methods can and will be added to this API.

See Also:
  `Resource.getResourceSet()`, `ResourceSet.getResources()`, `InternalEObject.eBasicSetContainer(InternalEObject, int, NotificationChain)`

Nested Class Summary

Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.resource.Resource
`Resource.Diagnostic, Resource.Factory, Resource.Internal, Resource.IOWrappedException`

Field Summary

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
`void` `attached(EObject eObject)` Called when the object is attached to this resource, i.e., when it's `eResource` changes to be this one.
`NotificationChain` `basicSetResourceSet(ResourceSet resourceSet, NotificationChain notifications)` Sets the resource to be contained by the given resource set, and returns the notifications this produces.
`void` `detached(EObject eObject)` Called when the object is detached from this resource, i.e., when it's `eResource` changes to no longer be this one.
`boolean` `isLoading()` Indicates whether the resource is currently being loaded.

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`

Method Detail

### attached

    void attached(EObject eObject)

  Called when the object is attached to this resource, i.e., when it's `eResource` changes to be this one.

  An implementation that `resolves` based on IDs will need to walk the `tree` of this object in order to tabulate an index. An implementation that needs to `track modification` will also need to walk the tree in order to add the necessary adapter. In either of these cases, editing of containment relations will be significantly more expensive.

  Parameters:
    `eObject` - the attached object.
  See Also:
    `detached(EObject)`

### detached

    void detached(EObject eObject)

  Called when the object is detached from this resource, i.e., when it's `eResource` changes to no longer be this one.

  An implementation that `resolves` based on IDs will need to walk the `tree` of this object in order clean up it's index. An implementation that needs to `track modification` will also need to walk the tree in order to remove the added adapter. In either of these cases, editing of containment relations will be significantly more expensive.

  Parameters:
    `eObject` - the attached object.
  See Also:
    `attached(EObject)`

### basicSetResourceSet

    NotificationChain basicSetResourceSet(ResourceSet resourceSet,
                                          NotificationChain notifications)

  Sets the resource to be contained by the given resource set, and returns the notifications this produces.

  If it was previously contained by a resource set, it will have been removed.

  Returns:
    the notifications produced, or `null` if there aren't any.

### isLoading

    boolean isLoading()

  Indicates whether the resource is currently being loaded.

  This will be `true` during a call to `load(InputStream, Map)`, before notifications are dispatched.

  Returns:
    whether this resource is currently being loaded.

Copyright 2001-2006 IBM Corporation and others. All Rights Reserved.