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

org.eclipse.cosmos.rm.repository.provisional.resource
Interface ISMLDocument

All Known Subinterfaces:
ISMLDefinitionDocument, ISMLInstanceDocument

public interface ISMLDocument

Represents an SML document. Associated with each document is a meta-data object that store meta information about the document. The retrieval operations should be used with care if the implementation will require a separate read for each.


Method Summary
 ISMLMetadata getMetadata()
          Returns the meta-data associated with this document
 ISMLDocumentFragment retrieveDocumentFragment(javax.xml.namespace.NamespaceContext namespaceContext, org.w3c.dom.Node contextNode, java.lang.String xpathExpression)
          Retrieves and returns a document fragment based on the context node and the XPath expression that is passed in.
 

Method Detail

retrieveDocumentFragment

ISMLDocumentFragment retrieveDocumentFragment(javax.xml.namespace.NamespaceContext namespaceContext,
                                              org.w3c.dom.Node contextNode,
                                              java.lang.String xpathExpression)
                                              throws RepositoryOperationException
Retrieves and returns a document fragment based on the context node and the XPath expression that is passed in. The contextNode should be set to null if the XPath should be applied using the root node as the context.

Parameters:
namespaceContext - The namespace context used when evaluating the xpath expression
contextNode - The context node for the XPath expression
xpathExpression - The XPath expression
Returns:
The SML fragment resulting from the XPath query
Throws:
RepositoryOperationException - In case of an error

getMetadata

ISMLMetadata getMetadata()
Returns the meta-data associated with this document

Returns:
The meta-data of this document

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