Packages

c

scales.xml.jaxen

ScalesBaseJaxenXPath

class ScalesBaseJaxenXPath extends org.jaxen.XPath with Serializable

Base functionality for all concrete, implementation-specific XPaths.

This class provides generic functionality for further-defined implementation-specific XPaths.

If you want to adapt the Jaxen engine so that it can traverse your own object model, then this is a good base class to derive from. Typically you only really need to provide your own org.jaxen.Navigator implementation.

See also

org.jaxen.dom4j.Dom4jXPath XPath for dom4j

org.jaxen.jdom.JDOMXPath XPath for JDOM

org.jaxen.dom.DOMXPath XPath for W3C DOM

Linear Supertypes
Serializable, org.jaxen.XPath, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ScalesBaseJaxenXPath
  2. Serializable
  3. XPath
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ScalesBaseJaxenXPath(xpathExpr: String, fact: XPathFactory, navigator: Navigator)

    Construct given an XPath expression string.

    Construct given an XPath expression string.

    xpathExpr

    the XPath expression

    navigator

    the XML navigator to use

    Exceptions thrown

    JaxenException if there is a syntax error while parsing the expression

  2. new ScalesBaseJaxenXPath(xpathExpr: String, fact: XPathFactory)
    Attributes
    protected[jaxen]

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addNamespace(prefix: String, uri: String): Unit

    Add a namespace prefix-to-URI mapping for this XPath expression.

    Add a namespace prefix-to-URI mapping for this XPath expression.

    Namespace prefix-to-URI mappings in an XPath are independent of those used within any document. Only the mapping explicitly added to this XPath will be available for resolving the XPath expression.

    This is a convenience method for adding mappings to the default NamespaceContext in place for this XPath. If you have installed a custom NamespaceContext that is not a SimpleNamespaceContext, then this method will throw a JaxenException.

    prefix

    the namespace prefix

    uri

    the namespace URI

    Definition Classes
    ScalesBaseJaxenXPath → XPath
    Exceptions thrown

    JaxenException if the NamespaceContext used by this XPath is not a SimpleNamespaceContext

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def booleanValueOf(node: Any): Boolean

    Retrieve a boolean-value interpretation of this XPath expression when evaluated against a given context.

    Retrieve a boolean-value interpretation of this XPath expression when evaluated against a given context.

    The boolean-value of the expression is determined per the boolean(..) function defined in the XPath specification. This means that an expression that selects zero nodes will return false, while an expression that selects one or more nodes will return true.

    node

    the node, node-set or Context object for evaluation. This value can be null.

    returns

    the boolean-value of the result of evaluating this expression with the specified context node

    Definition Classes
    ScalesBaseJaxenXPath → XPath
    Exceptions thrown

    JaxenException if an XPath error occurs during expression evaluation

  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  8. def createFunctionContext(): FunctionContext

    Create a default FunctionContext.

    Create a default FunctionContext.

    returns

    a default FunctionContext

    Attributes
    protected[jaxen]
  9. def createNamespaceContext(): NamespaceContext

    Create a default NamespaceContext.

    Create a default NamespaceContext.

    returns

    a default NamespaceContext instance

    Attributes
    protected[jaxen]
  10. def createVariableContext(): VariableContext

    Create a default VariableContext.

    Create a default VariableContext.

    returns

    a default VariableContext instance

    Attributes
    protected[jaxen]
  11. def debug(): String

    Returns a string representation of the parse tree.

    Returns a string representation of the parse tree.

    returns

    a string representation of the parse tree.

  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  14. def evaluate(context: Any): AnyRef

    Evaluate this XPath against a given context.

    Evaluate this XPath against a given context. The context of evaluation may be any object type the navigator recognizes as a node. The return value is either a String, Double, Boolean, or List of nodes.

    When using this method, one must be careful to test the class of the returned object. If the returned object is a list, then the items in this list will be the actual Document, Element, Attribute, etc. objects as defined by the concrete XML object-model implementation, directly from the context document. This method does not return copies of anything, but merely returns references to objects within the source document.

    context

    the node, node-set or Context object for evaluation. This value can be null.

    returns

    the result of evaluating the XPath expression against the supplied context

    Definition Classes
    ScalesBaseJaxenXPath → XPath
    Exceptions thrown

    ClassCastException if the context is not a node

    JaxenException if an XPath error occurs during expression evaluation

  15. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. def getContext(node: Any): Context

    Create a Context wrapper for the provided implementation-specific object.

    Create a Context wrapper for the provided implementation-specific object.

    node

    the implementation-specific object to be used as the context

    returns

    a Context wrapper around the object

    Attributes
    protected[jaxen]
  18. def getContextSupport(): ContextSupport

    Retrieve the ContextSupport aggregation of NamespaceContext, FunctionContext, VariableContext, and Navigator.

    Retrieve the ContextSupport aggregation of NamespaceContext, FunctionContext, VariableContext, and Navigator.

    returns

    aggregate ContextSupport for this XPath expression

    Attributes
    protected[jaxen]
  19. def getFunctionContext(): FunctionContext

    Retrieve the FunctionContext used by this XPath expression.

    Retrieve the FunctionContext used by this XPath expression.

    A FunctionContext is responsible for resolving all function calls used within the expression.

    If this XPath expression has not previously had a FunctionContext installed, a new default FunctionContext will be created, installed and returned.

    returns

    the FunctionContext used by this expression

    Definition Classes
    ScalesBaseJaxenXPath → XPath
    See also

    FunctionContext

  20. def getNamespaceContext(): NamespaceContext

    Retrieve the NamespaceContext used by this XPath expression.

    Retrieve the NamespaceContext used by this XPath expression.

    A NamespaceContext is responsible for mapping prefixes used within the expression to namespace URIs.

    If this XPath expression has not previously had a NamespaceContext installed, a new default NamespaceContext will be created, installed and returned.

    returns

    the NamespaceContext used by this expression

    Definition Classes
    ScalesBaseJaxenXPath → XPath
    See also

    NamespaceContext

  21. def getNavigator(): Navigator

    Retrieve the XML object-model-specific Navigator for us in evaluating this XPath expression.

    Retrieve the XML object-model-specific Navigator for us in evaluating this XPath expression.

    returns

    the implementation-specific Navigator

    Definition Classes
    ScalesBaseJaxenXPath → XPath
  22. def getRootExpr(): Expr

    Retrieve the root expression of the internal compiled form of this XPath expression.

    Retrieve the root expression of the internal compiled form of this XPath expression.

    Internally, Jaxen maintains a form of Abstract Syntax Tree (AST) to represent the structure of the XPath expression. This is normally not required during normal consumer-grade usage of Jaxen. This method is provided for hard-core users who wish to manipulate or inspect a tree-based version of the expression.

    returns

    the root of the AST of this expression

  23. def getVariableContext(): VariableContext

    Retrieve the VariableContext used by this XPath expression.

    Retrieve the VariableContext used by this XPath expression.

    A VariableContext is responsible for resolving all variables referenced within the expression.

    If this XPath expression has not previously had a VariableContext installed, a new default VariableContext will be created, installed and returned.

    returns

    the VariableContext used by this expression

    Definition Classes
    ScalesBaseJaxenXPath → XPath
    See also

    VariableContext

  24. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  25. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  26. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  27. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  28. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  29. def numberValueOf(node: Any): Number

    Retrieve a number-value interpretation of this XPath expression when evaluated against a given context.

    Retrieve a number-value interpretation of this XPath expression when evaluated against a given context.

    The number-value of the expression is determined per the number(..) core function as defined in the XPath specification. This means that if this expression selects multiple nodes, the number-value of the first node is returned.

    node

    the node, node-set or Context object for evaluation. This value can be null.

    returns

    a Double indicating the numeric value of evaluating this expression against the specified context

    Definition Classes
    ScalesBaseJaxenXPath → XPath
    Exceptions thrown

    JaxenException if an XPath error occurs during expression evaluation

  30. def selectNodes(node: Any): List[_]

    Select all nodes that are selected by this XPath expression.

    Select all nodes that are selected by this XPath expression. If multiple nodes match, multiple nodes will be returned. Nodes will be returned in document-order, as defined by the XPath specification. If the expression selects a non-node-set (i.e. a number, boolean, or string) then a List containing just that one object is returned.

    node

    the node, node-set or Context object for evaluation. This value can be null.

    returns

    the node-set of all items selected by this XPath expression

    Definition Classes
    ScalesBaseJaxenXPath → XPath
    Exceptions thrown

    JaxenException if an XPath error occurs during expression evaluation

    See also

    #selectNodesForContext

  31. def selectNodesForContext(context: Context): List

    Select all nodes that match this XPath expression on the given Context object.

    Select all nodes that match this XPath expression on the given Context object. If multiple nodes match, multiple nodes will be returned in document-order, as defined by the XPath specification. If the expression selects a non-node-set (i.e. a number, boolean, or string) then a List containing just that one object is returned.

    context

    the Context which gets evaluated

    returns

    the node-set of all items selected by this XPath expression

    Attributes
    protected[jaxen]
    Exceptions thrown

    JaxenException if an XPath error occurs during expression evaluation

  32. def selectSingleNode(node: Any): AnyRef

    Select only the first node selected by this XPath expression.

    Select only the first node selected by this XPath expression. If multiple nodes match, only one node will be returned. The selected node will be the first selected node in document-order, as defined by the XPath specification.

    node

    the node, node-set or Context object for evaluation. This value can be null.

    returns

    the node-set of all items selected by this XPath expression

    Definition Classes
    ScalesBaseJaxenXPath → XPath
    Exceptions thrown

    JaxenException if an XPath error occurs during expression evaluation

    See also

    #selectNodes

  33. def selectSingleNodeForContext(context: Context): AnyRef

    Return only the first node that is selected by this XPath expression.

    Return only the first node that is selected by this XPath expression. If multiple nodes match, only one node will be returned. The selected node will be the first selected node in document-order, as defined by the XPath specification. If the XPath expression selects a double, String, or boolean, then that object is returned.

    context

    the Context against which this expression is evaluated

    returns

    the first node in document order of all nodes selected by this XPath expression

    Attributes
    protected[jaxen]
    Exceptions thrown

    JaxenException if an XPath error occurs during expression evaluation

    See also

    #selectNodesForContext

  34. def setFunctionContext(functionContext: FunctionContext): Unit

    Set a FunctionContext for use with this XPath expression.

    Set a FunctionContext for use with this XPath expression.

    A FunctionContext is responsible for resolving all function calls used within the expression.

    functionContext

    the FunctionContext to install for this expression

    Definition Classes
    ScalesBaseJaxenXPath → XPath
    See also

    FunctionContext

    FunctionContext#getFunction

  35. def setNamespaceContext(namespaceContext: NamespaceContext): Unit

    Set a NamespaceContext for use with this XPath expression.

    Set a NamespaceContext for use with this XPath expression.

    A NamespaceContext is responsible for translating namespace prefixes within the expression into namespace URIs.

    namespaceContext

    the NamespaceContext to install for this expression

    Definition Classes
    ScalesBaseJaxenXPath → XPath
    See also

    NamespaceContext

    NamespaceContext#translateNamespacePrefixToUri

  36. def setVariableContext(variableContext: VariableContext): Unit

    Set a VariableContext for use with this XPath expression.

    Set a VariableContext for use with this XPath expression.

    A VariableContext is responsible for resolving all variables referenced within the expression.

    variableContext

    The VariableContext to install for this expression

    Definition Classes
    ScalesBaseJaxenXPath → XPath
    See also

    VariableContext

    VariableContext#getVariableValue

  37. def stringValueOf(node: Any): String

    Retrieves the string-value of the result of evaluating this XPath expression when evaluated against the specified context.

    Retrieves the string-value of the result of evaluating this XPath expression when evaluated against the specified context.

    The string-value of the expression is determined per the string(..) core function defined in the XPath specification. This means that an expression that selects zero nodes will return the empty string, while an expression that selects one-or-more nodes will return the string-value of the first node.

    node

    the node, node-set or Context object for evaluation. This value can be null.

    returns

    the string-value of the result of evaluating this expression with the specified context node

    Definition Classes
    ScalesBaseJaxenXPath → XPath
    Exceptions thrown

    JaxenException if an XPath error occurs during expression evaluation

  38. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  39. def toString(): String

    Return the original expression text.

    Return the original expression text.

    returns

    the normalized XPath expression string

    Definition Classes
    ScalesBaseJaxenXPath → AnyRef → Any
  40. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Deprecated Value Members

  1. def valueOf(node: Any): String

    Returns the XPath string-value of the argument node.

    Returns the XPath string-value of the argument node.

    node

    the node whose value to take

    returns

    the XPath string value of this node

    Deprecated

    replaced by #stringValueOf

    Exceptions thrown

    JaxenException if an XPath error occurs during expression evaluation

Inherited from Serializable

Inherited from org.jaxen.XPath

Inherited from AnyRef

Inherited from Any

Ungrouped