public interface DOIService
| Modifier and Type | Method and Description |
|---|---|
DOI |
create(Context context) |
String |
DOIFromExternalFormat(String identifier) |
String |
DOIToExternalForm(String identifier)
This method helps to convert a DOI into a URL.
|
DOI |
findByDoi(Context context,
String doi) |
DOI |
findDOIByDSpaceObject(Context context,
DSpaceObject dso) |
DOI |
findDOIByDSpaceObject(Context context,
DSpaceObject dso,
List<Integer> statusToExclude) |
String |
formatIdentifier(String identifier)
Recognize format of DOI and return it with leading doi-Scheme.
|
List<DOI> |
getDOIsByStatus(Context context,
List<Integer> statuses) |
List<DOI> |
getSimilarDOIsNotInState(Context context,
String doiPattern,
List<Integer> statuses,
boolean dsoIsNotNull)
Find all DOIs that are similar to the specified pattern ant not in the specified states.
|
void |
update(Context context,
DOI doi) |
void update(Context context, DOI doi) throws SQLException
SQLExceptionDOI create(Context context) throws SQLException
SQLExceptionDOI findByDoi(Context context, String doi) throws SQLException
SQLExceptionDOI findDOIByDSpaceObject(Context context, DSpaceObject dso) throws SQLException
SQLExceptionDOI findDOIByDSpaceObject(Context context, DSpaceObject dso, List<Integer> statusToExclude) throws SQLException
SQLExceptionString DOIToExternalForm(String identifier) throws IdentifierException
identifier - A DOI that should be returned in external form.IllegalArgumentException - If identifier is null or an empty String.IdentifierException - If identifier could not be recognized as valid DOI.String DOIFromExternalFormat(String identifier) throws DOIIdentifierException
DOIIdentifierExceptionString formatIdentifier(String identifier) throws DOIIdentifierException
identifier - Identifier to format, following format are accepted:
f.e. 10.123/456, doi:10.123/456, http://dx.doi.org/10.123/456.IllegalArgumentException - If identifier is empty or null.DOIIdentifierException - If DOI could not be recognized.List<DOI> getDOIsByStatus(Context context, List<Integer> statuses) throws SQLException
SQLExceptionList<DOI> getSimilarDOIsNotInState(Context context, String doiPattern, List<Integer> statuses, boolean dsoIsNotNull) throws SQLException
context - DSpace contextdoiPattern - The pattern, e.g. "10.5072/123.%"statuses - The statuses the DOI should not be in, @{link DOIIdentifierProvider.DELETED}.dsoIsNotNull - Boolean whether all DOIs should be excluded where the DSpaceObject is NULL.SQLException - if database errorCopyright © 2017 DuraSpace. All rights reserved.