Package org.codehaus.stax2.ri
Class Stax2LocationAdapter
- java.lang.Object
-
- org.codehaus.stax2.ri.Stax2LocationAdapter
-
- All Implemented Interfaces:
javax.xml.stream.Location
,XMLStreamLocation2
public class Stax2LocationAdapter extends java.lang.Object implements XMLStreamLocation2
Simple implementation ofXMLStreamLocation2
, which just wraps Stax 1.0Location
and adds no-operation implementation of the additions.
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.xml.stream.Location
mParentLocation
protected javax.xml.stream.Location
mWrappedLocation
-
Fields inherited from interface org.codehaus.stax2.XMLStreamLocation2
NOT_AVAILABLE
-
-
Constructor Summary
Constructors Constructor Description Stax2LocationAdapter(javax.xml.stream.Location loc)
Stax2LocationAdapter(javax.xml.stream.Location loc, javax.xml.stream.Location parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCharacterOffset()
int
getColumnNumber()
XMLStreamLocation2
getContext()
Method that can be used to traverse nested locations, like ones created when expanding entities (especially external entities).int
getLineNumber()
java.lang.String
getPublicId()
java.lang.String
getSystemId()
-
-
-
Method Detail
-
getCharacterOffset
public int getCharacterOffset()
- Specified by:
getCharacterOffset
in interfacejavax.xml.stream.Location
-
getColumnNumber
public int getColumnNumber()
- Specified by:
getColumnNumber
in interfacejavax.xml.stream.Location
-
getLineNumber
public int getLineNumber()
- Specified by:
getLineNumber
in interfacejavax.xml.stream.Location
-
getPublicId
public java.lang.String getPublicId()
- Specified by:
getPublicId
in interfacejavax.xml.stream.Location
-
getSystemId
public java.lang.String getSystemId()
- Specified by:
getSystemId
in interfacejavax.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 interfaceXMLStreamLocation2
- Returns:
- Location in the context (parent input source), if any; null for locations in the outermost known context
-
-