Interface Location


  • public interface Location
    Provides 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
      Location copy()
      Create a new copy of this instance
      int getCharacterOffset()
      Return the byte or character offset into the input source this location is pointing to.
      int getColumnNumber()
      Return the column number where the current event ends, returns -1 if none is available.
      int getComponentPosition()
      Return the component data element position within the current composite data element, returns -1 if none is available.
      int getElementOccurrence()
      Return the current occurrence number of a repeating data element, returns 1 for non-repeating elements and -1 if otherwise not available.
      int getElementPosition()
      Return the element position within the current segment, returns -1 if none is available.
      int getLineNumber()
      Return the line number where the current event ends, returns -1 if none is available.
      int getSegmentPosition()
      Return the segment position within the current stream, returns -1 if none is available.
      String getSegmentTag()
      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
      • copy

        Location copy()
        Create a new copy of this instance
        Returns:
        a new Location instance with the same values of the instance being copied
        Since:
        1.11