Interface OffsetInformation


  • @API(type=NOT_EXTENDABLE,
         src=PUBLIC)
    public interface OffsetInformation
    Information about the node which contains the offset. If the offset is on a marker character the returned result will also contain the node which contains the range indicated by the marker.
    Offset information.
    The author content contains the entire XML document text and special marker characters. Each author node points in the content to the start and end marker characters which are used to delimit it's range. The start and end offsets pointed to by the AuthorNode can be retrieved using the AuthorNode.getStartOffset() and AuthorNode.getEndOffset() The image represents part of the document content and red markers represent special control characters which represent the node ranges.
    Since:
    12.2
    • Field Detail

      • IN_CONTENT

        static final int IN_CONTENT
        The offset is in character content.
        See Also:
        Constant Field Values
      • ON_START_MARKER

        static final int ON_START_MARKER
        The offset is on the marker representing the start range of a node.
        See Also:
        Constant Field Values
      • ON_END_MARKER

        static final int ON_END_MARKER
        The offset is on the marker representing the end range of a node.
        See Also:
        Constant Field Values
    • Method Detail

      • getNodeForMarkerOffset

        AuthorNode getNodeForMarkerOffset()

        If the offset is on a marker character this method returns the node which contains the marker. Example on the situations when this method returns a node:


        Offset information.
        Returns:
        If the offset is on a marker character this method returns the node which contains the marker.
      • getNodeForOffset

        AuthorNode getNodeForOffset()
        Returns the parent node for the given offset. Never null.
        Returns:
        the parent node for the given offset. Never null.
      • getPositionType

        int getPositionType()
        Get the type of position the offset has. It returns one of the constants: IN_CONTENT or ON_START_MARKER or ON_END_MARKER
        Returns:
        the type of position for the offset.