Class ITSAnnotatorsRefContext


  • public class ITSAnnotatorsRefContext
    extends Object
    Provides a set of generic functions to retrieve the ITS annotators reference information.
    • Constructor Detail

      • ITSAnnotatorsRefContext

        public ITSAnnotatorsRefContext​(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 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 String getAnnotatorRef​(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.