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.private static StringidentifyUimaComponentCategory(File xmlDescFile, URL xmlDescUrl) Internal method that identifies a given UIMA component/resource category based on its XML descriptor, passed as File or URL.static StringidentifyUimaComponentCategory(URL xmlDescUrl) Identifies a given UIMA component/resource category based on its XML descriptor.
-
Field Details
-
ANALYSIS_ENGINE_CTG
-
CAS_CONSUMER_CTG
-
CAS_INITIALIZER_CTG
-
COLLECTION_READER_CTG
-
CPE_CONFIGURATION_CTG
-
TYPE_SYSTEM_CTG
-
REUSABLE_RESOURCE_CTG
-
__errTableByUri
-
-
Constructor Details
-
UIMAUtil
public UIMAUtil()
-
-
Method Details
-
getLastErrorForXmlDesc
-
getLastErrorForXmlDesc
-
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.
-
identifyUimaComponentCategory
private static String identifyUimaComponentCategory(File xmlDescFile, URL xmlDescUrl) throws IOException Internal method that identifies a given UIMA component/resource category based on its XML descriptor, passed as File or URL. 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.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.
-