Package org.dspace.identifier
Class HandleIdentifierProvider
java.lang.Object
org.dspace.identifier.IdentifierProvider
org.dspace.identifier.HandleIdentifierProvider
The old DSpace handle identifier service, used to create handles or retrieve objects based on their handle
- Author:
- Fabio Bolognesi (fabio at atmire dot com), Mark Diggory (markd at atmire dot com), Ben Bosman (ben at atmire dot com)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ContentServiceFactoryprotected static final StringPrefix registered to no oneprotected HandleServiceFields inherited from class org.dspace.identifier.IdentifierProvider
configurationService, parentService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(Context context, DSpaceObject dso) Unbind this type of identifier(s) from an object.voiddelete(Context context, DSpaceObject dso, String identifier) Unbind the given identifier from an object.static StringGet the configured Handle prefix string, or a defaultlookup(Context context, DSpaceObject dso) Return the identifier for a DSpaceObject.mint(Context context, DSpaceObject dso) Creates a new handle in the database.protected voidpopulateHandleMetadata(Context context, DSpaceObject dso, String handle) register(Context context, DSpaceObject dso) Create and apply an identifier to a DSpaceObject.voidregister(Context context, DSpaceObject dso, String identifier) Create a specific identifier and apply it to an object.voidreserve(Context context, DSpaceObject dso, String identifier) Set an object's identifier.Find the object named by a given identifier.static Stringbooleansupports(Class<? extends Identifier> identifier) Can this provider provide identifiers of a given type?booleanCan this provider provide identifiers of a given type?Methods inherited from class org.dspace.identifier.IdentifierProvider
setConfigurationService, setParentService
-
Field Details
-
EXAMPLE_PREFIX
Prefix registered to no one- See Also:
-
handleService
-
contentServiceFactory
-
-
Constructor Details
-
HandleIdentifierProvider
public HandleIdentifierProvider()
-
-
Method Details
-
supports
Description copied from class:IdentifierProviderCan this provider provide identifiers of a given type?- Specified by:
supportsin classIdentifierProvider- Parameters:
identifier- requested type.- Returns:
- true if the given type is assignable from this provider's type.
-
supports
Description copied from class:IdentifierProviderCan this provider provide identifiers of a given type?- Specified by:
supportsin classIdentifierProvider- Parameters:
identifier- requested type.- Returns:
- true if this provider can provide the named type of identifier.
-
register
Description copied from class:IdentifierProviderCreate and apply an identifier to a DSpaceObject.- Specified by:
registerin classIdentifierProvider- Parameters:
context- The relevant DSpace Context.dso- object to be named.- Returns:
- existing identifier of
itemif it has one, else a new identifier.
-
register
Description copied from class:IdentifierProviderCreate a specific identifier and apply it to an object.- Specified by:
registerin classIdentifierProvider- Parameters:
context- The relevant DSpace Context.dso- to be identified.identifier- to be created.
-
reserve
Description copied from class:IdentifierProviderSet an object's identifier.- Specified by:
reservein classIdentifierProvider- Parameters:
context- The relevant DSpace Context.dso- object to be identified.identifier- to be set on the object.
-
mint
Creates a new handle in the database.- Specified by:
mintin classIdentifierProvider- Parameters:
context- DSpace contextdso- The DSpaceObject to create a handle for- Returns:
- The newly created handle
-
resolve
Description copied from class:IdentifierProviderFind the object named by a given identifier.- Specified by:
resolvein classIdentifierProvider- Parameters:
context- The relevant DSpace Context.identifier- to be resolved.attributes- additional information for resolvingidentifier.- Returns:
- the named object.
-
lookup
public String lookup(Context context, DSpaceObject dso) throws IdentifierNotFoundException, IdentifierNotResolvableException Description copied from class:IdentifierProviderReturn the identifier for a DSpaceObject.- Specified by:
lookupin classIdentifierProvider- Parameters:
context- The relevant DSpace Context.dso- The object to be looked up.- Returns:
- identifier for
object. - Throws:
IdentifierNotFoundException- if identifier not foundIdentifierNotResolvableException- if identifier not resolvable
-
delete
Description copied from class:IdentifierProviderUnbind the given identifier from an object.- Specified by:
deletein classIdentifierProvider- Parameters:
context- The relevant DSpace Context.dso- object to be de-identified.identifier- to be removed.- Throws:
IdentifierException- if identifier error
-
delete
Description copied from class:IdentifierProviderUnbind this type of identifier(s) from an object.- Specified by:
deletein classIdentifierProvider- Parameters:
context- The relevant DSpace Context.dso- object to lose its identity.- Throws:
IdentifierException- if identifier error
-
retrieveHandleOutOfUrl
- Throws:
SQLException
-
getPrefix
Get the configured Handle prefix string, or a default- Returns:
- configured prefix or "123456789"
-
populateHandleMetadata
protected void populateHandleMetadata(Context context, DSpaceObject dso, String handle) throws SQLException, IOException, AuthorizeException
-