org.apache.ctakes.necontexts
Class ContextAnnotatorTests

java.lang.Object
  extended by org.apache.ctakes.necontexts.ContextAnnotatorTests

public class ContextAnnotatorTests
extends java.lang.Object


Field Summary
(package private) static java.lang.String unexpectedParamValueMsg
           
 
Constructor Summary
ContextAnnotatorTests()
           
 
Method Summary
 void testLeftScopeTokens()
          This test tests ContextAnnotator.getLeftScopeTokens(JCas, Annotation, Annotation).
 void testMiddleScopeTokens()
          The test tests ContextAnnotator.getMiddleScopeTokens(JCas, Annotation).
 void testParseScopeOrder()
           
 void testRightScopeTokens()
          This test tests ContextAnnotator.getRightScopeTokens(JCas, Annotation, Annotation).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

unexpectedParamValueMsg

static java.lang.String unexpectedParamValueMsg
Constructor Detail

ContextAnnotatorTests

public ContextAnnotatorTests()
Method Detail

testLeftScopeTokens

public void testLeftScopeTokens()
                         throws org.apache.uima.resource.ResourceInitializationException,
                                org.apache.uima.analysis_engine.AnalysisEngineProcessException
This test tests ContextAnnotator.getLeftScopeTokens(JCas, Annotation, Annotation). The method takes in annotations for the focus and window so the descriptor file parameter settings for FocusAnnotationClass and WindowAnnotationClass are effectively ignored by the method. This means we can pass any annotation in as the focus and window test the results.

Throws:
org.apache.uima.resource.ResourceInitializationException
org.apache.uima.analysis_engine.AnalysisEngineProcessException
See Also:
ContextAnnotator.getLeftScopeContextAnnotations(JCas, Annotation, Annotation)

testRightScopeTokens

public void testRightScopeTokens()
                          throws org.apache.uima.resource.ResourceInitializationException,
                                 org.apache.uima.analysis_engine.AnalysisEngineProcessException
This test tests ContextAnnotator.getRightScopeTokens(JCas, Annotation, Annotation). The method takes in annotations for the focus and window so the descriptor file parameter settings for FocusAnnotationClass and WindowAnnotationClass are effectively ignored by the method. This means we can pass any annotation in as the focus and window test the results.

Throws:
org.apache.uima.resource.ResourceInitializationException
org.apache.uima.analysis_engine.AnalysisEngineProcessException
See Also:
ContextAnnotator.getRightScopeContextAnnotations(JCas, Annotation, Annotation)

testMiddleScopeTokens

public void testMiddleScopeTokens()
                           throws org.apache.uima.resource.ResourceInitializationException,
                                  org.apache.uima.analysis_engine.AnalysisEngineProcessException
The test tests ContextAnnotator.getMiddleScopeTokens(JCas, Annotation). The method takes in an annotation for the focus and so the descriptor file parameter setting for FocusAnnotationClass is effectively ignored by the method. This means we can pass any annotation in as the focus and test the results. Similarly, the WindowAnnotationClass can be ignored as this is used to determine the focus annotations before this method is called. However, the list of returned annotations will be of the type specified in the parameter TokenAnnotationClass.

Throws:
org.apache.uima.resource.ResourceInitializationException
org.apache.uima.analysis_engine.AnalysisEngineProcessException
See Also:
ContextAnnotator.getMiddleScopeContextAnnotations(JCas, Annotation)

testParseScopeOrder

public void testParseScopeOrder()
                         throws org.apache.uima.analysis_engine.annotator.AnnotatorConfigurationException
Throws:
org.apache.uima.analysis_engine.annotator.AnnotatorConfigurationException