Class CasFlow_ImplBase

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private CAS mCAS  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void aborted()
      By default, does nothing.
      boolean continueOnFailure​(java.lang.String failedAeKey, java.lang.Exception failure)
      By default, returns false, indicating that processing cannot continue after a failure.
      protected CAS getCas()
      Gets the CAS being routed by this Flow object.
      Flow newCasProduced​(AbstractCas newCas, java.lang.String producedBy)
      Overriden to check that newCas is an instanceof CAS.
      protected Flow newCasProduced​(CAS newCas, java.lang.String producedBy)
      By default, throws an exception to indicate this this Flow object does not support new CASes being produced in the middle of the flow.
      void setCas​(CAS aCAS)
      Deprecated.
      this is automatically done by the framework after a new flow object is created
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.uima.flow.Flow

        next
    • Field Detail

      • mCAS

        private CAS mCAS
    • Constructor Detail

      • CasFlow_ImplBase

        public CasFlow_ImplBase()
    • Method Detail

      • setCas

        @Deprecated
        public void setCas​(CAS aCAS)
        Deprecated.
        this is automatically done by the framework after a new flow object is created
        Sets the CAS to be routed by this Flow object. This should be called from the FlowController.computeFlow(AbstractCas) method after this Flow object is instantiated.
        Parameters:
        aCAS - the CAS to be routed by this Flow object
      • continueOnFailure

        public boolean continueOnFailure​(java.lang.String failedAeKey,
                                         java.lang.Exception failure)
        By default, returns false, indicating that processing cannot continue after a failure. May be overridden by subclasses to allow processing to continue.
        Specified by:
        continueOnFailure in interface Flow
        Parameters:
        failedAeKey - The key of the analysis engine that failed.
        failure - the Exception that occurred
        Returns:
        true if the FlowController decides that processing of the CAS can continue; false if processing of the CAS should be aborted.
        See Also:
        Flow.continueOnFailure(String, java.lang.Exception)
      • aborted

        public void aborted()
        By default, does nothing. May be overriden by subclasses to release resources when a flow is aborted.
        Specified by:
        aborted in interface Flow
        See Also:
        Flow.aborted()
      • newCasProduced

        protected Flow newCasProduced​(CAS newCas,
                                      java.lang.String producedBy)
                               throws AnalysisEngineProcessException
        By default, throws an exception to indicate this this Flow object does not support new CASes being produced in the middle of the flow. Subclasses can override to implement handling for this.
        Parameters:
        newCas - the new CAS
        producedBy - the key of the CAS Multiplier that produced this CAS
        Returns:
        a Flow object that will be used to route the new CAS
        Throws:
        AnalysisEngineProcessException - passthru
        See Also:
        Flow.newCasProduced(AbstractCas, String)
      • getCas

        protected CAS getCas()
        Gets the CAS being routed by this Flow object.
        Returns:
        the CAS being routed by this Flow object