Class PublicationLoaderRunnable

java.lang.Object
org.dspace.scripts.DSpaceRunnable<ScriptConfiguration<?>>
org.dspace.app.suggestion.runnable.PublicationLoaderRunnable
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
PublicationLoaderRunnableCli

public class PublicationLoaderRunnable extends DSpaceRunnable<ScriptConfiguration<?>>
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)
  • Field Details

    • context

      protected Context context
    • profile

      protected String profile
    • loader

      protected String loader
    • filterQuery

      protected String filterQuery
  • Constructor Details

    • PublicationLoaderRunnable

      public PublicationLoaderRunnable()
  • Method Details

    • getScriptConfiguration

      public ScriptConfiguration<?> getScriptConfiguration()
      Retrieves the script configuration for this runnable. The configuration is fetched from the DSpace service manager.
      Specified by:
      getScriptConfiguration in class DSpaceRunnable<ScriptConfiguration<?>>
      Returns:
      The ScriptConfiguration instance for the import-loader-suggestions script.
    • setup

      public void setup() throws org.apache.commons.cli.ParseException
      Initializes the script execution environment by setting up necessary services, retrieving command-line arguments, and setting default values where necessary.
      Specified by:
      setup in class DSpaceRunnable<ScriptConfiguration<?>>
      Throws:
      org.apache.commons.cli.ParseException - If there is an error parsing command-line options.
    • internalRun

      public void internalRun() throws Exception
      Main execution method for the script. It validates input parameters, retrieves researcher items, and triggers the publication import process.
      Specified by:
      internalRun in class DSpaceRunnable<ScriptConfiguration<?>>
      Throws:
      Exception - If an error occurs during execution.