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
- All Implemented Interfaces:
InitializingBean
public class VersionedDOIIdentifierProvider
extends DOIIdentifierProvider
implements InitializingBean
- Author:
- Marsa Haoua, Pascal-Nicolas Becker (dspace at pascal dash becker dot de)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DOIConnectorprotected static final Stringprotected VersionHistoryServiceprotected VersioningServiceFields inherited from class org.dspace.identifier.DOIIdentifierProvider
contentServiceFactory, DELETED, DOI_ELEMENT, DOI_QUALIFIER, doiService, IS_REGISTERED, IS_RESERVED, itemService, MD_SCHEMA, MINTED, PENDING, statusText, TO_BE_DELETED, TO_BE_REGISTERED, TO_BE_RESERVED, UPDATE_BEFORE_REGISTRATION, UPDATE_REGISTERED, UPDATE_RESERVEDFields inherited from class org.dspace.identifier.FilteredIdentifierProvider
filterFields inherited from class org.dspace.identifier.IdentifierProvider
configurationService, parentService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAfter all the properties are set check that the versioning is enabledprotected StringgetBareDOI(String identifier) protected StringgetDOIPostfix(String identifier) protected StringmakeIdentifierBasedOnHistory(Context context, DSpaceObject dso, VersionHistory history) protected StringmakeIdentifierBasedOnHistory(Context context, DSpaceObject dso, VersionHistory history, Filter filter) mint(Context context, DSpaceObject dso) Mint a new DOI in DSpace - this is usually the first step of registration Always apply filters if they are configuredmint(Context context, DSpaceObject dso, Filter filter) Mint a new DOI in DSpace - this is usually the first step of registrationvoidregister(Context context, DSpaceObject dso, String identifier) Register a specified DOI for a given DSpaceObject, never skipping or ignoring any configured filtervoidregister(Context context, DSpaceObject dso, String identifier, Filter filter) Register a specified DOI for a given DSpaceObjectregister(Context context, DSpaceObject dso, Filter filter) Register a new DOI for a given DSpaceObjectvoidsetConfigurationService(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, checkMintable, delete, delete, deleteOnline, getDOIByObject, getDOIOutOfObject, getNamespaceSeparator, getObjectByDOI, getPrefix, loadOrCreateDOI, loadOrCreateDOI, lookup, register, registerOnline, registerOnline, removeDOIFromObject, reserve, reserve, reserveOnline, reserveOnline, resolve, saveDOIToObject, supports, supports, updateMetadata, updateMetadataOnlineMethods inherited from class org.dspace.identifier.FilteredIdentifierProvider
setFilterMethods inherited from class org.dspace.identifier.IdentifierProvider
setParentService
-
Field Details
-
connector
-
pattern
-
versioningService
-
versionHistoryService
-
-
Constructor Details
-
VersionedDOIIdentifierProvider
public VersionedDOIIdentifierProvider()
-
-
Method Details
-
afterPropertiesSet
After all the properties are set check that the versioning is enabled- Specified by:
afterPropertiesSetin interfaceInitializingBean- Throws:
Exception- throws an exception if this isn't the case
-
mint
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
-
mint
Description copied from class:DOIIdentifierProviderMint a new DOI in DSpace - this is usually the first step of registration- Overrides:
mintin classDOIIdentifierProvider- Parameters:
context- - DSpace contextdso- - DSpaceObject identified by the new identifierfilter- - Logical item filter to determine whether this identifier should be registered- Returns:
- a String containing the new identifier
- Throws:
IdentifierException
-
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
-
register
Description copied from class:DOIIdentifierProviderRegister a new DOI for a given DSpaceObject- Overrides:
registerin classDOIIdentifierProvider- Parameters:
context- - DSpace contextdso- - DSpaceObject identified by the new DOIfilter- - Logical item filter to determine whether this identifier should be registered- Returns:
- identifier
- Throws:
IdentifierException
-
register
public void register(Context context, DSpaceObject dso, String identifier, Filter filter) throws IdentifierException Description copied from class:DOIIdentifierProviderRegister a specified DOI for a given DSpaceObject- Overrides:
registerin classDOIIdentifierProvider- Parameters:
context- - DSpace contextdso- - DSpaceObject identified by the new DOIidentifier- - String containing the DOI to registerfilter- - Logical item filter to determine whether this identifier should be registered- Throws:
IdentifierException
-
getBareDOI
- Throws:
DOIIdentifierException
-
getDOIPostfix
- Throws:
DOIIdentifierException
-
makeIdentifierBasedOnHistory
protected String makeIdentifierBasedOnHistory(Context context, DSpaceObject dso, VersionHistory history) throws AuthorizeException, SQLException, DOIIdentifierException, IdentifierNotApplicableException -
makeIdentifierBasedOnHistory
protected String makeIdentifierBasedOnHistory(Context context, DSpaceObject dso, VersionHistory history, Filter filter) throws AuthorizeException, SQLException, DOIIdentifierException, IdentifierNotApplicableException -
setDOIConnector
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
-