Class AnnotationPipeline

  • All Implemented Interfaces:
    Serializable

    public class AnnotationPipeline
    extends Object
    implements Serializable
    Helper class for determining the correct sequence of annotators to apply on a Document in order for to satisfy the given AnnotatableType.
    Author:
    David B. Bracewell
    See Also:
    Serialized Form
    • Constructor Detail

      • AnnotationPipeline

        public AnnotationPipeline​(@NonNull
                                  @NonNull AnnotatableType... types)
        Instantiates a new AnnotationPipeline with the given set of annotatable types to be annotated.
        Parameters:
        types - the AnnotatableType we want to the document to have
      • AnnotationPipeline

        public AnnotationPipeline​(@NonNull
                                  @NonNull Collection<? extends AnnotatableType> types)
        Instantiates a new AnnotationPipeline with the given set of annotatable types to be annotated.
        Parameters:
        types - the AnnotatableType we want to the document to have
    • Method Detail

      • annotate

        public boolean annotate​(@NonNull
                                @NonNull Document document)
        Annotates a document to fulfill the desired set of annotatable types
        Parameters:
        document - the document to annotate
        Returns:
        true if the document was modified, false otherwise
      • requiresUpdate

        public boolean requiresUpdate()
        Returns:
        true if the Pipeline has AnnotatableType to annotate, False if not