Jet.Pat
Class NewAnnotationAction

java.lang.Object
  extended byJet.Pat.Action
      extended byJet.Pat.NewAnnotationAction

public class NewAnnotationAction
extends Action

the action (in a when statement) for creating a new annotation on a Document. If the spanVariable is null, the new annotation will span the portion of the document matched by the pattern; if spanVariable is a Variable bound to a Span, the new annotation will be over that Span; if it is bound to an Annotation, the new annotation will be over the same span..


Constructor Summary
NewAnnotationAction(java.io.StreamTokenizer tok)
          creates a NewAnnotationAction from the input processed by StreamTokenizer tok, which should have the form
add [type feature=value feature=value ...]
or
add [type feature=value feature=value ...] over spanVariable
NewAnnotationAction(java.lang.String tp, FeatureSet fs, Variable sv)
           
 
Method Summary
static void hideAnnotations(Document doc, java.lang.String type, Span span)
          hides (adds the 'hidden' feature) to all annotations of type type beginning at the starting position of span span.
 int perform(Document doc, PatternApplication patap)
          performs the action, adding the specified Annotation.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NewAnnotationAction

public NewAnnotationAction(java.lang.String tp,
                           FeatureSet fs,
                           Variable sv)

NewAnnotationAction

public NewAnnotationAction(java.io.StreamTokenizer tok)
                    throws java.io.IOException,
                           PatternSyntaxError
creates a NewAnnotationAction from the input processed by StreamTokenizer tok, which should have the form
add [type feature=value feature=value ...]
or
add [type feature=value feature=value ...] over spanVariable

Method Detail

perform

public int perform(Document doc,
                   PatternApplication patap)
performs the action, adding the specified Annotation. Returns the position of the end of the Annotation.

Specified by:
perform in class Action

hideAnnotations

public static void hideAnnotations(Document doc,
                                   java.lang.String type,
                                   Span span)
hides (adds the 'hidden' feature) to all annotations of type type beginning at the starting position of span span.


toString

public java.lang.String toString()
Specified by:
toString in class Action