org.apache.woden.internal.xpointer
Class DOMXMLElementEvaluator

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

public class DOMXMLElementEvaluator
extends XMLElementEvaluator

This class extends the XMLElementEvaluator to support the DOM implementation in XMLElement.

Author:
Dan Harvey

Constructor Summary
DOMXMLElementEvaluator(XPointer xpointer, org.w3c.dom.Element element, ErrorReporter errorReporter)
          Constructs a new DOMXMLElementEvaluator to evaluate a XPointer on a DOM Element.
 
Method Summary
 org.w3c.dom.Element 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

DOMXMLElementEvaluator

public DOMXMLElementEvaluator(XPointer xpointer,
                              org.w3c.dom.Element element,
                              ErrorReporter errorReporter)
Constructs a new DOMXMLElementEvaluator to evaluate a XPointer on a DOM Element.

Parameters:
xpointer - an XPointer to evaluate.
element - an DOM Element 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.w3c.dom.Element 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-2010 Apache Software Foundation. All Rights Reserved.