org.apache.woden.internal.xpointer
Class OMXMLElementEvaluator

java.lang.Object
  extended by org.apache.woden.internal.xpointer.XMLElementEvaluator
      extended by org.apache.woden.internal.xpointer.OMXMLElementEvaluator

public class OMXMLElementEvaluator
extends XMLElementEvaluator

This class extends XMLElementEvaluator to support the OM implementation in XMLElement

Author:
Dan Harvey

Constructor Summary
OMXMLElementEvaluator(XPointer xpointer, org.apache.axiom.om.OMElement element, ErrorReporter errorReporter)
          Constructs a new OMXMLElementEvaluator to evaluate a XPointer on a OM Element.
 
Method Summary
 org.apache.axiom.om.OMElement evaluateElement()
          Evaluates the XPointer on the root Element and returns the resulting Element or null.
 boolean testElementShorthand(XMLElement element, java.lang.String shorthand)
          Tests the element for an id according to the specification at http://www.w3.org/TR/xptr-framework/#term-sdi and returns a boolean answer.
 
Methods inherited from class org.apache.woden.internal.xpointer.XMLElementEvaluator
evaluate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OMXMLElementEvaluator

public OMXMLElementEvaluator(XPointer xpointer,
                             org.apache.axiom.om.OMElement element,
                             ErrorReporter errorReporter)
Constructs a new OMXMLElementEvaluator to evaluate a XPointer on a OM Element.

Parameters:
xpointer - an XPointer to evaluate.
element - an OMElement to be evaluated.
errorReporter - the Woden Error Reporter context object.
Method Detail

testElementShorthand

public boolean testElementShorthand(XMLElement element,
                                    java.lang.String shorthand)
Description copied from class: XMLElementEvaluator
Tests the element for an id according to the specification at http://www.w3.org/TR/xptr-framework/#term-sdi and returns a boolean answer.

Specified by:
testElementShorthand in class XMLElementEvaluator
Parameters:
element - An XMLElement to test for an id.
shorthand - A String of the id to test for.
Returns:
boolean value of whether the id matches or not.

evaluateElement

public org.apache.axiom.om.OMElement evaluateElement()
Evaluates the XPointer on the root Element and returns the resulting Element or null.

Returns:
an Element from the resultant evaluation of the root Element or null if evaluation fails.


Copyright © 2005-2009 Apache Software Foundation. All Rights Reserved.