|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.uima.resource.Resource_ImplBase
org.apache.uima.resource.ConfigurableResource_ImplBase
org.apache.uima.collection.CollectionReader_ImplBase
org.apache.uima.examples.xmi.XmiCollectionReader
public class XmiCollectionReader
A simple collection reader that reads CASes in XMI format from a directory in the filesystem.
Field Summary | |
---|---|
static java.lang.String |
PARAM_FAILUNKNOWN
Name of the configuration parameter that must be set to indicate if the execution fails if an encountered type is unknown |
static java.lang.String |
PARAM_INPUTDIR
Name of configuration parameter that must be set to the path of a directory containing the XMI files. |
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 | |
---|---|
XmiCollectionReader()
|
Method Summary | |
---|---|
void |
close()
Closes this CollectionReader , after which it may no longer be used. |
void |
getNext(CAS aCAS)
Gets the next element of the collection. |
Progress[] |
getProgress()
Gets information about the number of entities and/or amount of data that has been read from this CollectionReader , and the total amount that remains (if that information
is available). |
boolean |
hasNext()
Gets whether there are any elements remaining to be read from this CollectionReader . |
void |
initialize()
This method is called during initialization, and does nothing by default. |
Methods inherited from class org.apache.uima.collection.CollectionReader_ImplBase |
---|
destroy, getCasInitializer, getProcessingResourceMetaData, initialize, isConsuming, reconfigure, setCasInitializer, typeSystemInit |
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.resource.ConfigurableResource |
---|
getConfigParameterValue, getConfigParameterValue, setConfigParameterValue, setConfigParameterValue |
Methods inherited from interface org.apache.uima.resource.Resource |
---|
getLogger, getMetaData, getResourceManager, getUimaContext, getUimaContextAdmin, setLogger |
Field Detail |
---|
public static final java.lang.String PARAM_INPUTDIR
public static final java.lang.String PARAM_FAILUNKNOWN
Constructor Detail |
---|
public XmiCollectionReader()
Method Detail |
---|
public void initialize() throws ResourceInitializationException
CollectionReader_ImplBase
initialize
in class CollectionReader_ImplBase
ResourceInitializationException
- if a failure occurs during initialization.CollectionReader_ImplBase.initialize()
public boolean hasNext()
BaseCollectionReader
CollectionReader
.
CollectionReader
.BaseCollectionReader.hasNext()
public void getNext(CAS aCAS) throws java.io.IOException, CollectionException
CollectionReader
CollectionReader
(see BaseCollectionReader.isConsuming()
), this
element will also be removed from the collection.
aCAS
- the CAS to populate with the next element of the collection
java.io.IOException
- if an I/O failure occurs
CollectionException
- if there is some other problem with reading from the CollectionCollectionReader.getNext(org.apache.uima.cas.CAS)
public void close() throws java.io.IOException
BaseCollectionReader
CollectionReader
, after which it may no longer be used.
java.io.IOException
- if an I/O failure occursBaseCollectionReader.close()
public Progress[] getProgress()
BaseCollectionReader
CollectionReader
, and the total amount that remains (if that information
is available).
This method returns an array of Progress
objects so that results can be reported
using different units. For example, the CollectionReader could report progress in terms of the
number of documents that have been read and also in terms of the number of bytes that have been
read. In many cases, it will be sufficient to return just one Progress
object.
Progress
objects. Each object may have different units (for
example number of entities or bytes).BaseCollectionReader.getProgress()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |