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.
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.

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 Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The offset is in character content.static final int
The offset is on the marker representing the end range of a node.static final int
The offset is on the marker representing the start range of a node. -
Method Summary
Modifier and TypeMethodDescriptionIf the offset is on a marker character this method returns the node which contains the marker.Returns the parent node for the given offset.int
Get the type of position the offset has.
-
Field Details
-
IN_CONTENT
static final int IN_CONTENTThe offset is in character content.- See Also:
-
ON_START_MARKER
static final int ON_START_MARKERThe offset is on the marker representing the start range of a node.- See Also:
-
ON_END_MARKER
static final int ON_END_MARKERThe offset is on the marker representing the end range of a node.- See Also:
-
-
Method Details
-
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:
- 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. Nevernull
.- 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
orON_START_MARKER
orON_END_MARKER
- Returns:
- the type of position for the offset.
-