public class DiskLoader extends AbstractIteratorLoader<de.gerdiproject.json.datacite.DataCiteJson>
dedicatedEtl, hasLoadedDocuments| Constructor and Description |
|---|
DiskLoader()
Constructor that sets the parser and save folder.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Attempts to close the writer.
|
File |
createTargetFile(String fileName)
Returns the file to which the documents are saved.
|
void |
init(AbstractETL<?,?> etl)
Initializes the loader for a new harvest.
|
void |
load(Iterator<de.gerdiproject.json.datacite.DataCiteJson> documents)
Loads the document to a targeted search index.
|
void |
loadElement(de.gerdiproject.json.datacite.DataCiteJson document)
Loads a single element of the Iterator.
|
void |
unregisterParameters()
If the Loader created parameters in the Configuration,
this method should unregister all of them.
|
loadElementAndIncrementpublic void unregisterParameters()
ILoaderpublic File createTargetFile(String fileName)
fileName - the name of the file without extensionpublic void load(Iterator<de.gerdiproject.json.datacite.DataCiteJson> documents) throws LoaderException
ILoaderload in interface ILoader<Iterator<de.gerdiproject.json.datacite.DataCiteJson>>load in class AbstractIteratorLoader<de.gerdiproject.json.datacite.DataCiteJson>documents - the document that is to be loadedLoaderException - when the load did not work properlypublic void init(AbstractETL<?,?> etl)
ILoaderinit in interface ILoader<Iterator<de.gerdiproject.json.datacite.DataCiteJson>>init in class AbstractIteratorLoader<de.gerdiproject.json.datacite.DataCiteJson>etl - the AbstractETL to which the loader belongspublic void clear()
LoaderException - thrown if there is an error closing the writerpublic void loadElement(de.gerdiproject.json.datacite.DataCiteJson document)
throws LoaderException
AbstractIteratorLoaderloadElement in class AbstractIteratorLoader<de.gerdiproject.json.datacite.DataCiteJson>document - a document that is to be loadedLoaderException - when the load failedCopyright © 2017–2019. All rights reserved.