com.fasterxml.aalto
Class LocationImpl

java.lang.Object
  extended by com.fasterxml.aalto.LocationImpl
All Implemented Interfaces:
javax.xml.stream.Location, org.codehaus.stax2.XMLStreamLocation2

public class LocationImpl
extends java.lang.Object
implements org.codehaus.stax2.XMLStreamLocation2

Basic implementation of XMLStreamLocation2, used by stream readers and writers.


Constructor Summary
LocationImpl(java.lang.String pubId, java.lang.String sysId, int charOffset, int row, int col)
           
 
Method Summary
static LocationImpl fromZeroBased(java.lang.String pubId, java.lang.String sysId, int rawOffset, int rawRow, int rawCol)
          Helper method that will adjust given internal zero-based values to 1-based values that should be externally visible.
 int getCharacterOffset()
           
 int getColumnNumber()
           
 org.codehaus.stax2.XMLStreamLocation2 getContext()
           
static LocationImpl getEmptyLocation()
           
 int getLineNumber()
           
 java.lang.String getPublicId()
           
 java.lang.String getSystemId()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocationImpl

public LocationImpl(java.lang.String pubId,
                    java.lang.String sysId,
                    int charOffset,
                    int row,
                    int col)
Method Detail

fromZeroBased

public static LocationImpl fromZeroBased(java.lang.String pubId,
                                         java.lang.String sysId,
                                         int rawOffset,
                                         int rawRow,
                                         int rawCol)
Helper method that will adjust given internal zero-based values to 1-based values that should be externally visible.


getEmptyLocation

public static LocationImpl 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 org.codehaus.stax2.XMLStreamLocation2 getContext()
Specified by:
getContext in interface org.codehaus.stax2.XMLStreamLocation2

toString

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