Package org.codehaus.stax2.ri
Class Stax2LocationAdapter
- java.lang.Object
-
- org.codehaus.stax2.ri.Stax2LocationAdapter
-
- All Implemented Interfaces:
Location,XMLStreamLocation2
public class Stax2LocationAdapter extends Object implements XMLStreamLocation2
Simple implementation ofXMLStreamLocation2, which just wraps Stax 1.0Locationand adds no-operation implementation of the additions.
-
-
Field Summary
Fields Modifier and Type Field Description protected LocationmParentLocationprotected LocationmWrappedLocation-
Fields inherited from interface org.codehaus.stax2.XMLStreamLocation2
NOT_AVAILABLE
-
-
Constructor Summary
Constructors Constructor Description Stax2LocationAdapter(Location loc)Stax2LocationAdapter(Location loc, Location parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCharacterOffset()intgetColumnNumber()XMLStreamLocation2getContext()Method that can be used to traverse nested locations, like ones created when expanding entities (especially external entities).intgetLineNumber()StringgetPublicId()StringgetSystemId()
-
-
-
Method Detail
-
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
-
-