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.LocatorThe common node superclass.- Version:
- $Id$
-
-
Field Summary
Fields Modifier and Type Field Description private intcolumnThe column.private intlineThe line.private NodenextSiblingThe next sibling.private ParentNodeparentNodeThe parent.private java.lang.StringpublicIdThe public id.private java.lang.StringsystemIdThe 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 voiddetach()Detach this node from its parent.org.xml.sax.AttributesgetAttributes()Returns the attributes.intgetColumnNumber()java.lang.StringgetData()Returns the data.NodegetFirstChild()Return the first child.intgetLineNumber()java.lang.StringgetLocalName()Returns the localName.java.lang.StringgetName()Returns the name.NodegetNextSibling()Returns the nextSibling.abstract NodeTypegetNodeType()Return the node type.ParentNodegetParentNode()Returns the parentNode.java.util.List<PrefixMapping>getPrefixMappings()Returns the prefixMappings.NodegetPreviousSibling()Returns the previous siblingjava.lang.StringgetPublicId()java.lang.StringgetPublicIdentifier()Returns the publicIdentifier.java.lang.StringgetQName()Returns the qName.java.lang.StringgetSystemId()java.lang.StringgetSystemIdentifier()Returns the systemIdentifier.java.lang.StringgetTarget()Returns the target.java.lang.StringgetUri()Returns the uri.(package private) voidrevisit(TreeParser treeParser)Revisit the node.(package private) voidsetNextSibling(Node nextSibling)Sets the nextSibling.(package private) voidsetParentNode(ParentNode parentNode)Sets the parentNode.(package private) abstract voidvisit(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:
getColumnNumberin interfaceorg.xml.sax.Locator- See Also:
Locator.getColumnNumber()
-
getLineNumber
public int getLineNumber()
- Specified by:
getLineNumberin interfaceorg.xml.sax.Locator- See Also:
Locator.getLineNumber()
-
getPublicId
public java.lang.String getPublicId()
- Specified by:
getPublicIdin interfaceorg.xml.sax.Locator- See Also:
Locator.getPublicId()
-
getSystemId
public java.lang.String getSystemId()
- Specified by:
getSystemIdin 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
-
-