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 DOIServicedoiServiceprotected HandleServicehandleServiceprotected ItemServiceitemService
-
Constructor Summary
Constructors Constructor Description DOIOrganiser(Context context, DOIIdentifierProvider provider)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete(String identifier)voidlist(String processName, PrintStream out, PrintStream err, Integer... status)static voidmain(String[] args)voidregister(DOI doiRow)voidreserve(DOI doiRow)DOIresolveToDOI(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)
-
-
-
Field Detail
-
handleService
protected HandleService handleService
-
itemService
protected ItemService itemService
-
doiService
protected DOIService doiService
-
-
Constructor Detail
-
DOIOrganiser
public DOIOrganiser(Context context, DOIIdentifierProvider provider)
-
-
Method Detail
-
main
public static void main(String[] args)
-
runCLI
public static void runCLI(Context context, DOIOrganiser organiser, String[] args)
-
list
public void list(String processName, PrintStream out, PrintStream err, Integer... status)
-
register
public void register(DOI doiRow) throws SQLException
- Throws:
SQLException
-
reserve
public void reserve(DOI doiRow) throws SQLException
- Throws:
SQLException
-
update
public void update(DOI doiRow)
-
delete
public void delete(String identifier) throws SQLException
- 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
-
-