Package org.apache.uima.pear.util
Class UIMAUtil
java.lang.Object
org.apache.uima.pear.util.UIMAUtil
The
UIMAUtil class provides convenient methods for handling UIMA specific objects.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ExceptiongetLastErrorForXmlDesc(File xmlDescFile) Returns the last loggedExceptionobject associated with a given XML descriptor file.static ExceptiongetLastErrorForXmlDesc(URL xmlDescUrl) Returns the last loggedExceptionobject associated with a given XML descriptor URL.static StringidentifyUimaComponentCategory(File xmlDescFile) Identifies a given UIMA component/resource category based on its XML descriptor.static StringidentifyUimaComponentCategory(URL xmlDescUrl) Identifies a given UIMA component/resource category based on its XML descriptor.
-
Field Details
-
ANALYSIS_ENGINE_CTG
Analysis Engine- See Also:
-
CAS_CONSUMER_CTG
CAS Consumer- See Also:
-
CAS_INITIALIZER_CTG
CAS Initializer- See Also:
-
COLLECTION_READER_CTG
Collection Reader- See Also:
-
CPE_CONFIGURATION_CTG
CPE Configuration- See Also:
-
TYPE_SYSTEM_CTG
Type System- See Also:
-
REUSABLE_RESOURCE_CTG
Reusable Resource- See Also:
-
-
Constructor Details
-
UIMAUtil
public UIMAUtil()
-
-
Method Details
-
getLastErrorForXmlDesc
Returns the last loggedExceptionobject associated with a given XML descriptor file.- Parameters:
xmlDescFile- The given XML descriptor file.- Returns:
- The last logged
Exceptionobject associated with the given XML descriptor file.
-
getLastErrorForXmlDesc
Returns the last loggedExceptionobject associated with a given XML descriptor URL.- Parameters:
xmlDescUrl- The given XML descriptor URL.- Returns:
- The last logged
Exceptionobject associated with the given XML descriptor URL.
-
identifyUimaComponentCategory
Identifies a given UIMA component/resource category based on its XML descriptor. If succeeded, returns appropriate UIMA component category ID, otherwise returnsnull. If the UIMA component category cannot be identified based on the given XML descriptor file, the associated UIMA exception is logged and can be retrieved later by using thegetLastErrorForXmlDesc()method.- Parameters:
xmlDescFile- The given component XML descriptor file.- Returns:
- UIMA component category ID or
null, if the category cannot be identified based on the given XML descriptor file. - Throws:
IOException- If any I/O exception occurred.
-
identifyUimaComponentCategory
Identifies a given UIMA component/resource category based on its XML descriptor. If succeeded, returns appropriate UIMA component category ID, otherwise returnsnull. If the UIMA component category cannot be identified based on the given XML descriptor file, the associated UIMA exception is logged and can be retrieved later by using thegetLastErrorForXmlDesc()method.- Parameters:
xmlDescUrl- The given component XML descriptor URL.- Returns:
- UIMA component category ID or
null, if the category cannot be identified based on the given XML descriptor file. - Throws:
IOException- If any I/O exception occurred.
-