|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.uima.resource.Resource_ImplBase org.apache.uima.resource.ConfigurableResource_ImplBase org.apache.uima.collection.CollectionReader_ImplBase
public abstract class CollectionReader_ImplBase
Base class for Collection Readers, which developers should extend with their own Collection Reader implementation classes.
Field Summary |
---|
Fields inherited from interface org.apache.uima.resource.Resource |
---|
PARAM_AGGREGATE_SOFA_MAPPINGS, PARAM_CONFIG_PARAM_SETTINGS, PARAM_PERFORMANCE_TUNING_SETTINGS, PARAM_RESOURCE_MANAGER, PARAM_UIMA_CONTEXT |
Fields inherited from interface org.apache.uima.resource.Resource |
---|
PARAM_AGGREGATE_SOFA_MAPPINGS, PARAM_CONFIG_PARAM_SETTINGS, PARAM_PERFORMANCE_TUNING_SETTINGS, PARAM_RESOURCE_MANAGER, PARAM_UIMA_CONTEXT |
Constructor Summary | |
---|---|
CollectionReader_ImplBase()
|
Method Summary | |
---|---|
void |
destroy()
Default implementation of destroy, which calls BaseCollectionReader.close() . |
CasInitializer |
getCasInitializer()
Deprecated. As of v2.0 CAS Initializers are deprecated. |
ProcessingResourceMetaData |
getProcessingResourceMetaData()
Gets the metadata for this CollectionReader, which was extracted from the descriptor during initialization. |
void |
initialize()
This method is called during initialization, and does nothing by default. |
boolean |
initialize(ResourceSpecifier aSpecifier,
Map<String,Object> aAdditionalParams)
Called by the framework to initialize this Collection Reader. |
boolean |
isConsuming()
Returns false. |
void |
reconfigure()
Notifies this Collection Reader that its configuration parameter settings have been changed. |
void |
setCasInitializer(CasInitializer aCasInitializer)
Deprecated. As of v2.0 CAS Initializers are deprecated. |
void |
typeSystemInit(TypeSystem aTypeSystem)
Default implementation of typeSystemInit, which calls the CAS Initializer's typeSystemInit method if a CAS Initializer is present. |
Methods inherited from class org.apache.uima.resource.ConfigurableResource_ImplBase |
---|
getConfigParameterValue, getConfigParameterValue, setConfigParameterValue, setConfigParameterValue |
Methods inherited from class org.apache.uima.resource.Resource_ImplBase |
---|
getCasManager, getLogger, getMetaData, getResourceManager, getUimaContext, getUimaContextAdmin, setLogger, setMetaData |
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.collection.CollectionReader |
---|
getNext |
Methods inherited from interface org.apache.uima.collection.base_cpm.BaseCollectionReader |
---|
close, getProgress, hasNext |
Methods inherited from interface org.apache.uima.resource.Resource |
---|
getLogger, getMetaData, getResourceManager, getUimaContext, getUimaContextAdmin, setLogger |
Methods inherited from interface org.apache.uima.resource.ConfigurableResource |
---|
getConfigParameterValue, getConfigParameterValue, setConfigParameterValue, setConfigParameterValue |
Methods inherited from interface org.apache.uima.resource.Resource |
---|
getLogger, getMetaData, getResourceManager, getUimaContext, getUimaContextAdmin, setLogger |
Constructor Detail |
---|
public CollectionReader_ImplBase()
Method Detail |
---|
public boolean initialize(ResourceSpecifier aSpecifier, Map<String,Object> aAdditionalParams) throws ResourceInitializationException
initialize()
method and access metadata via the getProcessingResourceMetaData()
method. This method
is non-final only for legacy reasons.
initialize
in interface Resource
initialize
in class Resource_ImplBase
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.
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.
ResourceInitializationException
- if a failure occurs during initialization.Resource.initialize(org.apache.uima.resource.ResourceSpecifier,
java.util.Map)
public void initialize() throws ResourceInitializationException
ResourceInitializationException
- if a failure occurs during initialization.public void destroy()
BaseCollectionReader.close()
. If close throws an
IOException, it will be logged.
destroy
in interface Resource
destroy
in class Resource_ImplBase
Resource.destroy()
public void typeSystemInit(TypeSystem aTypeSystem) throws ResourceInitializationException
typeSystemInit
in interface CollectionReader
aTypeSystem
- the CAS TypeSystem
ResourceInitializationException
- if the type system is not compatible with this Collection ReaderCollectionReader.typeSystemInit(org.apache.uima.cas.TypeSystem)
public ProcessingResourceMetaData getProcessingResourceMetaData()
getProcessingResourceMetaData
in interface BaseCollectionReader
BaseCollectionReader.getProcessingResourceMetaData()
public boolean isConsuming()
isConsuming
in interface BaseCollectionReader
CollectionReader- See Also:
BaseCollectionReader.isConsuming()
@Deprecated public CasInitializer getCasInitializer()
setCasInitializer(CasInitializer)
.
getCasInitializer
in interface CollectionReader
CollectionReader.getCasInitializer()
@Deprecated public void setCasInitializer(CasInitializer aCasInitializer)
getCasInitializer()
.
setCasInitializer
in interface CollectionReader
aCasInitializer
- the CAS Initializer for this Collection ReaderCollectionReader.setCasInitializer(org.apache.uima.collection.CasInitializer)
public void reconfigure() throws ResourceConfigurationException
destroy()
followed by initialize()
.
Collection Readers that have expensive initialization that does not need to be redone whenever
configuration parameters change may wish to override this method to provide a more efficient
implementation.
reconfigure
in interface ConfigurableResource
reconfigure
in class ConfigurableResource_ImplBase
ResourceConfigurationException
- if the configuration is not validConfigurableResource_ImplBase.reconfigure()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |