Class UIMAUtil

java.lang.Object
org.apache.uima.pear.util.UIMAUtil

public class UIMAUtil extends Object
The UIMAUtil class provides convenient methods for handling UIMA specific objects.
  • Field Details

  • Constructor Details

    • UIMAUtil

      public UIMAUtil()
  • Method Details

    • getLastErrorForXmlDesc

      public static Exception getLastErrorForXmlDesc(File xmlDescFile)
      Returns the last logged Exception object associated with a given XML descriptor file.
      Parameters:
      xmlDescFile - The given XML descriptor file.
      Returns:
      The last logged Exception object associated with the given XML descriptor file.
    • getLastErrorForXmlDesc

      public static Exception getLastErrorForXmlDesc(URL xmlDescUrl)
      Returns the last logged Exception object associated with a given XML descriptor URL.
      Parameters:
      xmlDescUrl - The given XML descriptor URL.
      Returns:
      The last logged Exception object associated with the given XML descriptor URL.
    • identifyUimaComponentCategory

      public static String identifyUimaComponentCategory(File xmlDescFile) throws IOException
      Identifies a given UIMA component/resource category based on its XML descriptor. If succeeded, returns appropriate UIMA component category ID, otherwise returns null. 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 the getLastErrorForXmlDesc() 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

      public static String identifyUimaComponentCategory(URL xmlDescUrl) throws IOException
      Identifies a given UIMA component/resource category based on its XML descriptor. If succeeded, returns appropriate UIMA component category ID, otherwise returns null. 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 the getLastErrorForXmlDesc() 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.