Package opennlp.uima.util
Class AnnotatorUtil
- java.lang.Object
- 
- opennlp.uima.util.AnnotatorUtil
 
- 
 public final class AnnotatorUtil extends Object This is a utility class for Annotators.
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static opennlp.tools.dictionary.DictionarycreateOptionalDictionary(org.apache.uima.UimaContext context, String dictionaryParameter)static BooleangetOptionalBooleanParameter(org.apache.uima.UimaContext context, String parameter)Retrieves an optional parameter from the given context.static org.apache.uima.cas.FeaturegetOptionalFeature(org.apache.uima.cas.Type type, String featureName, String rangeType)static org.apache.uima.cas.FeaturegetOptionalFeatureParameter(org.apache.uima.UimaContext context, org.apache.uima.cas.Type nameType, String featureNameParameter, String rangeTypeName)static FloatgetOptionalFloatParameter(org.apache.uima.UimaContext context, String parameter)Retrieves an optional parameter from the given context.static IntegergetOptionalIntegerParameter(org.apache.uima.UimaContext context, String parameter)Retrieves an optional parameter from the given context.static InputStreamgetOptionalResourceAsStream(org.apache.uima.UimaContext context, String name)static String[]getOptionalStringArrayParameter(org.apache.uima.UimaContext context, String parameter)static StringgetOptionalStringParameter(org.apache.uima.UimaContext context, String parameter)Retrieves an optional parameter from the given context.static org.apache.uima.cas.TypegetOptionalTypeParameter(org.apache.uima.UimaContext context, org.apache.uima.cas.TypeSystem typeSystem, String parameter)static BooleangetRequiredBooleanParameter(org.apache.uima.UimaContext context, String parameter)Retrieves a required parameter from the given context.static org.apache.uima.cas.FeaturegetRequiredFeature(org.apache.uima.cas.Type type, String featureName)static org.apache.uima.cas.FeaturegetRequiredFeature(org.apache.uima.cas.Type type, String featureName, String rangeType)Retrieves a required feature from the given type.static org.apache.uima.cas.FeaturegetRequiredFeatureParameter(org.apache.uima.UimaContext context, org.apache.uima.cas.Type type, String featureNameParameter)static org.apache.uima.cas.FeaturegetRequiredFeatureParameter(org.apache.uima.UimaContext context, org.apache.uima.cas.Type type, String featureNameParameter, String rangeTypeName)static FloatgetRequiredFloatParameter(org.apache.uima.UimaContext context, String parameter)Retrieves a required parameter from the given context.static IntegergetRequiredIntegerParameter(org.apache.uima.UimaContext context, String parameter)Retrieves a required parameter from the given context.static StringgetRequiredStringParameter(org.apache.uima.UimaContext context, String parameter)Retrieves a required parameter from the given context.static org.apache.uima.cas.TypegetRequiredTypeParameter(org.apache.uima.UimaContext context, org.apache.uima.cas.TypeSystem typeSystem, String parameter)static InputStreamgetResourceAsStream(org.apache.uima.UimaContext context, String name)Retrieves a resource as stream from the given context.static org.apache.uima.cas.TypegetType(org.apache.uima.cas.TypeSystem typeSystem, String name)Retrieves a type of the given name from the given type system.
 
- 
- 
- 
Method Detail- 
getTypepublic static org.apache.uima.cas.Type getType(org.apache.uima.cas.TypeSystem typeSystem, String name) throws org.apache.uima.analysis_engine.AnalysisEngineProcessExceptionRetrieves a type of the given name from the given type system.- Parameters:
- typeSystem-
- name-
- Returns:
- the type
- Throws:
- org.apache.uima.analysis_engine.AnalysisEngineProcessException
 
 - 
getRequiredFeaturepublic static org.apache.uima.cas.Feature getRequiredFeature(org.apache.uima.cas.Type type, String featureName) throws org.apache.uima.analysis_engine.AnalysisEngineProcessException- Throws:
- org.apache.uima.analysis_engine.AnalysisEngineProcessException
 
 - 
getRequiredFeaturepublic static org.apache.uima.cas.Feature getRequiredFeature(org.apache.uima.cas.Type type, String featureName, String rangeType) throws org.apache.uima.analysis_engine.AnalysisEngineProcessExceptionRetrieves a required feature from the given type.- Parameters:
- type- the type
- featureName- the name of the feature
- rangeType- the expected range type
- Returns:
- the requested parameter
- Throws:
- org.apache.uima.analysis_engine.AnalysisEngineProcessException
 
 - 
getRequiredFeatureParameterpublic static org.apache.uima.cas.Feature getRequiredFeatureParameter(org.apache.uima.UimaContext context, org.apache.uima.cas.Type type, String featureNameParameter) throws org.apache.uima.analysis_engine.AnalysisEngineProcessException- Throws:
- org.apache.uima.analysis_engine.AnalysisEngineProcessException
 
 - 
getRequiredFeatureParameterpublic static org.apache.uima.cas.Feature getRequiredFeatureParameter(org.apache.uima.UimaContext context, org.apache.uima.cas.Type type, String featureNameParameter, String rangeTypeName) throws org.apache.uima.analysis_engine.AnalysisEngineProcessException- Throws:
- org.apache.uima.analysis_engine.AnalysisEngineProcessException
 
 - 
getRequiredTypeParameterpublic static org.apache.uima.cas.Type getRequiredTypeParameter(org.apache.uima.UimaContext context, org.apache.uima.cas.TypeSystem typeSystem, String parameter) throws org.apache.uima.analysis_engine.AnalysisEngineProcessException- Throws:
- org.apache.uima.analysis_engine.AnalysisEngineProcessException
 
 - 
getRequiredStringParameterpublic static String getRequiredStringParameter(org.apache.uima.UimaContext context, String parameter) throws org.apache.uima.resource.ResourceInitializationException Retrieves a required parameter from the given context.- Parameters:
- context-
- parameter-
- Returns:
- the requested parameter
- Throws:
- org.apache.uima.resource.ResourceInitializationException
 
 - 
getRequiredIntegerParameterpublic static Integer getRequiredIntegerParameter(org.apache.uima.UimaContext context, String parameter) throws org.apache.uima.resource.ResourceInitializationException Retrieves a required parameter from the given context.- Parameters:
- context-
- parameter-
- Returns:
- the requested parameter
- Throws:
- org.apache.uima.resource.ResourceInitializationException
 
 - 
getRequiredFloatParameterpublic static Float getRequiredFloatParameter(org.apache.uima.UimaContext context, String parameter) throws org.apache.uima.resource.ResourceInitializationException Retrieves a required parameter from the given context.- Parameters:
- context-
- parameter-
- Returns:
- the requested parameter
- Throws:
- org.apache.uima.resource.ResourceInitializationException
 
 - 
getRequiredBooleanParameterpublic static Boolean getRequiredBooleanParameter(org.apache.uima.UimaContext context, String parameter) throws org.apache.uima.resource.ResourceInitializationException Retrieves a required parameter from the given context.- Parameters:
- context-
- parameter-
- Returns:
- the requested parameter
- Throws:
- org.apache.uima.resource.ResourceInitializationException
 
 - 
getOptionalFeatureParameterpublic static org.apache.uima.cas.Feature getOptionalFeatureParameter(org.apache.uima.UimaContext context, org.apache.uima.cas.Type nameType, String featureNameParameter, String rangeTypeName) throws org.apache.uima.analysis_engine.AnalysisEngineProcessException- Throws:
- org.apache.uima.analysis_engine.AnalysisEngineProcessException
 
 - 
getOptionalFeaturepublic static org.apache.uima.cas.Feature getOptionalFeature(org.apache.uima.cas.Type type, String featureName, String rangeType) throws org.apache.uima.analysis_engine.AnalysisEngineProcessException- Throws:
- org.apache.uima.analysis_engine.AnalysisEngineProcessException
 
 - 
getOptionalTypeParameterpublic static org.apache.uima.cas.Type getOptionalTypeParameter(org.apache.uima.UimaContext context, org.apache.uima.cas.TypeSystem typeSystem, String parameter) throws org.apache.uima.analysis_engine.AnalysisEngineProcessException- Throws:
- org.apache.uima.analysis_engine.AnalysisEngineProcessException
 
 - 
getOptionalStringParameterpublic static String getOptionalStringParameter(org.apache.uima.UimaContext context, String parameter) throws org.apache.uima.resource.ResourceInitializationException Retrieves an optional parameter from the given context.- Parameters:
- context-
- parameter-
- Returns:
- the parameter or null if not set
- Throws:
- org.apache.uima.resource.ResourceInitializationException
 
 - 
getOptionalStringArrayParameterpublic static String[] getOptionalStringArrayParameter(org.apache.uima.UimaContext context, String parameter) throws org.apache.uima.resource.ResourceInitializationException - Throws:
- org.apache.uima.resource.ResourceInitializationException
 
 - 
getOptionalIntegerParameterpublic static Integer getOptionalIntegerParameter(org.apache.uima.UimaContext context, String parameter) throws org.apache.uima.resource.ResourceInitializationException Retrieves an optional parameter from the given context.- Parameters:
- context-
- parameter-
- Returns:
- the parameter or null if not set
- Throws:
- org.apache.uima.resource.ResourceInitializationException
 
 - 
getOptionalFloatParameterpublic static Float getOptionalFloatParameter(org.apache.uima.UimaContext context, String parameter) throws org.apache.uima.resource.ResourceInitializationException Retrieves an optional parameter from the given context.- Parameters:
- context-
- parameter-
- Returns:
- the parameter or null if not set
- Throws:
- org.apache.uima.resource.ResourceInitializationException
 
 - 
getOptionalBooleanParameterpublic static Boolean getOptionalBooleanParameter(org.apache.uima.UimaContext context, String parameter) throws org.apache.uima.resource.ResourceInitializationException Retrieves an optional parameter from the given context.- Parameters:
- context-
- parameter-
- Returns:
- the parameter or null if not set
- Throws:
- org.apache.uima.resource.ResourceInitializationException
 
 - 
getResourceAsStreampublic static InputStream getResourceAsStream(org.apache.uima.UimaContext context, String name) throws org.apache.uima.resource.ResourceInitializationException Retrieves a resource as stream from the given context.- Parameters:
- context-
- name-
- Returns:
- the stream
- Throws:
- org.apache.uima.resource.ResourceInitializationException
 
 - 
getOptionalResourceAsStreampublic static InputStream getOptionalResourceAsStream(org.apache.uima.UimaContext context, String name) throws org.apache.uima.resource.ResourceInitializationException - Throws:
- org.apache.uima.resource.ResourceInitializationException
 
 - 
createOptionalDictionarypublic static opennlp.tools.dictionary.Dictionary createOptionalDictionary(org.apache.uima.UimaContext context, String dictionaryParameter) throws org.apache.uima.resource.ResourceInitializationException- Throws:
- org.apache.uima.resource.ResourceInitializationException
 
 
- 
 
-