public class DOIServiceImpl extends Object implements DOIService
| Modifier | Constructor and Description |
|---|---|
protected |
DOIServiceImpl() |
| 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) |
@Autowired(required=true) protected DOIDAO doiDAO
public void update(Context context, DOI doi) throws SQLException
update in interface DOIServiceSQLExceptionpublic DOI create(Context context) throws SQLException
create in interface DOIServiceSQLExceptionpublic DOI findByDoi(Context context, String doi) throws SQLException
findByDoi in interface DOIServiceSQLExceptionpublic DOI findDOIByDSpaceObject(Context context, DSpaceObject dso) throws SQLException
findDOIByDSpaceObject in interface DOIServiceSQLExceptionpublic DOI findDOIByDSpaceObject(Context context, DSpaceObject dso, List<Integer> statusToExclude) throws SQLException
findDOIByDSpaceObject in interface DOIServiceSQLExceptionpublic String DOIToExternalForm(String identifier) throws IdentifierException
DOIServiceDOIToExternalForm in interface DOIServiceidentifier - A DOI that should be returned in external form.IdentifierException - If identifier could not be recognized as valid DOI.public String DOIFromExternalFormat(String identifier) throws DOIIdentifierException
DOIFromExternalFormat in interface DOIServiceDOIIdentifierExceptionpublic String formatIdentifier(String identifier) throws DOIIdentifierException
DOIServiceformatIdentifier in interface DOIServiceidentifier - Identifier to format, following format are accepted:
f.e. 10.123/456, doi:10.123/456, http://dx.doi.org/10.123/456.DOIIdentifierException - If DOI could not be recognized.public List<DOI> getDOIsByStatus(Context context, List<Integer> statuses) throws SQLException
getDOIsByStatus in interface DOIServiceSQLExceptionpublic List<DOI> getSimilarDOIsNotInState(Context context, String doiPattern, List<Integer> statuses, boolean dsoIsNotNull) throws SQLException
DOIServicegetSimilarDOIsNotInState in interface DOIServicecontext - 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.SQLExceptionCopyright © 2016 DuraSpace. All Rights Reserved.