Class PublicationLoaderRunnable
java.lang.Object
org.dspace.scripts.DSpaceRunnable<ScriptConfiguration<?>>
org.dspace.app.suggestion.runnable.PublicationLoaderRunnable
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
PublicationLoaderRunnableCli
Runner responsible to import metadata about authors from loader to Solr. This
runner works in two ways: If -s parameter with a valid UUID is received, then
the specific researcher with this UUID will be used. Invocation without any
parameter results in massive import, processing all authors registered in
DSpace.
- Author:
- Alessandro Martelli (alessandro.martelli at 4science.it)
-
Nested Class Summary
Nested classes/interfaces inherited from class org.dspace.scripts.DSpaceRunnable
DSpaceRunnable.StepResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Contextprotected Stringprotected Stringprotected StringFields inherited from class org.dspace.scripts.DSpaceRunnable
commandLine, handler, helpCommandLine -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the script configuration for this runnable.voidMain execution method for the script.voidsetup()Initializes the script execution environment by setting up necessary services, retrieving command-line arguments, and setting default values where necessary.Methods inherited from class org.dspace.scripts.DSpaceRunnable
getEpersonIdentifier, getFileNamesFromInputStreamOptions, initialize, printHelp, run, setEpersonIdentifier
-
Field Details
-
context
-
profile
-
loader
-
filterQuery
-
-
Constructor Details
-
PublicationLoaderRunnable
public PublicationLoaderRunnable()
-
-
Method Details
-
getScriptConfiguration
Retrieves the script configuration for this runnable. The configuration is fetched from the DSpace service manager.- Specified by:
getScriptConfigurationin classDSpaceRunnable<ScriptConfiguration<?>>- Returns:
- The
ScriptConfigurationinstance for the import-loader-suggestions script.
-
setup
public void setup() throws org.apache.commons.cli.ParseExceptionInitializes the script execution environment by setting up necessary services, retrieving command-line arguments, and setting default values where necessary.- Specified by:
setupin classDSpaceRunnable<ScriptConfiguration<?>>- Throws:
org.apache.commons.cli.ParseException- If there is an error parsing command-line options.
-
internalRun
Main execution method for the script. It validates input parameters, retrieves researcher items, and triggers the publication import process.- Specified by:
internalRunin classDSpaceRunnable<ScriptConfiguration<?>>- Throws:
Exception- If an error occurs during execution.
-