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

org.eclipse.cosmos.rm.validation.internal.reference
Class DerefXPathFunction

java.lang.Object
  extended by org.eclipse.cosmos.rm.validation.internal.reference.DerefXPathFunction
All Implemented Interfaces:
javax.xml.xpath.XPathFunction

public class DerefXPathFunction
extends java.lang.Object
implements javax.xml.xpath.XPathFunction

This is an implementaion of the dref function specified in the SML specification. This implementation makes the following assumptions:

This is a singleton class that should be accessed via instance()


Field Summary
static int ARITY
          Arity - The number of arguments for the dref function
 
Constructor Summary
DerefXPathFunction()
           
 
Method Summary
 java.lang.Object evaluate(java.util.List arguments)
           
 java.lang.Object evaluate(java.lang.String referenceExp)
          Evaluates expression to a node object
 void evaluateExpression(org.eclipse.cosmos.rm.validation.internal.reference.DerefXPathFunction.ArrayNodeList result, java.lang.String referenceExp)
           
static javax.xml.xpath.XPathFunction instance()
          Returns an instance of this class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ARITY

public static final int ARITY
Arity - The number of arguments for the dref function

See Also:
Constant Field Values
Constructor Detail

DerefXPathFunction

public DerefXPathFunction()
Method Detail

evaluate

public java.lang.Object evaluate(java.util.List arguments)
                          throws javax.xml.xpath.XPathFunctionException
Specified by:
evaluate in interface javax.xml.xpath.XPathFunction
Throws:
javax.xml.xpath.XPathFunctionException
See Also:
XPathFunction.evaluate(java.util.List)

evaluateExpression

public void evaluateExpression(org.eclipse.cosmos.rm.validation.internal.reference.DerefXPathFunction.ArrayNodeList result,
                               java.lang.String referenceExp)
                        throws javax.xml.xpath.XPathFunctionException
Throws:
javax.xml.xpath.XPathFunctionException

evaluate

public java.lang.Object evaluate(java.lang.String referenceExp)
                          throws javax.xml.xpath.XPathFunctionException
Evaluates expression to a node object

Parameters:
referenceExp - uri expression
Returns:
return a node object
Throws:
javax.xml.xpath.XPathFunctionException - thrown if an error occurs during evaluation

instance

public static javax.xml.xpath.XPathFunction instance()
Returns an instance of this class

Returns:
The instance of this class

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