Package org.apache.uima

Examples of org.apache.uima.UIMARuntimeException


   */
  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 (mCachedMetaData == null) {
        mCachedMetaData = getStub().callGetMetaData();
      }
      return mCachedMetaData;
    } catch (ResourceServiceException e) {
      throw new UIMARuntimeException(e);
    }
  }
View Full Code Here

      // define CAS Pool in the CasManager
      try {
        getResourceManager().getCasManager().defineCasPool(this, mCasPoolSize,
                mPerformanceTuningSettings);
      } catch (ResourceInitializationException e) {
        throw new UIMARuntimeException(e);
      }
      mCasPoolCreated = true;
    }

    //check if component has exceeded its CAS pool
    if (mOutstandingCASes.size() == mCasPoolSize) {
      throw new UIMARuntimeException(UIMARuntimeException.REQUESTED_TOO_MANY_CAS_INSTANCES,
              new Object[] { getQualifiedContextName(), Integer.toString(mCasPoolSize + 1),
                  Integer.toString(mCasPoolSize) });
    }
    CasManager casManager = getResourceManager().getCasManager();
//    CAS cas = casManager.getCas(getQualifiedContextName());
View Full Code Here

  public XMLInputSource(InputStream aInputStream, File aRelativePathBase) {
    mInputStream = aInputStream;
    try {
      mURL = aRelativePathBase == null ? null : aRelativePathBase.toURL();
    } catch (MalformedURLException e) {
      throw new UIMARuntimeException(e);
    }
  }
View Full Code Here

  protected Map<String, ResourceSpecifier> _getComponentCasProcessorSpecifierMap() {
    try {
      return mDescription.getDelegateAnalysisEngineSpecifiers();
    } catch (InvalidXMLException e) {
      // this should not happen, because we resolve delegates during initialization
      throw new UIMARuntimeException(e);
    }
  }
View Full Code Here

    InputStream is = AnnotationViewGenerator.class.getResourceAsStream(filename);
    Templates templates;
    try {
      templates = mTFactory.newTemplates(new StreamSource(is));
    } catch (TransformerConfigurationException e) {
      throw new UIMARuntimeException(e);
    } finally {
      try {
        is.close();
      } catch (IOException e) {
        // ignore close errors
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.