com.ctc.wstx.io
Class WstxInputLocation

java.lang.Object
  extended by com.ctc.wstx.io.WstxInputLocation
All Implemented Interfaces:
javax.xml.stream.Location, XMLStreamLocation2

public class WstxInputLocation
extends java.lang.Object
implements XMLStreamLocation2

Basic implementation of Location, used by Wstx readers.


Constructor Summary
WstxInputLocation(WstxInputLocation ctxt, java.lang.String pubId, java.lang.String sysId, int charOffset, int row, int col)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int getCharacterOffset()
           
 int getColumnNumber()
           
 XMLStreamLocation2 getContext()
          Method that can be used to traverse nested locations, like ones created when expanding entities (especially external entities).
static WstxInputLocation getEmptyLocation()
           
 int getLineNumber()
           
 java.lang.String getPublicId()
           
 java.lang.String getSystemId()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WstxInputLocation

public WstxInputLocation(WstxInputLocation ctxt,
                         java.lang.String pubId,
                         java.lang.String sysId,
                         int charOffset,
                         int row,
                         int col)
Parameters:
ctxt - Enclosing input location, if any
Method Detail

getEmptyLocation

public static WstxInputLocation getEmptyLocation()

getCharacterOffset

public int getCharacterOffset()
Specified by:
getCharacterOffset in interface javax.xml.stream.Location

getColumnNumber

public int getColumnNumber()
Specified by:
getColumnNumber in interface javax.xml.stream.Location

getLineNumber

public int getLineNumber()
Specified by:
getLineNumber in interface javax.xml.stream.Location

getPublicId

public java.lang.String getPublicId()
Specified by:
getPublicId in interface javax.xml.stream.Location

getSystemId

public java.lang.String getSystemId()
Specified by:
getSystemId in interface javax.xml.stream.Location

getContext

public XMLStreamLocation2 getContext()
Description copied from interface: XMLStreamLocation2
Method that can be used to traverse nested locations, like ones created when expanding entities (especially external entities). If so, single location object only contains information about specific offsets and ids, and a link to its context. Outermost location will return null to indicate there is no more information to retrieve.

Specified by:
getContext in interface XMLStreamLocation2
Returns:
Location in the context (parent input source), if any; null for locations in the outermost known context

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object