Package org.dspace.identifier
Class IdentifierProvider
java.lang.Object
org.dspace.identifier.IdentifierProvider
- Direct Known Subclasses:
EZIDIdentifierProvider,FilteredIdentifierProvider,HandleIdentifierProvider,VersionedHandleIdentifierProvider,VersionedHandleIdentifierProviderWithCanonicalHandles
- Author:
- Fabio Bolognesi (fabio at atmire dot com), Mark Diggory (markd at atmire dot com), Ben Bosman (ben at atmire dot com)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voiddelete(Context context, DSpaceObject dso) Unbind this type of identifier(s) from an object.abstract voiddelete(Context context, DSpaceObject dso, String identifier) Unbind the given identifier from an object.abstract Stringlookup(Context context, DSpaceObject object) Return the identifier for a DSpaceObject.abstract Stringmint(Context context, DSpaceObject dso) Create an identifier for a DSpaceObject.abstract Stringregister(Context context, DSpaceObject item) Create and apply an identifier to a DSpaceObject.abstract voidregister(Context context, DSpaceObject object, String identifier) Create a specific identifier and apply it to an object.abstract voidreserve(Context context, DSpaceObject dso, String identifier) Set an object's identifier.abstract DSpaceObjectFind the object named by a given identifier.voidsetConfigurationService(ConfigurationService configurationService) voidsetParentService(IdentifierService parentService) abstract booleansupports(Class<? extends Identifier> identifier) Can this provider provide identifiers of a given type?abstract booleanCan this provider provide identifiers of a given type?
-
Field Details
-
parentService
-
configurationService
-
-
Constructor Details
-
IdentifierProvider
public IdentifierProvider()
-
-
Method Details
-
setConfigurationService
@Autowired(required=true) public void setConfigurationService(ConfigurationService configurationService) -
setParentService
-
supports
Can this provider provide identifiers of a given type?- Parameters:
identifier- requested type.- Returns:
- true if the given type is assignable from this provider's type.
-
supports
Can this provider provide identifiers of a given type?- Parameters:
identifier- requested type.- Returns:
- true if this provider can provide the named type of identifier.
-
register
Create and apply an identifier to a DSpaceObject.- Parameters:
context- The relevant DSpace Context.item- object to be named.- Returns:
- existing identifier of
itemif it has one, else a new identifier. - Throws:
IdentifierException- if identifier error
-
mint
Create an identifier for a DSpaceObject.- Parameters:
context- The relevant DSpace Context.dso- object to be named.- Returns:
- existing identifier of
dsoif it has one, else a new identifier. - Throws:
IdentifierException- if identifier error
-
resolve
public abstract DSpaceObject resolve(Context context, String identifier, String... attributes) throws IdentifierNotFoundException, IdentifierNotResolvableException Find the object named by a given identifier.- Parameters:
context- The relevant DSpace Context.identifier- to be resolved.attributes- additional information for resolvingidentifier.- Returns:
- the named object.
- Throws:
IdentifierNotFoundException- if identifier not foundIdentifierNotResolvableException- if identifier not resolvable
-
lookup
public abstract String lookup(Context context, DSpaceObject object) throws IdentifierNotFoundException, IdentifierNotResolvableException Return the identifier for a DSpaceObject.- Parameters:
context- The relevant DSpace Context.object- The object to be looked up.- Returns:
- identifier for
object. - Throws:
IdentifierNotFoundException- if identifier not foundIdentifierNotResolvableException- if identifier not resolvable
-
delete
Unbind this type of identifier(s) from an object.- Parameters:
context- The relevant DSpace Context.dso- object to lose its identity.- Throws:
IdentifierException- if identifier error
-
delete
public abstract void delete(Context context, DSpaceObject dso, String identifier) throws IdentifierException Unbind the given identifier from an object.- Parameters:
context- The relevant DSpace Context.dso- object to be de-identified.identifier- to be removed.- Throws:
IdentifierException- if identifier error
-
reserve
public abstract void reserve(Context context, DSpaceObject dso, String identifier) throws IdentifierException Set an object's identifier.- Parameters:
context- The relevant DSpace Context.dso- object to be identified.identifier- to be set on the object.- Throws:
IdentifierException- if identifier error
-
register
public abstract void register(Context context, DSpaceObject object, String identifier) throws IdentifierException Create a specific identifier and apply it to an object.- Parameters:
context- The relevant DSpace Context.object- to be identified.identifier- to be created.- Throws:
IdentifierException- if identifier error
-