Package org.apache.xml.dtm.ref
Class NodeLocator
java.lang.Object
org.apache.xml.dtm.ref.NodeLocator
- All Implemented Interfaces:
SourceLocator
public class NodeLocator extends Object implements SourceLocator
NodeLocator maintains information on an XML source
node.- Since:
- May 23, 2001
- Author:
- Ovidiu Predescu
-
Field Summary
Fields Modifier and Type Field Description protected intm_columnNumberprotected intm_lineNumberprotected Stringm_publicIdprotected Stringm_systemId -
Constructor Summary
Constructors Constructor Description NodeLocator(String publicId, String systemId, int lineNumber, int columnNumber)Creates a newNodeLocatorinstance. -
Method Summary
Modifier and Type Method Description intgetColumnNumber()getColumnNumberreturns the column number of the node.intgetLineNumber()getLineNumberreturns the line number of the node.StringgetPublicId()getPublicIdreturns the public ID of the node.StringgetSystemId()getSystemIdreturns the system ID of the node.StringtoString()toStringreturns a string representation of this NodeLocator instance.
-
Field Details
-
m_publicId
-
m_systemId
-
m_lineNumber
protected int m_lineNumber -
m_columnNumber
protected int m_columnNumber
-
-
Constructor Details
-
NodeLocator
Creates a newNodeLocatorinstance.- Parameters:
publicId- aStringvaluesystemId- aStringvaluelineNumber- anintvaluecolumnNumber- anintvalue
-
-
Method Details
-
getPublicId
getPublicIdreturns the public ID of the node.- Specified by:
getPublicIdin interfaceSourceLocator- Returns:
- a
Stringvalue - See Also:
SourceLocator.getSystemId()
-
getSystemId
getSystemIdreturns the system ID of the node.- Specified by:
getSystemIdin interfaceSourceLocator- Returns:
- a
Stringvalue - See Also:
SourceLocator.getPublicId()
-
getLineNumber
public int getLineNumber()getLineNumberreturns the line number of the node.- Specified by:
getLineNumberin interfaceSourceLocator- Returns:
- an
intvalue - See Also:
SourceLocator.getColumnNumber()
-
getColumnNumber
public int getColumnNumber()getColumnNumberreturns the column number of the node.- Specified by:
getColumnNumberin interfaceSourceLocator- Returns:
- an
intvalue - See Also:
SourceLocator.getLineNumber()
-
toString
toStringreturns a string representation of this NodeLocator instance.
-