Package org.dspace.qaevent.script
Class OpenaireEventsImport
java.lang.Object
org.dspace.scripts.DSpaceRunnable<OpenaireEventsImportScriptConfiguration<OpenaireEventsImport>>
org.dspace.qaevent.script.OpenaireEventsImport
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
OpenaireEventsImportCli
public class OpenaireEventsImport
extends DSpaceRunnable<OpenaireEventsImportScriptConfiguration<OpenaireEventsImport>>
Implementation of
DSpaceRunnable to perform a QAEvents import from a
json file. The JSON file contains an array of JSON Events, where each event
has the following structure. The message attribute follows the structure
documented at- Author:
- Alessandro Martelli (alessandro.martelli at 4science.it), Luca Giamminonni (luca.giamminonni at 4Science.it)
- See Also:
-
- see
{
"originalId": "oai:www.openstarts.units.it:10077/21838",
"title": "Egypt, crossroad of translations and literary interweavings",
"topic": "ENRICH/MORE/PROJECT",
"trust": 1.0,
"message": {
"projects[0].acronym": "PAThs",
"projects[0].code": "687567",
"projects[0].funder": "EC",
"projects[0].fundingProgram": "H2020",
"projects[0].jurisdiction": "EU",
"projects[0].openaireId": "40|corda__h2020::6e32f5eb912688f2424c68b851483ea4",
"projects[0].title": "Tracking Papyrus and Parchment Paths"
}
}
- see
-
Nested Class Summary
Nested classes/interfaces inherited from class org.dspace.scripts.DSpaceRunnable
DSpaceRunnable.StepResult -
Field Summary
Fields inherited from class org.dspace.scripts.DSpaceRunnable
commandLine, handler, helpCommandLine -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis method will return the Configuration that the implementing DSpaceRunnable usesvoidThis method has to be included in every script and this will be the main execution block for the script that'll contain all the logic neededvoidsetup()This method has to be included in every script and handles the setup of the script by parsing the CommandLine and setting the variablesMethods inherited from class org.dspace.scripts.DSpaceRunnable
getEpersonIdentifier, getFileNamesFromInputStreamOptions, initialize, printHelp, run, setEpersonIdentifier
-
Constructor Details
-
OpenaireEventsImport
public OpenaireEventsImport()
-
-
Method Details
-
getScriptConfiguration
Description copied from class:DSpaceRunnableThis method will return the Configuration that the implementing DSpaceRunnable uses- Specified by:
getScriptConfigurationin classDSpaceRunnable<OpenaireEventsImportScriptConfiguration<OpenaireEventsImport>>- Returns:
- The
ScriptConfigurationthat this implementing DspaceRunnable uses
-
setup
public void setup() throws org.apache.commons.cli.ParseExceptionDescription copied from class:DSpaceRunnableThis method has to be included in every script and handles the setup of the script by parsing the CommandLine and setting the variables- Specified by:
setupin classDSpaceRunnable<OpenaireEventsImportScriptConfiguration<OpenaireEventsImport>>- Throws:
org.apache.commons.cli.ParseException- If something goes wrong
-
internalRun
Description copied from class:DSpaceRunnableThis method has to be included in every script and this will be the main execution block for the script that'll contain all the logic needed- Specified by:
internalRunin classDSpaceRunnable<OpenaireEventsImportScriptConfiguration<OpenaireEventsImport>>- Throws:
Exception- If something goes wrong
-