@Component public class VersionedHandleIdentifierProviderWithCanonicalHandles extends IdentifierProvider
configurationService, parentService| Constructor and Description |
|---|
VersionedHandleIdentifierProviderWithCanonicalHandles() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
createNewIdentifier(Context context,
DSpaceObject dso,
String handleId) |
void |
delete(Context context,
DSpaceObject dso)
Unbind this type of identifier(s) from an object.
|
void |
delete(Context context,
DSpaceObject dso,
String identifier)
Unbind the given identifier from an object.
|
protected String |
getCanonical(Context context,
Item item) |
protected String |
getCanonical(String identifier) |
protected VersionHistory |
getHistory(Context context,
String identifier) |
static String |
getPrefix()
Get the configured Handle prefix string, or a default
|
String |
lookup(Context context,
DSpaceObject dso)
Return the identifier for a DSpaceObject.
|
protected String |
makeIdentifierBasedOnHistory(Context context,
DSpaceObject dso,
VersionHistory history) |
String |
mint(Context context,
DSpaceObject dso)
Creates a new handle in the database.
|
protected void |
modifyHandleMetadata(Context context,
Item item,
String handle)
Remove all handles from an item's metadata and add the supplied handle instead.
|
String |
register(Context context,
DSpaceObject dso)
Create and apply an identifier to a DSpaceObject.
|
void |
register(Context context,
DSpaceObject dso,
String identifier)
Create a specific identifier and apply it to an object.
|
void |
reserve(Context context,
DSpaceObject dso,
String identifier)
Set an object's identifier.
|
DSpaceObject |
resolve(Context context,
String identifier,
String... attributes)
Find the object named by a given identifier.
|
protected void |
restoreItAsCanonical(Context context,
DSpaceObject dso,
String identifier,
Item item,
String canonical) |
protected void |
restoreItAsVersion(Context context,
DSpaceObject dso,
String identifier,
Item item,
String canonical,
VersionHistory history) |
static String |
retrieveHandleOutOfUrl(String url) |
boolean |
supports(Class<? extends Identifier> identifier)
Can this provider provide identifiers of a given type?
|
boolean |
supports(String identifier)
Can this provider provide identifiers of a given type?
|
setConfigurationService, setParentServicepublic VersionedHandleIdentifierProviderWithCanonicalHandles()
public boolean supports(Class<? extends Identifier> identifier)
IdentifierProvidersupports in class IdentifierProvideridentifier - requested type.public boolean supports(String identifier)
IdentifierProvidersupports in class IdentifierProvideridentifier - requested type.public String register(Context context, DSpaceObject dso)
IdentifierProviderorg.dspace.content.DSpaceObject#resetIdentifiersCache() after its registration. If you register
identifiers directly in this method the IdentifierService will call this method for you.register in class IdentifierProviderdso - object to be named.item if it has one, else a new identifier.public void register(Context context, DSpaceObject dso, String identifier)
IdentifierProviderregister in class IdentifierProviderdso - to be identified.identifier - to be created.protected VersionHistory getHistory(Context context, String identifier) throws SQLException
SQLExceptionprotected void restoreItAsVersion(Context context, DSpaceObject dso, String identifier, Item item, String canonical, VersionHistory history) throws SQLException, IOException, AuthorizeException
protected void restoreItAsCanonical(Context context, DSpaceObject dso, String identifier, Item item, String canonical) throws SQLException, IOException, AuthorizeException
public void reserve(Context context, DSpaceObject dso, String identifier)
IdentifierProviderreserve in class IdentifierProviderdso - object to be identified.identifier - to be set on the object.public String mint(Context context, DSpaceObject dso)
mint in class IdentifierProvidercontext - DSpace contextdso - The DSpaceObject to create a handle forpublic DSpaceObject resolve(Context context, String identifier, String... attributes)
IdentifierProviderresolve in class IdentifierProvideridentifier - to be resolved.attributes - additional information for resolving identifier.public String lookup(Context context, DSpaceObject dso) throws IdentifierNotFoundException, IdentifierNotResolvableException
IdentifierProviderlookup in class IdentifierProviderdso - The object to be looked up.object.IdentifierNotFoundException - if identifier not foundIdentifierNotResolvableException - if identifier not resolvablepublic void delete(Context context, DSpaceObject dso, String identifier) throws IdentifierException
IdentifierProviderdelete in class IdentifierProviderdso - object to be de-identified.identifier - to be removed.IdentifierException - if identifier errorpublic void delete(Context context, DSpaceObject dso) throws IdentifierException
IdentifierProviderdelete in class IdentifierProviderdso - object to lose its identity.IdentifierException - if identifier errorpublic static String getPrefix()
protected String createNewIdentifier(Context context, DSpaceObject dso, String handleId) throws SQLException
SQLExceptionprotected String makeIdentifierBasedOnHistory(Context context, DSpaceObject dso, VersionHistory history) throws AuthorizeException, SQLException
AuthorizeExceptionSQLExceptionprotected void modifyHandleMetadata(Context context, Item item, String handle) throws SQLException, AuthorizeException
context - item - handle - SQLException - if database errorAuthorizeException - if authorization errorCopyright © 2022 LYRASIS. All rights reserved.