org.apache.uima.collection.impl.metadata.cpe
Class CpeLocalCasProcessorImpl

java.lang.Object
  extended by org.apache.uima.resource.metadata.impl.MetaDataObject_impl
      extended by org.apache.uima.collection.impl.metadata.cpe.CasProcessorCpeObject
          extended by org.apache.uima.collection.impl.metadata.cpe.CpeLocalCasProcessorImpl
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, CpeCasProcessor, CpeLocalCasProcessor, MetaDataObject, XMLizable

public class CpeLocalCasProcessorImpl
extends CasProcessorCpeObject
implements CpeLocalCasProcessor

See Also:
Serialized Form

Constructor Summary
  CpeLocalCasProcessorImpl()
           
  CpeLocalCasProcessorImpl(boolean initializeWithDefaultValues)
           
protected CpeLocalCasProcessorImpl(java.lang.String aName, java.lang.String aSoFa)
           
 
Method Summary
protected  void addDefaults()
          Adds default configuration shared by CasProcessors
 void addExecArg(java.lang.String aArgValue)
           
 void addExecEnv(java.lang.String aEnvKeyName, java.lang.String aEnvKeyValue)
          Adds a new env key to the list of env keys.
 java.util.List getExecArgs()
           
 java.util.List getExecEnv()
           
 java.lang.String getExecutable()
          Returns a name of a program to use when launching this CasProcessor
 CasProcessorRunInSeperateProcess getRunInSeperateProcess()
           
 boolean isJava()
          Returns true if the local Cas Processor is a java program
 void removeExecArg(int aIndex)
           
 void removeExecEnv(int aIndex)
           
 void setExecutable(java.lang.String aCasProcessorExecutable)
          Defines the name of a program to run when launching this Cas Processor.
 void setIsJava(boolean aJava)
          Defines if this Cas Processor is a java program
 void setRunInSeperateProcess(CasProcessorRunInSeperateProcess aSepProcess)
           
 
Methods inherited from class org.apache.uima.collection.impl.metadata.cpe.CasProcessorCpeObject
addDeployParam, buildFromXMLElement, getActionOnMaxError, getActionOnMaxRestart, getBatchSize, getCasProcessorFilter, getCheckpoint, getConfigurationParameterSettings, getCpeComponentDescriptor, getDeployment, getDeploymentParameters, getDeploymentParams, getDescriptor, getErrorHandling, getFilter, getIsParallelizable, getMaxErrorCount, getMaxErrorSampleSize, getMaxRestartCount, getName, getParameters, getParameterSettings, getRunInSeparateProcess, getSOFA, getSofaNameMappings, getTimeout, getXMLAttributes, getXmlizationInfo, setActionOnMaxError, setActionOnMaxRestart, setBatchSize, setCasProcessorFilter, setCasProcessorFilter, setCheckpoint, setConfigurationParameterSettings, setCpeComponentDescriptor, setDeployment, setDeploymentParameters, setDeploymentParams, setDescriptor, setErrorHandling, setFilter, setIsParallelizable, setMaxErrorCount, setMaxErrorSampleSize, setMaxRestartCount, setName, setParameters, setParameterSettings, setRunInSeparateProcess, setSOFA, setSofaNameMappings, setTimeout
 
Methods inherited from class org.apache.uima.resource.metadata.impl.MetaDataObject_impl
buildFromXMLElement, clone, equals, getAttributeClass, getAttributeValue, getPropertyDescriptors, getPropertyXmlInfo, getRelativePathBase, getSourceUrl, getSourceUrlString, getWrapperClass, hashCode, isModifiable, listAttributes, readArrayPropertyValueFromXMLElement, readMapPropertyFromXml, readPropertyValueFromXMLElement, readUnknownPropertyValueFromXMLElement, setAttributeValue, setSourceUrl, setSourceUrlIfNull, toString, toXML, toXML, toXML, toXML, writeArrayPropertyAsElement, writeMapPropertyToXml, writePropertyAsElement
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.uima.collection.metadata.CpeCasProcessor
addDeployParam, getActionOnMaxError, getActionOnMaxRestart, getBatchSize, getCasProcessorFilter, getCheckpoint, getConfigurationParameterSettings, getCpeComponentDescriptor, getDeployment, getDeploymentParams, getDescriptor, getErrorHandling, getIsParallelizable, getMaxErrorCount, getMaxErrorSampleSize, getMaxRestartCount, getName, getRunInSeparateProcess, getSOFA, getSofaNameMappings, getTimeout, setActionOnMaxError, setActionOnMaxRestart, setBatchSize, setCasProcessorFilter, setConfigurationParameterSettings, setCpeComponentDescriptor, setDescriptor, setIsParallelizable, setMaxErrorCount, setMaxErrorSampleSize, setMaxRestartCount, setName, setSOFA, setSofaNameMappings, setTimeout
 
Methods inherited from interface org.apache.uima.resource.metadata.MetaDataObject
clone, equals, getAttributeValue, getSourceUrl, getSourceUrlString, isModifiable, listAttributes, setAttributeValue, setSourceUrl
 
Methods inherited from interface org.apache.uima.util.XMLizable
buildFromXMLElement, buildFromXMLElement, toXML, toXML, toXML, toXML
 

Constructor Detail

CpeLocalCasProcessorImpl

public CpeLocalCasProcessorImpl()

CpeLocalCasProcessorImpl

public CpeLocalCasProcessorImpl(boolean initializeWithDefaultValues)

CpeLocalCasProcessorImpl

protected CpeLocalCasProcessorImpl(java.lang.String aName,
                                   java.lang.String aSoFa)
                            throws CpeDescriptorException
Throws:
CpeDescriptorException
Method Detail

addExecArg

public void addExecArg(java.lang.String aArgValue)
                throws CpeDescriptorException
Specified by:
addExecArg in interface CpeLocalCasProcessor
Throws:
CpeDescriptorException

removeExecArg

public void removeExecArg(int aIndex)
                   throws CpeDescriptorException
Throws:
CpeDescriptorException

getExecArgs

public java.util.List getExecArgs()
                           throws CpeDescriptorException
Throws:
CpeDescriptorException

addDefaults

protected void addDefaults()
                    throws CpeDescriptorException
Description copied from class: CasProcessorCpeObject
Adds default configuration shared by CasProcessors

Overrides:
addDefaults in class CasProcessorCpeObject
Throws:
CpeDescriptorException

isJava

public boolean isJava()
               throws CpeDescriptorException
Description copied from interface: CpeLocalCasProcessor
Returns true if the local Cas Processor is a java program

Specified by:
isJava in interface CpeLocalCasProcessor
Returns:
true if java program, false otherwise
Throws:
CpeDescriptorException

addExecEnv

public void addExecEnv(java.lang.String aEnvKeyName,
                       java.lang.String aEnvKeyValue)
                throws CpeDescriptorException
Adds a new env key to the list of env keys. If a kay with a given key name exists the new key value replaces the old.

Specified by:
addExecEnv in interface CpeLocalCasProcessor
Throws:
CpeDescriptorException

getExecEnv

public java.util.List getExecEnv()
                          throws CpeDescriptorException
Throws:
CpeDescriptorException

removeExecEnv

public void removeExecEnv(int aIndex)
                   throws CpeDescriptorException
Throws:
CpeDescriptorException

setExecutable

public void setExecutable(java.lang.String aCasProcessorExecutable)
                   throws CpeDescriptorException
Description copied from interface: CpeLocalCasProcessor
Defines the name of a program to run when launching this Cas Processor. A program can be a java exec, a shell script, or any program that can run in a separate process.

Specified by:
setExecutable in interface CpeLocalCasProcessor
Parameters:
aCasProcessorExecutable - - name of a program
Throws:
CpeDescriptorException

getExecutable

public java.lang.String getExecutable()
                               throws CpeDescriptorException
Description copied from interface: CpeLocalCasProcessor
Returns a name of a program to use when launching this CasProcessor

Specified by:
getExecutable in interface CpeLocalCasProcessor
Returns:
the name of the program to execute
Throws:
CpeDescriptorException

setIsJava

public void setIsJava(boolean aJava)
               throws CpeDescriptorException
Description copied from interface: CpeLocalCasProcessor
Defines if this Cas Processor is a java program

Specified by:
setIsJava in interface CpeLocalCasProcessor
Parameters:
aJava - - true if java, false otherwise
Throws:
CpeDescriptorException

setRunInSeperateProcess

public void setRunInSeperateProcess(CasProcessorRunInSeperateProcess aSepProcess)
                             throws CpeDescriptorException
Specified by:
setRunInSeperateProcess in interface CpeLocalCasProcessor
Throws:
CpeDescriptorException

getRunInSeperateProcess

public CasProcessorRunInSeperateProcess getRunInSeperateProcess()
                                                         throws CpeDescriptorException
Specified by:
getRunInSeperateProcess in interface CpeLocalCasProcessor
Throws:
CpeDescriptorException


Copyright © 2010 The Apache Software Foundation. All Rights Reserved.