-
public interface LocationProvides information on the location of an event. All the information provided by a Location is optional. For example an application may only report line numbers.- Version:
- 1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetCharacterOffset()Return the byte or character offset into the input source this location is pointing to.intgetColumnNumber()Return the column number where the current event ends, returns -1 if none is available.intgetComponentPosition()Return the component data element position within the current composite data element, returns -1 if none is available.intgetElementOccurrence()Return the current occurrence number of a repeating data element, returns 1 for non-repeating elements and -1 if otherwise not available.intgetElementPosition()Return the element position within the current segment, returns -1 if none is available.intgetLineNumber()Return the line number where the current event ends, returns -1 if none is available.intgetSegmentPosition()Return the segment position within the current stream, returns -1 if none is available.StringgetSegmentTag()Return the segment tag within the current stream, returns null if none is available.
-
-
-
Method Detail
-
getLineNumber
int getLineNumber()
Return the line number where the current event ends, returns -1 if none is available.- Returns:
- the current line number
-
getColumnNumber
int getColumnNumber()
Return the column number where the current event ends, returns -1 if none is available.- Returns:
- the current column number
-
getCharacterOffset
int getCharacterOffset()
Return the byte or character offset into the input source this location is pointing to. If the input source is a file or a byte stream then this is the byte offset into that stream, but if the input source is a character media then the offset is the character offset. Returns -1 if there is no offset available.- Returns:
- the current offset
-
getSegmentPosition
int getSegmentPosition()
Return the segment position within the current stream, returns -1 if none is available.- Returns:
- the current segment position
-
getSegmentTag
String getSegmentTag()
Return the segment tag within the current stream, returns null if none is available.- Returns:
- the current segment tag
-
getElementPosition
int getElementPosition()
Return the element position within the current segment, returns -1 if none is available.- Returns:
- the current element position
-
getElementOccurrence
int getElementOccurrence()
Return the current occurrence number of a repeating data element, returns 1 for non-repeating elements and -1 if otherwise not available.- Returns:
- the current element occurrence
-
getComponentPosition
int getComponentPosition()
Return the component data element position within the current composite data element, returns -1 if none is available.- Returns:
- the current component element position
-
-