Package org.dspace.identifier.doi
Class DOIOrganiser
java.lang.Object
org.dspace.identifier.doi.DOIOrganiser
- Author:
- Marsa Haoua, Pascal-Nicolas Becker
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ConfigurationServiceprotected DOIServiceprotected Filterprotected HandleServiceprotected ItemService -
Constructor Summary
ConstructorsConstructorDescriptionDOIOrganiser(Context context, DOIIdentifierProvider provider) Constructor to be called within the main() method -
Method Summary
Modifier and TypeMethodDescriptionvoidDelete a DOIvoidlist(String processName, PrintStream out, PrintStream err, Integer... status) list DOIs queued for reservation or registrationstatic voidMain command-line runner method as with other DSpace launcher commandsvoidRegister DOI with the provider.voidRegister DOI with the providervoidReserve DOI with the provider,voidReserve DOI with the provider.resolveToDOI(String identifier) Finds the TableRow in the Doi table that belongs to the specified DspaceObject.static voidrunCLI(Context context, DOIOrganiser organiser, String[] args) voidUpdate metadata for a DOI
-
Field Details
-
handleService
-
itemService
-
doiService
-
configurationService
-
filter
-
-
Constructor Details
-
DOIOrganiser
Constructor to be called within the main() method- Parameters:
context- - DSpace contextprovider- - DOI identifier provider to use
-
-
Method Details
-
main
Main command-line runner method as with other DSpace launcher commands- Parameters:
args- - the command line arguments to parse as parameters
-
runCLI
-
list
list DOIs queued for reservation or registration- Parameters:
processName- - process name for displayout- - output stream (eg. STDOUT)err- - error output stream (eg. STDERR)status- - status codes
-
register
public void register(DOI doiRow, Filter filter) throws IllegalArgumentException, IllegalStateException, RuntimeException Register DOI with the provider- Parameters:
doiRow- DOI to registerfilter- logical item filter to override- Throws:
IllegalArgumentException- ifdoiRowdoes not name an Item.IllegalStateException- on invalid DOI.RuntimeException- on database error.
-
register
public void register(DOI doiRow) throws IllegalStateException, IllegalArgumentException, RuntimeException Register DOI with the provider.- Parameters:
doiRow- DOI to register- Throws:
IllegalArgumentException- passed through.IllegalStateException- passed through.RuntimeException- passed through.
-
reserve
Reserve DOI with the provider,- Parameters:
doiRow- - doi to reserve
-
reserve
Reserve DOI with the provider.- Parameters:
doiRow- - doi to reservefilter- - Logical item filter to determine whether this identifier should be reserved online.- Throws:
IllegalStateException- on invalid DOI.RuntimeException- on database error.
-
update
Update metadata for a DOI- Parameters:
doiRow- - DOI to update
-
delete
Delete a DOI- Parameters:
identifier- - DOI to delete- Throws:
SQLException
-
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 errorIllegalArgumentException- 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
-