Class NetworkCasProcessorImpl

  • All Implemented Interfaces:
    CasDataProcessor, CasProcessor

    public class NetworkCasProcessorImpl
    extends java.lang.Object
    implements CasDataProcessor
    Implementation of the CasDataProcessor interface used for both Local and Remote CasDataProcessors. The CPE delegates analysis of entities to this instance. Each instance of this class has a proxy to extenal service.
    • Constructor Detail

      • NetworkCasProcessorImpl

        public NetworkCasProcessorImpl​(CpeCasProcessor aCasProcessorType)
        Initializes this instance with configuration defined in the CPE descriptor.
        Parameters:
        aCasProcessorType -
    • Method Detail

      • setProxy

        public void setProxy​(VinciTAP aTap)
        Associates a proxy to remote annotator service.
        Parameters:
        aTap - - proxy to remote service
      • getProxy

        public VinciTAP getProxy()
        Returns proxy to the remote AE service
        Returns:
        - proxy to remote service
      • process

        public CasData process​(CasData aCas)
                        throws ResourceProcessException
        Main method used during analysis. The ProcessingUnit calls this method to initiate analysis of the content in the CasData instance. This handles one Cas at a time processing mode.
        Specified by:
        process in interface CasDataProcessor
        Parameters:
        aCas - - instance of CasData to analyze
        Returns:
        instance containing result of the analysis
        Throws:
        ResourceProcessException - if processing fails
      • process

        public CasData[] process​(CasData[] aCasList)
                          throws ResourceProcessException
        Main method used during analysis. The ProcessingUnit calls this method to initiate analysis of the content in the CasData instance. This handles processing of multiple Cas'es at a time.
        Specified by:
        process in interface CasDataProcessor
        Parameters:
        aCasList - - array of CasData instances to analyze
        Returns:
        CasData - array of CasData instances containing results of the analysis
        Throws:
        ResourceProcessException - if processing fails
      • isStateless

        public boolean isStateless()
        Description copied from interface: CasProcessor
        Gets whether this is a stateless CAS Processor. Stateless CAS Processors do not maintain any data between calls to their process methods.
        Specified by:
        isStateless in interface CasProcessor
        Returns:
        true if this CAS processor is stateless, false if it is stateful.
      • isReadOnly

        public boolean isReadOnly()
        Description copied from interface: CasProcessor
        Gets whether this is a read-only CAS Processor, which does not modify the CAS.
        Specified by:
        isReadOnly in interface CasProcessor
        Returns:
        true if this CAS processor does not modify the CAS, false if it does.