Class DOIOrganiser


  • public class DOIOrganiser
    extends Object
    Author:
    Marsa Haoua, Pascal-Nicolas Becker
    • Constructor Detail

      • DOIOrganiser

        public DOIOrganiser​(Context context,
                            DOIIdentifierProvider provider)
        Constructor to be called within the main() method
        Parameters:
        context - - DSpace context
        provider - - DOI identifier provider to use
    • Method Detail

      • main

        public static void main​(String[] args)
        Main command-line runner method as with other DSpace launcher commands
        Parameters:
        args - - the command line arguments to parse as parameters
      • list

        public void list​(String processName,
                         PrintStream out,
                         PrintStream err,
                         Integer... status)
        list DOIs queued for reservation or registration
        Parameters:
        processName - - process name for display
        out - - output stream (eg. STDOUT)
        err - - error output stream (eg. STDERR)
        status - - status codes
      • update

        public void update​(DOI doiRow)
        Update metadata for a DOI
        Parameters:
        doiRow - - DOI to update
      • resolveToDOI

        public DOI resolveToDOI​(String identifier)
                         throws SQLException,
                                IllegalArgumentException,
                                IllegalStateException,
                                IdentifierException
        Finds the TableRow in the Doi table that belongs to the specified DspaceObject.
        Parameters:
        identifier - Either an ItemID, a DOI or a handle. If the identifier contains digits only we treat it as ItemID, if not we try to find a matching doi or a handle (in this order).
        Returns:
        The TableRow or null if the Object does not have a DOI.
        Throws:
        SQLException - if database error
        IllegalArgumentException - If the identifier is null, an empty String or specifies an DSpaceObject that is not an item. We currently support DOIs for items only, but this may change once...
        IllegalStateException - If the identifier was a valid DOI that is not stored in our database or if it is a handle that is not bound to an DSpaceObject.
        IdentifierException - if identifier error