|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmaito.datacollecting.DataCollectorImpl
public class DataCollectorImpl
Constructor Summary | |
---|---|
DataCollectorImpl(java.lang.String dataDir,
java.lang.String configDir)
Creates a new DataCollectorImpl instance. |
Method Summary | |
---|---|
boolean |
addSource(java.lang.String name,
java.lang.String type,
java.net.URL location,
java.lang.String format)
Adds a single source to this DataCollector's data sources that will be updateble in the future. |
java.lang.String[] |
getCurrentTasks()
Returns a user readable description of every task that is in progress at the moment. |
java.lang.String[] |
getErrors()
Returns all errors that have occurred since the last data processing was started. |
DataSourceDescription[] |
getSources()
Returns a description of each source that this DataCollector has. |
java.util.HashMap |
getSupportedTypes()
Returns all source types that are supported by this DataCollector. |
boolean |
removeSources(DataSourceDescription[] sources,
boolean removeData)
Removes one or more data sources permanently. |
void |
setLogListener(LogListener listener)
Sets a listener for all log messages sent by this DataProcessor. |
void |
updateSources(DataSourceDescription[] sources)
Starts updating data sources. |
boolean |
workInProgress()
Tells whether this DataProcessor is currently processing data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DataCollectorImpl(java.lang.String dataDir, java.lang.String configDir) throws java.lang.RuntimeException
dataDir
- The directory that contains configuration files for each data
source.configDir
- The directory that contains configuration files used by the
whole program (for example database configuration).
java.lang.RuntimeException
- Thrown if something goes wrong in the initialization.Method Detail |
---|
public java.util.HashMap getSupportedTypes()
DataCollector
getSupportedTypes
in interface DataCollector
public boolean addSource(java.lang.String name, java.lang.String type, java.net.URL location, java.lang.String format) throws java.lang.RuntimeException
DataCollector
addSource
in interface DataCollector
name
- A name/id for this source. This is the name that is visible to the user.type
- The type of this source. Must be one of the following:
"file"
"OAI-PMH"
location
- The location where this source's data is retrieved from.format
- The data format. Must be one of the following:
"quick_format_name"
"quick_format_document"
"DCXML"
"oai_citeseer"
java.lang.IllegalArgumentException
- Thrown when something is wrong with the parameters so that a new data source cannot be created.
java.lang.RuntimeException
public DataSourceDescription[] getSources()
DataCollector
getSources
in interface DataCollector
public void updateSources(DataSourceDescription[] sources)
DataCollector
updateSources
in interface DataCollector
sources
- The data sources that are to be updated.public boolean removeSources(DataSourceDescription[] sources, boolean removeData)
DataCollector
removeSources
in interface DataCollector
sources
- The sources that are to be removed.removeData
- If true also all raw data is deleted from disk. If false the raw data is left alone.
public boolean workInProgress()
DataProcessor
workInProgress
in interface DataProcessor
public java.lang.String[] getCurrentTasks()
DataProcessor
getCurrentTasks
in interface DataProcessor
public java.lang.String[] getErrors()
DataProcessor
getErrors
in interface DataProcessor
public void setLogListener(LogListener listener)
DataProcessor
setLogListener
in interface DataProcessor
listener
- The object that listens to this DataProcessor's log messages.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |