Package net.sf.okapi.common.filterwriter
Class ITSAnnotatorsRefContext
- java.lang.Object
-
- net.sf.okapi.common.filterwriter.ITSAnnotatorsRefContext
-
public class ITSAnnotatorsRefContext extends Object
Provides a set of generic functions to retrieve the ITS annotators reference information.
-
-
Constructor Summary
Constructors Constructor Description ITSAnnotatorsRefContext(XMLStreamReader reader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GenericAnnotationgetAnnotation()Gets an annotation for the current annotatorsRef string.StringgetAnnotatorRef(String dataCategory)Gets the IRI for a given data category, for the current content.Stringpeek()Gets the current annotatorsRef string.voidpop()Pops the current annotatorsRef from the context stack.voidreadAndPush()Reads and pushes the annotatorsRef information in the context stack.
-
-
-
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.
-
-