|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectopennlp.uima.util.CasConsumerUtil
public final class CasConsumerUtil
This is a util class for cas consumer.
Method Summary | |
---|---|
static void |
checkFeatureType(org.apache.uima.cas.Feature feature,
java.lang.String expectedType)
Checks if the given feature has the expected type otherwise an exception is thrown. |
static Dictionary |
createOptionalDictionary(org.apache.uima.UimaContext context,
java.lang.String parameter)
|
static java.lang.Boolean |
getOptionalBooleanParameter(org.apache.uima.UimaContext context,
java.lang.String parameter)
Retrieves an optional boolean parameter from the given context. |
static java.lang.Float |
getOptionalFloatParameter(org.apache.uima.UimaContext context,
java.lang.String parameter)
Retrieves an optional boolean parameter from the given context. |
static java.lang.Integer |
getOptionalIntegerParameter(org.apache.uima.UimaContext context,
java.lang.String parameter)
Retrieves an optional boolean parameter from the given context. |
static java.lang.Integer |
getOptionalIntegerParameter(org.apache.uima.UimaContext context,
java.lang.String parameter,
int defaultValue)
Retrieves an optional boolean parameter from the given context. |
static java.io.InputStream |
getOptionalResourceAsStream(org.apache.uima.UimaContext context,
java.lang.String name)
|
static java.lang.String[] |
getOptionalStringArrayParameter(org.apache.uima.UimaContext context,
java.lang.String parameter)
|
static java.lang.String |
getOptionalStringParameter(org.apache.uima.UimaContext context,
java.lang.String parameter)
Retrieves an optional boolean parameter from the given context. |
static org.apache.uima.cas.Type |
getOptionalType(org.apache.uima.cas.TypeSystem typeSystem,
java.lang.String name)
Retrieves a type from the given type system. |
static java.lang.Boolean |
getRequiredBooleanParameter(org.apache.uima.UimaContext context,
java.lang.String parameter)
Retrieves a required boolean parameter from the given context. |
static java.lang.Float |
getRequiredFloatParameter(org.apache.uima.UimaContext context,
java.lang.String parameter)
Retrieves a required parameter form the given context. |
static java.lang.Integer |
getRequiredIntegerParameter(org.apache.uima.UimaContext context,
java.lang.String parameter)
Retrieves a required parameter form the given context. |
static java.lang.String |
getRequiredStringParameter(org.apache.uima.UimaContext context,
java.lang.String parameter)
Retrieves a required parameter form the given context. |
static java.io.InputStream |
getResourceAsStream(org.apache.uima.UimaContext context,
java.lang.String name)
Retrieves a resource as stream from the given context. |
static org.apache.uima.cas.Type |
getType(org.apache.uima.cas.TypeSystem typeSystem,
java.lang.String name)
Retrieves a type from the given type system. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.io.InputStream getOptionalResourceAsStream(org.apache.uima.UimaContext context, java.lang.String name) throws org.apache.uima.resource.ResourceInitializationException
org.apache.uima.resource.ResourceInitializationException
public static java.io.InputStream getResourceAsStream(org.apache.uima.UimaContext context, java.lang.String name) throws org.apache.uima.resource.ResourceInitializationException
context
- name
-
org.apache.uima.analysis_engine.annotator.AnnotatorConfigurationException
org.apache.uima.resource.ResourceInitializationException
public static org.apache.uima.cas.Type getType(org.apache.uima.cas.TypeSystem typeSystem, java.lang.String name) throws org.apache.uima.resource.ResourceInitializationException
typeSystem
- name
-
org.apache.uima.resource.ResourceInitializationException
public static org.apache.uima.cas.Type getOptionalType(org.apache.uima.cas.TypeSystem typeSystem, java.lang.String name) throws org.apache.uima.resource.ResourceInitializationException
typeSystem
- name
-
org.apache.uima.resource.ResourceInitializationException
public static java.lang.String getRequiredStringParameter(org.apache.uima.UimaContext context, java.lang.String parameter) throws org.apache.uima.resource.ResourceInitializationException
context
- parameter
-
org.apache.uima.resource.ResourceInitializationException
public static java.lang.Integer getRequiredIntegerParameter(org.apache.uima.UimaContext context, java.lang.String parameter) throws org.apache.uima.resource.ResourceInitializationException
context
- parameter
-
org.apache.uima.resource.ResourceInitializationException
public static java.lang.Float getRequiredFloatParameter(org.apache.uima.UimaContext context, java.lang.String parameter) throws org.apache.uima.resource.ResourceInitializationException
context
- parameter
-
org.apache.uima.resource.ResourceInitializationException
public static java.lang.Boolean getRequiredBooleanParameter(org.apache.uima.UimaContext context, java.lang.String parameter) throws org.apache.uima.resource.ResourceInitializationException
context
- parameter
-
org.apache.uima.resource.ResourceInitializationException
public static java.lang.String getOptionalStringParameter(org.apache.uima.UimaContext context, java.lang.String parameter) throws org.apache.uima.resource.ResourceInitializationException
context
- parameter
-
org.apache.uima.resource.ResourceInitializationException
public static java.lang.String[] getOptionalStringArrayParameter(org.apache.uima.UimaContext context, java.lang.String parameter) throws org.apache.uima.resource.ResourceInitializationException
org.apache.uima.resource.ResourceInitializationException
public static java.lang.Integer getOptionalIntegerParameter(org.apache.uima.UimaContext context, java.lang.String parameter) throws org.apache.uima.resource.ResourceInitializationException
context
- parameter
-
org.apache.uima.resource.ResourceInitializationException
public static java.lang.Integer getOptionalIntegerParameter(org.apache.uima.UimaContext context, java.lang.String parameter, int defaultValue) throws org.apache.uima.resource.ResourceInitializationException
context
- parameter
- defaultValue
- value to use if the optional parameter is not set
org.apache.uima.resource.ResourceInitializationException
public static java.lang.Float getOptionalFloatParameter(org.apache.uima.UimaContext context, java.lang.String parameter) throws org.apache.uima.resource.ResourceInitializationException
context
- parameter
-
org.apache.uima.resource.ResourceInitializationException
public static java.lang.Boolean getOptionalBooleanParameter(org.apache.uima.UimaContext context, java.lang.String parameter) throws org.apache.uima.resource.ResourceInitializationException
context
- parameter
-
org.apache.uima.resource.ResourceInitializationException
public static void checkFeatureType(org.apache.uima.cas.Feature feature, java.lang.String expectedType) throws org.apache.uima.resource.ResourceInitializationException
feature
- expectedType
-
org.apache.uima.resource.ResourceInitializationException
- - if type does not matchpublic static Dictionary createOptionalDictionary(org.apache.uima.UimaContext context, java.lang.String parameter) throws org.apache.uima.resource.ResourceInitializationException
org.apache.uima.resource.ResourceInitializationException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |