net.sf.okapi.common.filterwriter

## Class ITSAnnotatorsRefContext

- java.lang.Object
- - net.sf.okapi.common.filterwriter.ITSAnnotatorsRefContext

-     public class ITSAnnotatorsRefContext
      extends java.lang.Object

  Provides a set of generic functions to retrieve the ITS annotators reference information.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ITSAnnotatorsRefContext(javax.xml.stream.XMLStreamReader reader)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `GenericAnnotation` | `getAnnotation()` Gets an annotation for the current annotatorsRef string.
    `java.lang.String` | `getAnnotatorRef(java.lang.String dataCategory)` Gets the IRI for a given data category, for the current content.
    `java.lang.String` | `peek()` Gets the current annotatorsRef string.
    `void` | `pop()` Pops the current annotatorsRef from the context stack.
    `void` | `readAndPush()` Reads and pushes the annotatorsRef information in the context stack.

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

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

- - ### Constructor Detail

    - #### ITSAnnotatorsRefContext

          public ITSAnnotatorsRefContext(javax.xml.stream.XMLStreamReader reader)

  - ### Method Detail

    - #### readAndPush

          public void readAndPush()

      Reads and pushes the annotatorsRef information in the context stack.

      The method looks if there is an ITS annotatorsRef attribute in the current node of the provided reader (the node is assumed to be an element) and uses it if present. It uses the parent context otherwise.

    - #### pop

          public void pop()

      Pops the current annotatorsRef from the context stack.

    - #### peek

          public java.lang.String peek()

      Gets the current annotatorsRef string.
      Returns:
        the current annotatorsRef string (can be null).

    - #### getAnnotation

          public GenericAnnotation getAnnotation()

      Gets an annotation for the current annotatorsRef string.
      Returns:
        a new annotation for the current annotatorsRef string or null.

    - #### getAnnotatorRef

          public java.lang.String getAnnotatorRef(java.lang.String dataCategory)

      Gets the IRI for a given data category, for the current content.
      Parameters:
        `dataCategory` - the data category to look up.
      Returns:
        the IRI for the given data, or null.