org.apache.uima.annotator.bsf
Class BSFAnnotator

java.lang.Object
  extended by org.apache.uima.analysis_component.AnalysisComponent_ImplBase
      extended by org.apache.uima.analysis_component.Annotator_ImplBase
          extended by org.apache.uima.analysis_component.JCasAnnotator_ImplBase
              extended by org.apache.uima.annotator.bsf.BSFAnnotator
All Implemented Interfaces:
org.apache.uima.analysis_component.AnalysisComponent

public class BSFAnnotator
extends org.apache.uima.analysis_component.JCasAnnotator_ImplBase

This class enables the Java scripting of an Annotator using the Apache Bean Scripting Framework. It has a mandatory SourceFile attribute containing the script's source file to execute.


Field Summary
static String MESSAGE_DIGEST
           
static String PATH_SEPARATOR
           
static String SCRIPT_SOURCE_FILE
           
 
Constructor Summary
BSFAnnotator()
           
 
Method Summary
 void initialize(org.apache.uima.UimaContext aContext)
          Initializes the annotator by compiling the script.
 void process(org.apache.uima.jcas.JCas jcas)
          Call the process function implemented in the script
 
Methods inherited from class org.apache.uima.analysis_component.JCasAnnotator_ImplBase
getRequiredCasInterface, process
 
Methods inherited from class org.apache.uima.analysis_component.Annotator_ImplBase
getCasInstancesRequired, hasNext, next
 
Methods inherited from class org.apache.uima.analysis_component.AnalysisComponent_ImplBase
batchProcessComplete, collectionProcessComplete, destroy, getContext, getResultSpecification, reconfigure, setResultSpecification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MESSAGE_DIGEST

public static final String MESSAGE_DIGEST
See Also:
Constant Field Values

PATH_SEPARATOR

public static final String PATH_SEPARATOR

SCRIPT_SOURCE_FILE

public static final String SCRIPT_SOURCE_FILE
See Also:
Constant Field Values
Constructor Detail

BSFAnnotator

public BSFAnnotator()
Method Detail

initialize

public void initialize(org.apache.uima.UimaContext aContext)
                throws org.apache.uima.resource.ResourceInitializationException
Initializes the annotator by compiling the script.

Specified by:
initialize in interface org.apache.uima.analysis_component.AnalysisComponent
Overrides:
initialize in class org.apache.uima.analysis_component.AnalysisComponent_ImplBase
Throws:
org.apache.uima.resource.ResourceInitializationException

process

public void process(org.apache.uima.jcas.JCas jcas)
             throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
Call the process function implemented in the script

Specified by:
process in class org.apache.uima.analysis_component.JCasAnnotator_ImplBase
Throws:
org.apache.uima.analysis_engine.AnalysisEngineProcessException


Copyright © 2006-2011 The Apache Software Foundation. All Rights Reserved.