Package org.eigenbase.xom.wrappers

# Class Annotator.LocInfo

java.lang.Object
org.eigenbase.xom.wrappers.Annotator.LocInfo

Enclosing class:
  `Annotator`

class Annotator.LocInfo extends Object

## Field Summary

Fields
Modifier and Type
Field
Description
`(package private) int`
`endTagEndPos`
`(package private) final int`
`seq`
Sequence in document, ordered by start position (prefix order)
`(package private) int`
`startTagEndPos`
`(package private) final int`
`startTagStartPos`
Node type, typically `Node.ELEMENT_NODE`.
`(package private) final int`
`type`

## Constructor Summary

Constructors
Constructor
Description
`LocInfo(int seq, int nodeType, int startTagStartPos)`
Creates a LocInfo.

## Method Summary

Modifier and Type
Method
Description
`String`
`getHeadText(String xml)`
Returns the fragment of source XML corresponding to the head tag of this element, if this is an element, otherwise the whole node.
`String`
`getText(boolean headOnly)`
Returns the text of this location.
`String`
`getText(String xml)`
Returns the fragment of source XML that this node encompasses.
`String`
`toString()`
`String`
`toString(Annotator annotator)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Details

### seq

final int seq
Sequence in document, ordered by start position (prefix order)

### startTagStartPos

final int startTagStartPos
Node type, typically `Node.ELEMENT_NODE`.

### type

final int type

### startTagEndPos

int startTagEndPos

### endTagEndPos

int endTagEndPos

## Constructor Details

### LocInfo

LocInfo(int seq, int nodeType, int startTagStartPos)
Creates a LocInfo.

Parameters:
  `seq` - Sequence number in document
  `nodeType` - Node type, typically `Node.ELEMENT_NODE`.
  `startTagStartPos` - Position of start of element

## Method Details

### toString

public String toString(Annotator annotator)

### getText

public String getText(String xml)
Returns the fragment of source XML that this node encompasses.

Parameters:
  `xml` - Whole source XML
Returns:
  fragment of source XML

### getHeadText

public String getHeadText(String xml)
Returns the fragment of source XML corresponding to the head tag of this element, if this is an element, otherwise the whole node.

Parameters:
  `xml` - Whole source XML
Returns:
  fragment of source XML

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### getText

public String getText(boolean headOnly)
Returns the text of this location. Specification as for `Location.getText(boolean)`.

Parameters:
  `headOnly` - Whether to return only the head of elements
Returns:
  Source text underlying a location