COSMOS ${releaseVersion} resource-modeling Project
Internal API Specification

org.eclipse.cosmos.rm.repository.internal.application.impl
Class SMLFileResourceFacet

java.lang.Object
  extended by org.eclipse.cosmos.rm.repository.internal.resource.SMLDocumentFragment
      extended by org.eclipse.cosmos.rm.repository.internal.application.impl.AbstractSMLFragment
          extended by org.eclipse.cosmos.rm.repository.internal.application.impl.SMLFileResourceFacet
All Implemented Interfaces:
java.io.Serializable, ISMLResourceBase, ISMLResourceFacet, org.eclipse.cosmos.rm.repository.provisional.resource.ISMLDocumentFragment

public class SMLFileResourceFacet
extends AbstractSMLFragment
implements ISMLResourceFacet, java.io.Serializable

An implementation of a resource facet. The #load(Node) method should be used to instantiate an instance of this class.

See Also:
Serialized Form

Method Summary
protected  org.w3c.dom.Node getRootNode()
          Returns the node that will be used as the context.
 boolean isReference()
          Indicates whether this item is a reference or not
static SMLFileResourceFacet load(org.eclipse.cosmos.rm.repository.provisional.core.ISMLRepository repository, org.w3c.dom.Node node)
          Instantiate an instance of this class based on the DOM node passed in.
 ISMLResourceFacet resolveReference()
          If this object happens to represent a reference to a facet (i.e. isReference() returns true), then this method will have it resolved to the actual facet.
 ISMLResourceFacet[] retrieveFacets()
          Retrieves and returns the facets that are directly referenced by this facet.
 ISMLResourceProperty[] retrieveProperties()
          Retrieves and returns the properties that are directly referenced by this facet.
 ISMLResourceInstance[] retrieveResources()
          Retrieves and returns the resources that are directly referenced by this facet.
 
Methods inherited from class org.eclipse.cosmos.rm.repository.internal.application.impl.AbstractSMLFragment
retrieveDescription, retrieveDisplayName, retrieveName
 
Methods inherited from class org.eclipse.cosmos.rm.repository.internal.resource.SMLDocumentFragment
getNodeList, getParentDocument, setNodeList, setParentDocument
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.cosmos.rm.repository.provisional.resource.ISMLDocumentFragment
getNodeList, getParentDocument
 
Methods inherited from interface org.eclipse.cosmos.rm.repository.internal.application.ISMLResourceBase
retrieveDescription, retrieveDisplayName, retrieveName
 

Method Detail

load

public static SMLFileResourceFacet load(org.eclipse.cosmos.rm.repository.provisional.core.ISMLRepository repository,
                                        org.w3c.dom.Node node)
Instantiate an instance of this class based on the DOM node passed in.

Parameters:
node - The facet node
Returns:
An instance of this class if node represents a facet node; null otherwise

resolveReference

public ISMLResourceFacet resolveReference()
Description copied from interface: ISMLResourceFacet
If this object happens to represent a reference to a facet (i.e. isReference() returns true), then this method will have it resolved to the actual facet. If isReference() happens to return false, then the return value of this method is this object.

Specified by:
resolveReference in interface ISMLResourceFacet
Returns:
An object representing the resolved resource that this reference points to
See Also:
ISMLResourceFacet.resolveReference()

retrieveFacets

public ISMLResourceFacet[] retrieveFacets()
Description copied from interface: ISMLResourceFacet
Retrieves and returns the facets that are directly referenced by this facet.

Specified by:
retrieveFacets in interface ISMLResourceFacet
Returns:
The direct facets referenced by this facet
See Also:
ISMLResourceFacet.retrieveFacets()

retrieveProperties

public ISMLResourceProperty[] retrieveProperties()
Description copied from interface: ISMLResourceFacet
Retrieves and returns the properties that are directly referenced by this facet.

Specified by:
retrieveProperties in interface ISMLResourceFacet
Returns:
The direct properties referenced by this facet
See Also:
ISMLResourceFacet.retrieveProperties()

retrieveResources

public ISMLResourceInstance[] retrieveResources()
Description copied from interface: ISMLResourceFacet
Retrieves and returns the resources that are directly referenced by this facet.

Specified by:
retrieveResources in interface ISMLResourceFacet
Returns:
The direct resources referenced by this facet
See Also:
ISMLResourceFacet.retrieveResources()

isReference

public boolean isReference()
Description copied from interface: ISMLResourceBase
Indicates whether this item is a reference or not

Specified by:
isReference in interface ISMLResourceBase
Returns:
true if this item is a reference; false otherwise
See Also:
ISMLResourceBase.isReference()

getRootNode

protected org.w3c.dom.Node getRootNode()
Description copied from class: AbstractSMLFragment
Returns the node that will be used as the context.

Specified by:
getRootNode in class AbstractSMLFragment
Returns:
The root node
See Also:
AbstractSMLFragment.getRootNode()

COSMOS ${releaseVersion} resource-modeling Project
Internal API Specification