public class ElasticSearchLoader extends AbstractURLLoader<de.gerdiproject.json.datacite.DataCiteJson>
batchMap, charset, hashGenerator, logger, maxBatchSizeParam, urlParamdedicatedEtl, hasLoadedDocuments| Constructor and Description |
|---|
ElasticSearchLoader()
Constructor that initializes a Json parser for server responses.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
getCredentials()
Retrieves the credentials that may be necessary for to authenticate the loader
with the URL.
|
protected int |
getSizeOfDocument(String documentId,
de.gerdiproject.harvest.IDocument document)
Calculates the size of a single document within the batch in bytes.
|
protected String |
getUrl()
Returns the loader target URL as a string.
|
protected void |
loadBatch(Map<String,de.gerdiproject.harvest.IDocument> documents)
The core of the loading function which is to be implemented by
subclasses.
|
checkPreconditionErrors, clear, init, load, loadElement, tryLoadingBatch, unregisterParametersloadElementAndIncrementpublic ElasticSearchLoader()
protected void loadBatch(Map<String,de.gerdiproject.harvest.IDocument> documents) throws Exception
AbstractURLLoaderloadBatch in class AbstractURLLoader<de.gerdiproject.json.datacite.DataCiteJson>documents - a map of documentIDs to documents that are to be
loaded, the values may also be null, in which case the
document is to be removed from the indexException - any kind of exception that can be thrown by the
loading processprotected String getUrl()
AbstractURLLoadergetUrl in class AbstractURLLoader<de.gerdiproject.json.datacite.DataCiteJson>protected String getCredentials()
AbstractURLLoadergetCredentials in class AbstractURLLoader<de.gerdiproject.json.datacite.DataCiteJson>protected int getSizeOfDocument(String documentId, de.gerdiproject.harvest.IDocument document)
AbstractURLLoadergetSizeOfDocument in class AbstractURLLoader<de.gerdiproject.json.datacite.DataCiteJson>documentId - the unique identifier of the documentdocument - the document of which the size is measuredCopyright © 2017–2019. All rights reserved.