Package org.dspace.identifier
Class VersionedDOIIdentifierProvider
- java.lang.Object
-
- org.dspace.identifier.IdentifierProvider
-
- org.dspace.identifier.FilteredIdentifierProvider
-
- org.dspace.identifier.DOIIdentifierProvider
-
- org.dspace.identifier.VersionedDOIIdentifierProvider
-
public class VersionedDOIIdentifierProvider extends DOIIdentifierProvider
- Author:
- Marsa Haoua, Pascal-Nicolas Becker (dspace at pascal dash becker dot de)
-
-
Field Summary
Fields Modifier and Type Field Description protected DOIConnectorconnectorprotected static Stringpatternprotected VersionHistoryServiceversionHistoryServiceprotected VersioningServiceversioningService-
Fields inherited from class org.dspace.identifier.DOIIdentifierProvider
contentServiceFactory, DELETED, DOI_ELEMENT, DOI_QUALIFIER, doiService, filterService, IS_REGISTERED, IS_RESERVED, itemService, MD_SCHEMA, TO_BE_DELETED, TO_BE_REGISTERED, TO_BE_RESERVED, UPDATE_BEFORE_REGISTRATION, UPDATE_REGISTERED, UPDATE_RESERVED
-
Fields inherited from class org.dspace.identifier.IdentifierProvider
configurationService, parentService
-
-
Constructor Summary
Constructors Constructor Description VersionedDOIIdentifierProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetBareDOI(String identifier)protected StringgetDOIPostfix(String identifier)protected StringmakeIdentifierBasedOnHistory(Context context, DSpaceObject dso, VersionHistory history)Stringmint(Context context, DSpaceObject dso)Mint a new DOI in DSpace - this is usually the first step of registration Always apply filters if they are configuredvoidregister(Context context, DSpaceObject dso, String identifier)Register a specified DOI for a given DSpaceObject, never skipping or ignoring any configured filtervoidsetConfigurationService(ConfigurationService configurationService)voidsetDOIConnector(DOIConnector connector)Set the DOI connector, which is the component that commuincates with the remote registration service (eg.-
Methods inherited from class org.dspace.identifier.DOIIdentifierProvider
checkMintable, delete, delete, deleteOnline, getDOIByObject, getDOIOutOfObject, getNamespaceSeparator, getObjectByDOI, getPrefix, loadOrCreateDOI, loadOrCreateDOI, lookup, mint, register, register, register, registerOnline, registerOnline, removeDOIFromObject, reserve, reserve, reserveOnline, reserveOnline, resolve, saveDOIToObject, setFilterService, supports, supports, updateMetadata, updateMetadataOnline
-
Methods inherited from class org.dspace.identifier.IdentifierProvider
setParentService
-
-
-
-
Field Detail
-
connector
protected DOIConnector connector
-
pattern
protected static final String pattern
-
versioningService
@Autowired(required=true) protected VersioningService versioningService
-
versionHistoryService
@Autowired(required=true) protected VersionHistoryService versionHistoryService
-
-
Method Detail
-
mint
public String mint(Context context, DSpaceObject dso) throws IdentifierException
Description copied from class:DOIIdentifierProviderMint a new DOI in DSpace - this is usually the first step of registration Always apply filters if they are configured- Overrides:
mintin classDOIIdentifierProvider- Parameters:
context- - DSpace contextdso- - DSpaceObject identified by the new identifier- Returns:
- a String containing the new identifier
- Throws:
IdentifierException- if identifier error
-
register
public void register(Context context, DSpaceObject dso, String identifier) throws IdentifierException
Description copied from class:DOIIdentifierProviderRegister a specified DOI for a given DSpaceObject, never skipping or ignoring any configured filter- Overrides:
registerin classDOIIdentifierProvider- Parameters:
context- - DSpace contextdso- - DSpaceObject identified by the new DOIidentifier- - String containing the identifier to register- Throws:
IdentifierException- if identifier error
-
getBareDOI
protected String getBareDOI(String identifier) throws DOIIdentifierException
- Throws:
DOIIdentifierException
-
getDOIPostfix
protected String getDOIPostfix(String identifier) throws DOIIdentifierException
- Throws:
DOIIdentifierException
-
makeIdentifierBasedOnHistory
protected String makeIdentifierBasedOnHistory(Context context, DSpaceObject dso, VersionHistory history) throws AuthorizeException, SQLException, DOIIdentifierException, IdentifierNotApplicableException
-
setDOIConnector
@Autowired(required=true) public void setDOIConnector(DOIConnector connector)
Description copied from class:DOIIdentifierProviderSet the DOI connector, which is the component that commuincates with the remote registration service (eg. DataCite, EZID, Crossref) Spring will use this setter to set the DOI connector from the configured property in identifier-services.xml- Overrides:
setDOIConnectorin classDOIIdentifierProvider- Parameters:
connector- a DOIConnector
-
setConfigurationService
@Autowired(required=true) public void setConfigurationService(ConfigurationService configurationService)
- Overrides:
setConfigurationServicein classIdentifierProvider
-
-