Package org.apache.uima.cas

Examples of org.apache.uima.cas.AbstractCas


   * @return CAS returned by the analysis component
   */
  protected CAS callAnalysisComponentNext() throws AnalysisEngineProcessException,
          ResultNotSupportedException {
    try {
      AbstractCas absCas = mAnnotator.next();
      getMBean().incrementCASesProcessed();
      // notify UimaContext that a CAS was returned -- it uses
      // this information to track how many CASes the AnalysisComponent
      // is using at any one time.
      ((UimaContext_ImplBase) getUimaContext()).returnedCAS(absCas);
View Full Code Here


        if (!mSofaAware) {
          view = aCAS.getView(CAS.NAME_DEFAULT_SOFA);
        }
        // now get the right interface(e.g. CAS or JCAS)
        Class requiredInterface = mAnalysisComponent.getRequiredCasInterface();
        AbstractCas casToPass = getCasManager().getCasInterface(view, requiredInterface);

        // check if there was a change in the ResultSpecification or in
        // the TypeSystem. If so, set the changed type system into the ResultSpecification and
        // inform the component
        if (mResultSpecChanged || mLastTypeSystem != view.getTypeSystem()) {
View Full Code Here

   * @return CAS returned by the analysis component
   */
  protected CAS callAnalysisComponentNext() throws AnalysisEngineProcessException,
          ResultNotSupportedException {
    try {
      AbstractCas absCas = mAnalysisComponent.next();
      getMBean().incrementCASesProcessed();
      // notify UimaContext that a CAS was returned -- it uses
      // this information to track how many CASes the AnalysisComponent
      // is using at any one time.
      ((UimaContext_ImplBase) getUimaContext()).returnedCAS(absCas);
View Full Code Here

        if (!mSofaAware) {
          view = aCAS.getView(CAS.NAME_DEFAULT_SOFA);
        }
        // now get the right interface(e.g. CAS or JCAS)
        Class requiredInterface = mAnalysisComponent.getRequiredCasInterface();
        AbstractCas casToPass = getCasManager().getCasInterface(view, requiredInterface);

        // check if there was a change in the ResultSpecification or in
        // the TypeSystem. If so, recompile the ResultSpecification and
        // inform the component
        if (mResultSpecChanged || mLastTypeSystem != view.getTypeSystem()) {
View Full Code Here

   * @return CAS returned by the analysis component
   */
  protected CAS callAnalysisComponentNext() throws AnalysisEngineProcessException,
          ResultNotSupportedException {
    try {
      AbstractCas absCas = mAnalysisComponent.next();
      getMBean().incrementCASesProcessed();
      // notify UimaContext that a CAS was returned -- it uses
      // this information to track how many CASes the AnalysisComponent
      // is using at any one time.
      ((UimaContext_ImplBase) getUimaContext()).returnedCAS();
View Full Code Here

        // Get the right type of CAS and call the AnalysisComponent's
        // process method
        CAS baseCas = ((CASImpl) aCAS).getBaseCAS();
        Class requiredInterface = mAnnotator.getRequiredCasInterface();
        AbstractCas casToPass = getCasManager().getCasInterface(baseCas, requiredInterface);
        mAnnotator.process(casToPass);
        getMBean().incrementCASesProcessed();
      } catch (Exception e) {
        if (e instanceof AnalysisEngineProcessException) {
          throw e;
View Full Code Here

   * @return CAS returned by the analysis component
   */
  protected CAS callAnalysisComponentNext() throws AnalysisEngineProcessException,
          ResultNotSupportedException {
    try {
      AbstractCas absCas = mAnnotator.next();
      getMBean().incrementCASesProcessed();
      // notify UimaContext that a CAS was returned -- it uses
      // this information to track how many CASes the AnalysisComponent
      // is using at any one time.
      ((UimaContext_ImplBase) getUimaContext()).returnedCAS();
View Full Code Here

      if (!mSofaAware) {
        view = aCAS.getView(CAS.NAME_DEFAULT_SOFA);
      }
      // now get the right interface(e.g. CAS or JCAS)
      Class requiredInterface = mFlowController.getRequiredCasInterface();
      AbstractCas casToPass = getCasManager().getCasInterface(view, requiredInterface);

      Flow flow = mFlowController.computeFlow(casToPass);
      return new FlowContainer(flow, this);
    } finally {
      aCAS.setCurrentComponentInfo(null);
View Full Code Here

      if (!mSofaAware) {
        view = newCAS.getView(CAS.NAME_DEFAULT_SOFA);
      }
      // now get the right interface(e.g. CAS or JCAS)
      Class requiredInterface = mFlowControllerContainer.getRequiredCasInterface();
      AbstractCas casToPass = getCasManager().getCasInterface(view, requiredInterface);

      Flow flow = mFlow.newCasProduced(casToPass, producedBy);
      return new FlowContainer(flow, mFlowControllerContainer);
    } finally {
      newCAS.setCurrentComponentInfo(null);
View Full Code Here

        // Get the right type of CAS and call the AnalysisComponent's
        // process method
        CAS baseCas = ((CASImpl) aCAS).getBaseCAS();
        Class<CAS> requiredInterface = mAnnotator.getRequiredCasInterface();
        AbstractCas casToPass = getCasManager().getCasInterface(baseCas, requiredInterface);
        mAnnotator.process(casToPass);
        getMBean().incrementCASesProcessed();
      } catch (Exception e) {
        if (e instanceof AnalysisEngineProcessException) {
          throw e;
View Full Code Here

TOP

Related Classes of org.apache.uima.cas.AbstractCas

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.