Package com.ctc.wstx.io
Class WstxInputLocation
- java.lang.Object
-
- com.ctc.wstx.io.WstxInputLocation
-
- All Implemented Interfaces:
Serializable,Location,XMLStreamLocation2
public class WstxInputLocation extends Object implements Serializable, XMLStreamLocation2
Basic implementation ofLocation, used by Wstx readers.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected longmCharOffsetprotected intmColprotected WstxInputLocationmContextEnclosing (parent) input location; location from which current location is derived.protected StringmDescprotected StringmPublicIdprotected intmRowprotected StringmSystemId-
Fields inherited from interface org.codehaus.stax2.XMLStreamLocation2
NOT_AVAILABLE
-
-
Constructor Summary
Constructors Constructor Description WstxInputLocation(WstxInputLocation ctxt, String pubId, SystemId sysId, long charOffset, int row, int col)WstxInputLocation(WstxInputLocation ctxt, String pubId, String sysId, long charOffset, int row, int col)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)intgetCharacterOffset()longgetCharacterOffsetLong()intgetColumnNumber()XMLStreamLocation2getContext()Method that can be used to traverse nested locations, like ones created when expanding entities (especially external entities).static WstxInputLocationgetEmptyLocation()intgetLineNumber()StringgetPublicId()StringgetSystemId()inthashCode()StringtoString()
-
-
-
Field Detail
-
mContext
protected final WstxInputLocation mContext
Enclosing (parent) input location; location from which current location is derived.
-
mPublicId
protected final String mPublicId
-
mSystemId
protected final String mSystemId
-
mCharOffset
protected final long mCharOffset
-
mCol
protected final int mCol
-
mRow
protected final int mRow
-
mDesc
protected transient String mDesc
-
-
Constructor Detail
-
WstxInputLocation
public WstxInputLocation(WstxInputLocation ctxt, String pubId, String sysId, long charOffset, int row, int col)
- Parameters:
ctxt- Enclosing input location, if any
-
WstxInputLocation
public WstxInputLocation(WstxInputLocation ctxt, String pubId, SystemId sysId, long charOffset, int row, int col)
-
-
Method Detail
-
getEmptyLocation
public static WstxInputLocation getEmptyLocation()
-
getCharacterOffsetLong
public long getCharacterOffsetLong()
-
getCharacterOffset
public int getCharacterOffset()
- Specified by:
getCharacterOffsetin interfaceLocation
-
getColumnNumber
public int getColumnNumber()
- Specified by:
getColumnNumberin interfaceLocation
-
getLineNumber
public int getLineNumber()
- Specified by:
getLineNumberin interfaceLocation
-
getPublicId
public String getPublicId()
- Specified by:
getPublicIdin interfaceLocation
-
getSystemId
public String getSystemId()
- Specified by:
getSystemIdin interfaceLocation
-
getContext
public XMLStreamLocation2 getContext()
Description copied from interface:XMLStreamLocation2Method 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:
getContextin interfaceXMLStreamLocation2- Returns:
- Location in the context (parent input source), if any; null for locations in the outermost known context
-
-