Package org.apache.uima.analysis_engine

Examples of org.apache.uima.analysis_engine.AnalysisEngineProcessException


      if (flow instanceof JCasFlow_ImplBase) {
        ((JCasFlow_ImplBase)flow).setJCas(view.getJCas());
      }
      return new FlowContainer(flow, this, aCAS);
    } catch (CASException e) {
      throw new AnalysisEngineProcessException(e);
    } finally {
      if (view != null) {
        ((CASImpl)view).restoreClassLoaderUnlockCas();
        view.setCurrentComponentInfo(null);
      }
View Full Code Here


      return new EmptyCasIterator();
    } catch (Exception e) {
      // log exception
      UIMAFramework.getLogger(CLASS_NAME).log(Level.SEVERE, "", e);
      // rethrow as AnalysisEngineProcessException
      throw new AnalysisEngineProcessException(e);
    } finally {
      mTimer.stopIt();
      getMBean().reportServiceCallTime((int) mTimer.getDuration());
      getMBean().incrementCASesProcessed();
    }
View Full Code Here

  public void batchProcessComplete() throws AnalysisEngineProcessException {
    try {
      getStub().callBatchProcessComplete();
    } catch (ResourceServiceException e) {
      throw new AnalysisEngineProcessException(e);
    }
  }
View Full Code Here

  public void collectionProcessComplete() throws AnalysisEngineProcessException {
    try {
      getStub().callCollectionProcessComplete();
    } catch (ResourceServiceException e) {
      throw new AnalysisEngineProcessException(e);
    }
  }
View Full Code Here

          ((CASImpl)view).restoreClassLoaderUnlockCas();
        }
        if (e instanceof AnalysisEngineProcessException) {
          throw (AnalysisEngineProcessException) e;
        } else {
          throw new AnalysisEngineProcessException(
                  AnalysisEngineProcessException.ANNOTATOR_EXCEPTION, null, e);
        }
      } catch (Error e) {  // out of memory error, for instance
        if (null != view) {
          view.setCurrentComponentInfo(null);
          ((CASImpl)view).restoreClassLoaderUnlockCas();
        }
        throw e;
      }

      // log end of event
      logger.logrb(Level.FINE, CLASS_NAME.getName(), "process", LOG_RESOURCE_BUNDLE,
              "UIMA_analysis_engine_process_end__FINE", resourceName);
    } catch (Exception e) {
      // log and rethrow exception
      logger.log(Level.SEVERE, "", e);
      if (e instanceof AnalysisEngineProcessException)
        throw (AnalysisEngineProcessException) e;
      else
        throw new AnalysisEngineProcessException(e);
    }
  }
View Full Code Here

  public void process(CAS aCAS) throws AnalysisEngineProcessException {
    // TODO Auto-generated method stub
    try {
      process(aCAS, null);
    } catch (AnnotatorProcessException e) {
      throw new AnalysisEngineProcessException(e);
    }
  }
View Full Code Here

      // log and rethrow exception
      getLogger().log(Level.SEVERE, "", e);
      if (e instanceof AnalysisEngineProcessException)
        throw (AnalysisEngineProcessException) e;
      else
        throw new AnalysisEngineProcessException(e);
    }
  }
View Full Code Here

      } catch (Exception e) {
        ((CASImpl)mInputCas).restoreClassLoaderUnlockCas();
        if (e instanceof AnalysisEngineProcessException) {
          throw (AnalysisEngineProcessException) e;
        }
        throw new AnalysisEngineProcessException(e);
      }
      finally {
        exitProcess();
      }
View Full Code Here

          ((CASImpl)mInputCas).restoreClassLoaderUnlockCas();
         
          if (e instanceof AnalysisEngineProcessException) {
            throw (AnalysisEngineProcessException) e;
          }
          throw new AnalysisEngineProcessException(e);
        }
      } finally {
        exitProcess();
      }
    }
View Full Code Here

      // log and rethrow exception
      logger.log(Level.SEVERE, "", e);
      if (e instanceof AnalysisEngineProcessException)
        throw (AnalysisEngineProcessException) e;
      else
        throw new AnalysisEngineProcessException(e);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.uima.analysis_engine.AnalysisEngineProcessException

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.