Package org.apache.uima

Examples of org.apache.uima.UIMARuntimeException


        // get static method getInstance(Class component)
        Method instanceMethod = mLoggerClass.getMethod("getInstance", argumentTypes);
        // invoke getInstance(Class component) method and retrieve logger object
        o = instanceMethod.invoke(null, arguments);
      } catch (NoSuchMethodException e) {
        throw new UIMARuntimeException(e);
      } catch (InvocationTargetException e) {
        throw new UIMARuntimeException(e);
      } catch (IllegalAccessException e) {
        throw new UIMARuntimeException(e);
      }

      // put created logger to the HashMap
      mLoggers.put(component.getName(), o);
    }
View Full Code Here


      // get static method getInstance()
      Method instanceMethod = mLoggerClass.getMethod("getInstance", new Class[0]);
      // invoke getInstance() method and retrieve default logger object
      return (Logger) instanceMethod.invoke(null, new Class[0]);
    } catch (NoSuchMethodException e) {
      throw new UIMARuntimeException(e);
    } catch (InvocationTargetException e) {
      throw new UIMARuntimeException(e);
    } catch (IllegalAccessException e) {
      throw new UIMARuntimeException(e);
    }
  }
View Full Code Here

   */
  protected ResourceManager _newDefaultResourceManager() {
    try {
      return (ResourceManager) Class.forName(mResourceManagerImplClassName).newInstance();
    } catch (InstantiationException e) {
      throw new UIMARuntimeException(e);
    } catch (IllegalAccessException e) {
      throw new UIMARuntimeException(e);
    } catch (ClassNotFoundException e) {
      throw new UIMARuntimeException(e);
    }
  }
View Full Code Here

   */
  protected ConfigurationManager _newConfigurationManager() {
    try {
      return (ConfigurationManager) Class.forName(mConfigurationManagerImplClassName).newInstance();
    } catch (InstantiationException e) {
      throw new UIMARuntimeException(e);
    } catch (IllegalAccessException e) {
      throw new UIMARuntimeException(e);
    } catch (ClassNotFoundException e) {
      throw new UIMARuntimeException(e);
    }
  }
View Full Code Here

   */
  protected UimaContextAdmin _newUimaContext() {
    try {
      return (UimaContextAdmin) Class.forName(mUimaContextImplClassName).newInstance();
    } catch (InstantiationException e) {
      throw new UIMARuntimeException(e);
    } catch (IllegalAccessException e) {
      throw new UIMARuntimeException(e);
    } catch (ClassNotFoundException e) {
      throw new UIMARuntimeException(e);
    }
  }
View Full Code Here

   */
  protected UimaTimer _newTimer() {
    try {
      return (UimaTimer) Class.forName(mTimerClassName).newInstance();
    } catch (InstantiationException e) {
      throw new UIMARuntimeException(e);
    } catch (IllegalAccessException e) {
      throw new UIMARuntimeException(e);
    } catch (ClassNotFoundException e) {
      throw new UIMARuntimeException(e);
    }
  }
View Full Code Here

      CollectionProcessingEngine cpe = (CollectionProcessingEngine) Class.forName(mCpeClassName)
              .newInstance();
      cpe.initialize(aCpeDescription, aAdditionalParams);
      return cpe;
    } catch (InstantiationException e) {
      throw new UIMARuntimeException(e);
    } catch (IllegalAccessException e) {
      throw new UIMARuntimeException(e);
    } catch (ClassNotFoundException e) {
      throw new UIMARuntimeException(e);
    }
  }
View Full Code Here

    /**
     * @see org.xml.sax.ErrorHandler#error(org.xml.sax.SAXParseException)
     */
    public void error(SAXParseException e) throws SAXException {
      throw new UIMARuntimeException(e);
    }
View Full Code Here

    if (aEcoreType.eIsProxy()) {
      // try to resolve
      aEcoreType = (EClassifier) EcoreUtil.resolve(aEcoreType, aEcoreType);
      if (aEcoreType.eIsProxy()) {
        throw new UIMARuntimeException(UIMARuntimeException.ECORE_UNRESOLVED_PROXY,
                new Object[] { aEcoreType.toString() });
      }
    }

    if (aEcoreType instanceof EClass || aEcoreType instanceof EEnum) {
View Full Code Here

      handler.endDocument();

      // return XML string
      return new String(byteArrayOutputStream.toByteArray(),"UTF-8");
    } catch (SAXException e) {
      throw new UIMARuntimeException(e);
    } catch (UnsupportedEncodingException e) {
      throw new UIMARuntimeException(e);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.uima.UIMARuntimeException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.