Package nu.validator.saxtree
Class Node
- java.lang.Object
-
- nu.validator.saxtree.Node
-
- All Implemented Interfaces:
org.xml.sax.Locator
- Direct Known Subclasses:
CharBufferNode
,ParentNode
,ProcessingInstruction
,SkippedEntity
public abstract class Node extends java.lang.Object implements org.xml.sax.Locator
The common node superclass.- Version:
- $Id$
-
-
Field Summary
Fields Modifier and Type Field Description private int
column
The column.private int
line
The line.private Node
nextSibling
The next sibling.private ParentNode
parentNode
The parent.private java.lang.String
publicId
The public id.private java.lang.String
systemId
The system id.
-
Constructor Summary
Constructors Constructor Description Node(org.xml.sax.Locator locator)
The constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
detach()
Detach this node from its parent.org.xml.sax.Attributes
getAttributes()
Returns the attributes.int
getColumnNumber()
java.lang.String
getData()
Returns the data.Node
getFirstChild()
Return the first child.int
getLineNumber()
java.lang.String
getLocalName()
Returns the localName.java.lang.String
getName()
Returns the name.Node
getNextSibling()
Returns the nextSibling.abstract NodeType
getNodeType()
Return the node type.ParentNode
getParentNode()
Returns the parentNode.java.util.List<PrefixMapping>
getPrefixMappings()
Returns the prefixMappings.Node
getPreviousSibling()
Returns the previous siblingjava.lang.String
getPublicId()
java.lang.String
getPublicIdentifier()
Returns the publicIdentifier.java.lang.String
getQName()
Returns the qName.java.lang.String
getSystemId()
java.lang.String
getSystemIdentifier()
Returns the systemIdentifier.java.lang.String
getTarget()
Returns the target.java.lang.String
getUri()
Returns the uri.(package private) void
revisit(TreeParser treeParser)
Revisit the node.(package private) void
setNextSibling(Node nextSibling)
Sets the nextSibling.(package private) void
setParentNode(ParentNode parentNode)
Sets the parentNode.(package private) abstract void
visit(TreeParser treeParser)
Visit the node.
-
-
-
Field Detail
-
systemId
private final java.lang.String systemId
The system id.
-
publicId
private final java.lang.String publicId
The public id.
-
column
private final int column
The column.
-
line
private final int line
The line.
-
nextSibling
private Node nextSibling
The next sibling.
-
parentNode
private ParentNode parentNode
The parent.
-
-
Method Detail
-
getColumnNumber
public int getColumnNumber()
- Specified by:
getColumnNumber
in interfaceorg.xml.sax.Locator
- See Also:
Locator.getColumnNumber()
-
getLineNumber
public int getLineNumber()
- Specified by:
getLineNumber
in interfaceorg.xml.sax.Locator
- See Also:
Locator.getLineNumber()
-
getPublicId
public java.lang.String getPublicId()
- Specified by:
getPublicId
in interfaceorg.xml.sax.Locator
- See Also:
Locator.getPublicId()
-
getSystemId
public java.lang.String getSystemId()
- Specified by:
getSystemId
in interfaceorg.xml.sax.Locator
- See Also:
Locator.getSystemId()
-
visit
abstract void visit(TreeParser treeParser) throws org.xml.sax.SAXException
Visit the node.- Parameters:
treeParser
- the visitor- Throws:
org.xml.sax.SAXException
- if stuff goes wrong
-
revisit
void revisit(TreeParser treeParser) throws org.xml.sax.SAXException
Revisit the node.- Parameters:
treeParser
- the visitor- Throws:
org.xml.sax.SAXException
- if stuff goes wrong
-
getFirstChild
public Node getFirstChild()
Return the first child.- Returns:
- the first child
-
getNextSibling
public final Node getNextSibling()
Returns the nextSibling.- Returns:
- the nextSibling
-
getPreviousSibling
public final Node getPreviousSibling()
Returns the previous sibling- Returns:
- the previous sibling
-
setNextSibling
void setNextSibling(Node nextSibling)
Sets the nextSibling.- Parameters:
nextSibling
- the nextSibling to set
-
getParentNode
public final ParentNode getParentNode()
Returns the parentNode.- Returns:
- the parentNode
-
setParentNode
void setParentNode(ParentNode parentNode)
Sets the parentNode.- Parameters:
parentNode
- the parentNode to set
-
getNodeType
public abstract NodeType getNodeType()
Return the node type.- Returns:
- the node type
-
detach
public void detach()
Detach this node from its parent.
-
getName
public java.lang.String getName()
Returns the name.- Returns:
- the name
-
getPublicIdentifier
public java.lang.String getPublicIdentifier()
Returns the publicIdentifier.- Returns:
- the publicIdentifier
-
getSystemIdentifier
public java.lang.String getSystemIdentifier()
Returns the systemIdentifier.- Returns:
- the systemIdentifier
-
getAttributes
public org.xml.sax.Attributes getAttributes()
Returns the attributes.- Returns:
- the attributes
-
getLocalName
public java.lang.String getLocalName()
Returns the localName.- Returns:
- the localName
-
getPrefixMappings
public java.util.List<PrefixMapping> getPrefixMappings()
Returns the prefixMappings.- Returns:
- the prefixMappings
-
getQName
public java.lang.String getQName()
Returns the qName.- Returns:
- the qName
-
getUri
public java.lang.String getUri()
Returns the uri.- Returns:
- the uri
-
getData
public java.lang.String getData()
Returns the data.- Returns:
- the data
-
getTarget
public java.lang.String getTarget()
Returns the target.- Returns:
- the target
-
-