|
|||||||||
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()
LocationPathHandler
startXPath
in interface LocationPathHandler
public void endXPath()
LocationPathHandler
endXPath
in interface LocationPathHandler
public void startPredicate()
LocationPathHandler
startPredicate
in interface LocationPathHandler
public void endPredicate()
LocationPathHandler
endPredicate
in interface LocationPathHandler
public void attributeInPredicate(String attrName)
LocationPathHandler
attributeInPredicate
in interface LocationPathHandler
public void startLocationPath()
LocationPathHandler
startLocationPath
in interface LocationPathHandler
public void endLocationPath()
LocationPathHandler
endLocationPath
in interface LocationPathHandler
public void locationStep(String step)
LocationPathHandler
locationStep
in interface LocationPathHandler
org.translet.processor.LocationPathHandler
step
- the name of the location step.public void axes(short axescode)
LocationPathHandler
axes
in interface LocationPathHandler
org.translet.processor.LocationPathHandler
axesname
- the name of the axis.public void predicate(PredicateExpr predicate)
LocationPathHandler
predicate
in interface LocationPathHandler
org.translet.processor.LocationPathHandler
PredicateExpr
- encapsulates the elements of the predicate.public void attribute(String attrName)
LocationPathHandler
attribute
in interface LocationPathHandler
org.translet.processor.LocationPathHandler
name
- of the attribute.public void data(String value)
LocationPathHandler
data
in interface LocationPathHandler
public Node createNode(String nodeName, String namespaceURI, short nodeType)
LocationPathHandler
createNode
in interface LocationPathHandler
org.translet.processor.LocationPathHandler
nodeName
- - 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()
LocationPathHandler
getDocument
in interface LocationPathHandler
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |