|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.translet.builder.NodeCreator
Default implementation of the LocationPathHandler that creates the nodes belonging to the XML document.
| Fields inherited from interface org.translet.processor.LocationPathHandler |
AXES_ANCESTOR, AXES_ANCESTOR_OR_SELF, AXES_ATTRIBUTE, AXES_CHILD, AXES_DESCENDENT, AXES_DESCENDENT_OR_SELF, AXES_FOLLOWING, AXES_FOLLOWING_SIBLING, AXES_NAMESPACE, AXES_PARENT, AXES_PRECEDING, AXES_PRECEDING_SIBLING, AXES_SELF, AXES_UNKNOWN |
| Constructor Summary | |
NodeCreator()
Uses a new DOM document. |
|
NodeCreator(Document doc)
|
|
| Method Summary | |
void |
attribute(String attrName)
Indicates an attribute in the location path. |
void |
attributeInPredicate(String attrName)
Indicates that an attribute was found with in the predicate |
void |
axes(short axescode)
Indicates that an axes was encountered. |
Node |
createNode(String nodeName,
String namespaceURI,
short nodeType)
Creates a node of the specified type. |
void |
data(String value)
Sets the data. |
void |
endLocationPath()
Indicates the closing of a LocationPath. |
void |
endPredicate()
Indicates the closing of a predicate. |
void |
endXPath()
Indicates the closing of an xpath expression. |
Document |
getDocument()
Returns the dom document. |
void |
locationStep(String step)
Indicates that a location step was found. |
void |
predicate(PredicateExpr predicate)
Indicates a predicate in the location path. |
void |
startLocationPath()
Indicates the beginning of a LocationPath in an expression. |
void |
startPredicate()
Indicates the beginning of a predicate in an expression. |
void |
startXPath()
Indicates the beginning of an xpath expression. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public NodeCreator()
public NodeCreator(Document doc)
| Method Detail |
public void startXPath()
LocationPathHandlerstartXPath in interface LocationPathHandlerpublic void endXPath()
LocationPathHandlerendXPath in interface LocationPathHandlerpublic void startPredicate()
LocationPathHandlerstartPredicate in interface LocationPathHandlerpublic void endPredicate()
LocationPathHandlerendPredicate in interface LocationPathHandlerpublic void attributeInPredicate(String attrName)
LocationPathHandlerattributeInPredicate in interface LocationPathHandlerpublic void startLocationPath()
LocationPathHandlerstartLocationPath in interface LocationPathHandlerpublic void endLocationPath()
LocationPathHandlerendLocationPath in interface LocationPathHandlerpublic void locationStep(String step)
LocationPathHandlerlocationStep in interface LocationPathHandlerorg.translet.processor.LocationPathHandlerstep - the name of the location step.public void axes(short axescode)
LocationPathHandleraxes in interface LocationPathHandlerorg.translet.processor.LocationPathHandleraxesname - the name of the axis.public void predicate(PredicateExpr predicate)
LocationPathHandlerpredicate in interface LocationPathHandlerorg.translet.processor.LocationPathHandlerPredicateExpr - encapsulates the elements of the predicate.public void attribute(String attrName)
LocationPathHandlerattribute in interface LocationPathHandlerorg.translet.processor.LocationPathHandlername - of the attribute.public void data(String value)
LocationPathHandlerdata in interface LocationPathHandler
public Node createNode(String nodeName,
String namespaceURI,
short nodeType)
LocationPathHandlercreateNode in interface LocationPathHandlerorg.translet.processor.LocationPathHandlernodeName - - name for the node. Ignored if not
appropriate (like in text nodes).namespaceURI - - namespace for the node. If invalid
then, a no-namespace node will be created.name - nodeType - a node type as specified in the
org.w3c.dom.Node interface.IllegalArgumentException - if the nodeType is
doesn't correspond to the values in the Node
interface.public Document getDocument()
LocationPathHandlergetDocument in interface LocationPathHandler
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||