Package org.dspace.identifier.doi
Class DOIOrganiser
- java.lang.Object
-
- org.dspace.identifier.doi.DOIOrganiser
-
public class DOIOrganiser extends Object
- Author:
- Marsa Haoua, Pascal-Nicolas Becker
-
-
Field Summary
Fields Modifier and Type Field Description protected ConfigurationServiceconfigurationServiceprotected DOIServicedoiServiceprotected Filterfilterprotected HandleServicehandleServiceprotected ItemServiceitemService
-
Constructor Summary
Constructors Constructor Description DOIOrganiser(Context context, DOIIdentifierProvider provider)Constructor to be called within the main() method
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete(String identifier)Delete a DOIvoidlist(String processName, PrintStream out, PrintStream err, Integer... status)list DOIs queued for reservation or registrationstatic voidmain(String[] args)Main command-line runner method as with other DSpace launcher commandsvoidregister(DOI doiRow)Register DOI with the providervoidregister(DOI doiRow, Filter filter)Register DOI with the providervoidreserve(DOI doiRow)Reserve DOI with the provider,voidreserve(DOI doiRow, Filter filter)Reserve DOI with the providerDOIresolveToDOI(String identifier)Finds the TableRow in the Doi table that belongs to the specified DspaceObject.static voidrunCLI(Context context, DOIOrganiser organiser, String[] args)voidupdate(DOI doiRow)Update metadata for a DOI
-
-
-
Field Detail
-
handleService
protected HandleService handleService
-
itemService
protected ItemService itemService
-
doiService
protected DOIService doiService
-
configurationService
protected ConfigurationService configurationService
-
filter
protected Filter filter
-
-
Constructor Detail
-
DOIOrganiser
public DOIOrganiser(Context context, DOIIdentifierProvider provider)
Constructor to be called within the main() method- Parameters:
context- - DSpace contextprovider- - 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
-
runCLI
public static void runCLI(Context context, DOIOrganiser organiser, String[] args)
-
list
public void list(String processName, PrintStream out, PrintStream err, Integer... status)
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 SQLException, DOIIdentifierException
Register DOI with the provider- Parameters:
doiRow- - doi to registerfilter- - logical item filter to override- Throws:
SQLExceptionDOIIdentifierException
-
register
public void register(DOI doiRow) throws SQLException, DOIIdentifierException
Register DOI with the provider- Parameters:
doiRow- - doi to register- Throws:
SQLExceptionDOIIdentifierException
-
reserve
public void reserve(DOI doiRow)
Reserve DOI with the provider,- Parameters:
doiRow- - doi to reserve- Throws:
SQLExceptionDOIIdentifierException
-
reserve
public void reserve(DOI doiRow, Filter filter)
Reserve DOI with the provider- Parameters:
doiRow- - doi to reserve- Throws:
SQLExceptionDOIIdentifierException
-
update
public void update(DOI doiRow)
Update metadata for a DOI- Parameters:
doiRow- - DOI to update
-
delete
public void delete(String identifier) throws SQLException
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
-
-