org.apache.uima.collection.base_cpm
Class CasDataCollectionReader_ImplBase
java.lang.Object
org.apache.uima.resource.Resource_ImplBase
org.apache.uima.resource.ConfigurableResource_ImplBase
org.apache.uima.collection.base_cpm.CasDataCollectionReader_ImplBase
- All Implemented Interfaces:
- BaseCollectionReader, CasDataCollectionReader, ConfigurableResource, Resource
public abstract class CasDataCollectionReader_ImplBase
- extends ConfigurableResource_ImplBase
- implements CasDataCollectionReader
Base class from which to extend when writing Collection Readers that use the CasData
interface to access the CAS.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CasDataCollectionReader_ImplBase
public CasDataCollectionReader_ImplBase()
initialize
public boolean initialize(ResourceSpecifier aSpecifier,
Map<String,Object> aAdditionalParams)
throws ResourceInitializationException
- Called by the framework to initialize this Collection Reader. Subclasses should generally NOT
override this method; instead they should override the zero-argument
initialize()
method and access metadata via the getProcessingResourceMetaData()
method. This method
is non-final only for legacy reasons.
- Specified by:
initialize
in interface Resource
- Overrides:
initialize
in class Resource_ImplBase
- Parameters:
aSpecifier
- specifies how to create a resource or locate an existing resource service.aAdditionalParams
- a Map containing additional parameters. May be null
if there are no
parameters. Each class that implements this interface can decide what additional
parameters it supports.
- Returns:
- true if and only if initialization completed successfully. Reutrns false if the given
ResourceSpecifier
is not of an appropriate type for this Resource. If
the ResourceSpecifier
is of an appropriate type but is invalid or if
some other failure occurs, an exception should be thrown.
- Throws:
ResourceInitializationException
- if a failure occurs during initialization.- See Also:
Resource.initialize(org.apache.uima.resource.ResourceSpecifier,
java.util.Map)
initialize
public void initialize()
throws ResourceInitializationException
- This method is called during initialization, and does nothing by default. Subclasses should
override it to perform one-time startup logic.
- Throws:
ResourceInitializationException
- if a failure occurs during initialization.
destroy
public void destroy()
- Description copied from interface:
Resource
- Releases all resources held by this
Resource
.
- Specified by:
destroy
in interface Resource
- Overrides:
destroy
in class Resource_ImplBase
- See Also:
Resource.destroy()
getProcessingResourceMetaData
public ProcessingResourceMetaData getProcessingResourceMetaData()
- Description copied from interface:
BaseCollectionReader
- Gets the metadata that describes this
CasProcesor
.
- Specified by:
getProcessingResourceMetaData
in interface BaseCollectionReader
- Returns:
- an object containing all metadata for this CasProcessor
- See Also:
BaseCollectionReader.getProcessingResourceMetaData()
isConsuming
public boolean isConsuming()
- Description copied from interface:
BaseCollectionReader
- Gets whether this is a consuming
CollectionReader
. Consuming
CollectionReader
s remove each element from the Collection
as it
is read.
- Specified by:
isConsuming
in interface BaseCollectionReader
- Returns:
- true if and only if this is a consuming
CollectionReader- See Also:
BaseCollectionReader.isConsuming()
Copyright © 2010 The Apache Software Foundation. All Rights Reserved.