@Component
public class VersionedHandleIdentifierProvider
extends org.dspace.identifier.IdentifierProvider
| Constructor and Description |
|---|
VersionedHandleIdentifierProvider() |
| Modifier and Type | Method and Description |
|---|---|
protected static String |
createId(int id)
Create a new handle id.
|
protected String |
createNewIdentifier(org.dspace.core.Context context,
org.dspace.content.DSpaceObject dso,
String handleId) |
protected AutoVersionImpl |
createVersion(org.dspace.core.Context c,
AutoVersionHistory vh,
org.dspace.content.Item item,
String summary,
Date date,
int versionNumber) |
void |
delete(org.dspace.core.Context context,
org.dspace.content.DSpaceObject dso) |
void |
delete(org.dspace.core.Context context,
org.dspace.content.DSpaceObject dso,
String identifier) |
protected static org.dspace.storage.rdbms.TableRow |
findHandleInternal(org.dspace.core.Context context,
String handle)
Find the database row corresponding to handle.
|
protected String |
getCanonical(org.dspace.content.Item item) |
protected String |
getCanonical(String identifier) |
protected static String |
getCanonicalForm(String handle) |
protected static org.dspace.storage.rdbms.TableRow |
getHandleInternal(org.dspace.core.Context context,
int type,
int id)
Return the handle for an Object, or null if the Object has no handle.
|
protected int |
getNextVersionNumer(AutoVersion latest) |
static String |
getPrefix()
Get the configured Handle prefix string, or a default
|
String |
lookup(org.dspace.core.Context context,
org.dspace.content.DSpaceObject dso) |
protected String |
makeIdentifierBasedOnHistory(org.dspace.core.Context context,
org.dspace.content.DSpaceObject dso,
String handleId,
AutoVersionHistory history) |
String |
mint(org.dspace.core.Context context,
org.dspace.content.DSpaceObject dso)
Creates a new handle in the database.
|
protected void |
modifyHandleMetadata(org.dspace.content.Item item,
String handle) |
protected String |
modifyHandleRecord(org.dspace.core.Context context,
org.dspace.content.DSpaceObject dso,
org.dspace.storage.rdbms.TableRow handle,
String handleId) |
protected void |
populateHandleMetadata(org.dspace.content.Item item) |
String |
register(org.dspace.core.Context context,
org.dspace.content.DSpaceObject dso) |
void |
register(org.dspace.core.Context context,
org.dspace.content.DSpaceObject dso,
String identifier) |
void |
reserve(org.dspace.core.Context context,
org.dspace.content.DSpaceObject dso,
String identifier) |
org.dspace.content.DSpaceObject |
resolve(org.dspace.core.Context context,
String identifier,
String... attributes) |
static String |
retrieveHandleOutOfUrl(String url) |
protected AutoVersionHistory |
retrieveVersionHistory(org.dspace.core.Context c,
org.dspace.content.Item item) |
void |
setVersionDAO(AutoVersionDAO versionDAO) |
void |
setVersionHistoryDAO(AutoVersionHistoryDAO versionHistoryDAO) |
boolean |
supports(Class<? extends org.dspace.identifier.Identifier> identifier) |
boolean |
supports(String identifier) |
public boolean supports(Class<? extends org.dspace.identifier.Identifier> identifier)
supports in class org.dspace.identifier.IdentifierProviderpublic boolean supports(String identifier)
supports in class org.dspace.identifier.IdentifierProviderpublic String register(org.dspace.core.Context context, org.dspace.content.DSpaceObject dso)
register in class org.dspace.identifier.IdentifierProviderpublic void register(org.dspace.core.Context context,
org.dspace.content.DSpaceObject dso,
String identifier)
register in class org.dspace.identifier.IdentifierProviderpublic void reserve(org.dspace.core.Context context,
org.dspace.content.DSpaceObject dso,
String identifier)
reserve in class org.dspace.identifier.IdentifierProviderpublic String mint(org.dspace.core.Context context, org.dspace.content.DSpaceObject dso)
mint in class org.dspace.identifier.IdentifierProvidercontext - DSpace contextdso - The DSpaceObject to create a handle forpublic org.dspace.content.DSpaceObject resolve(org.dspace.core.Context context,
String identifier,
String... attributes)
resolve in class org.dspace.identifier.IdentifierProviderpublic String lookup(org.dspace.core.Context context, org.dspace.content.DSpaceObject dso) throws org.dspace.identifier.IdentifierNotFoundException, org.dspace.identifier.IdentifierNotResolvableException
lookup in class org.dspace.identifier.IdentifierProviderorg.dspace.identifier.IdentifierNotFoundExceptionorg.dspace.identifier.IdentifierNotResolvableExceptionpublic void delete(org.dspace.core.Context context,
org.dspace.content.DSpaceObject dso,
String identifier)
throws org.dspace.identifier.IdentifierException
delete in class org.dspace.identifier.IdentifierProviderorg.dspace.identifier.IdentifierExceptionpublic void delete(org.dspace.core.Context context,
org.dspace.content.DSpaceObject dso)
throws org.dspace.identifier.IdentifierException
delete in class org.dspace.identifier.IdentifierProviderorg.dspace.identifier.IdentifierExceptionpublic static String retrieveHandleOutOfUrl(String url) throws SQLException
SQLExceptionpublic static String getPrefix()
protected String createNewIdentifier(org.dspace.core.Context context, org.dspace.content.DSpaceObject dso, String handleId) throws SQLException
SQLExceptionprotected String makeIdentifierBasedOnHistory(org.dspace.core.Context context, org.dspace.content.DSpaceObject dso, String handleId, AutoVersionHistory history) throws org.dspace.authorize.AuthorizeException, SQLException
org.dspace.authorize.AuthorizeExceptionSQLExceptionprotected String modifyHandleRecord(org.dspace.core.Context context, org.dspace.content.DSpaceObject dso, org.dspace.storage.rdbms.TableRow handle, String handleId) throws SQLException
SQLExceptionprotected String getCanonical(org.dspace.content.Item item)
protected static org.dspace.storage.rdbms.TableRow findHandleInternal(org.dspace.core.Context context,
String handle)
throws SQLException
context - DSpace contexthandle - The handle to resolveSQLException - If a database error occursprotected static org.dspace.storage.rdbms.TableRow getHandleInternal(org.dspace.core.Context context,
int type,
int id)
throws SQLException
context - DSpace contexttype - The type of objectid - The id of objectSQLException - If a database error occursprotected static String createId(int id) throws SQLException
SQLException - If a database error occursprotected AutoVersionHistory retrieveVersionHistory(org.dspace.core.Context c, org.dspace.content.Item item)
protected void populateHandleMetadata(org.dspace.content.Item item)
throws SQLException,
IOException,
org.dspace.authorize.AuthorizeException
SQLExceptionIOExceptionorg.dspace.authorize.AuthorizeExceptionprotected void modifyHandleMetadata(org.dspace.content.Item item,
String handle)
throws SQLException,
IOException,
org.dspace.authorize.AuthorizeException
SQLExceptionIOExceptionorg.dspace.authorize.AuthorizeExceptionprotected AutoVersionImpl createVersion(org.dspace.core.Context c, AutoVersionHistory vh, org.dspace.content.Item item, String summary, Date date, int versionNumber)
protected int getNextVersionNumer(AutoVersion latest)
public void setVersionDAO(AutoVersionDAO versionDAO)
public void setVersionHistoryDAO(AutoVersionHistoryDAO versionHistoryDAO)
Copyright © 2016 DuraSpace. All rights reserved.