@Component public class HandleIdentifierProvider extends IdentifierProvider
| Modifier and Type | Field and Description |
|---|---|
protected static String |
EXAMPLE_PREFIX
Prefix registered to no one
|
protected String[] |
supportedPrefixes |
configurationService, parentService| Constructor and Description |
|---|
HandleIdentifierProvider() |
| Modifier and Type | Method and Description |
|---|---|
protected static String |
createId(int id)
Create a new handle id.
|
protected String |
createNewIdentifier(Context context,
DSpaceObject dso,
String handleId) |
void |
delete(Context context,
DSpaceObject dso) |
void |
delete(Context context,
DSpaceObject dso,
String identifier) |
protected static TableRow |
findHandleInternal(Context context,
String handle)
Find the database row corresponding to handle.
|
protected static String |
getCanonicalForm(String handle) |
protected static TableRow |
getHandleInternal(Context context,
int type,
int id)
Return the handle for an Object, or null if the Object has no handle.
|
static String |
getPrefix()
Get the configured Handle prefix string, or a default
|
String |
lookup(Context context,
DSpaceObject dso) |
String |
mint(Context context,
DSpaceObject dso)
Creates a new handle in the database.
|
protected String |
modifyHandleRecord(Context context,
DSpaceObject dso,
TableRow handle,
String handleId) |
protected void |
populateHandleMetadata(Item item,
String handle) |
String |
register(Context context,
DSpaceObject dso) |
void |
register(Context context,
DSpaceObject dso,
String identifier) |
void |
reserve(Context context,
DSpaceObject dso,
String identifier) |
DSpaceObject |
resolve(Context context,
String identifier,
String... attributes) |
static String |
retrieveHandleOutOfUrl(String url) |
boolean |
supports(Class<? extends Identifier> identifier) |
boolean |
supports(String identifier) |
setConfigurationService, setParentServiceprotected static final String EXAMPLE_PREFIX
protected String[] supportedPrefixes
public boolean supports(Class<? extends Identifier> identifier)
supports in class IdentifierProviderpublic boolean supports(String identifier)
supports in class IdentifierProviderpublic String register(Context context, DSpaceObject dso)
register in class IdentifierProviderpublic void register(Context context, DSpaceObject dso, String identifier)
register in class IdentifierProviderpublic void reserve(Context context, DSpaceObject dso, String identifier)
reserve in class IdentifierProviderpublic String mint(Context context, DSpaceObject dso)
mint in class IdentifierProvidercontext - DSpace contextdso - The DSpaceObject to create a handle forSQLException - If a database error occurspublic DSpaceObject resolve(Context context, String identifier, String... attributes)
resolve in class IdentifierProviderpublic String lookup(Context context, DSpaceObject dso) throws IdentifierNotFoundException, IdentifierNotResolvableException
lookup in class IdentifierProviderIdentifierNotFoundExceptionIdentifierNotResolvableExceptionpublic void delete(Context context, DSpaceObject dso, String identifier) throws IdentifierException
delete in class IdentifierProviderIdentifierExceptionpublic void delete(Context context, DSpaceObject dso) throws IdentifierException
delete in class IdentifierProviderIdentifierExceptionpublic static String retrieveHandleOutOfUrl(String url) throws SQLException
SQLExceptionpublic static String getPrefix()
protected String createNewIdentifier(Context context, DSpaceObject dso, String handleId) throws SQLException
SQLExceptionprotected String modifyHandleRecord(Context context, DSpaceObject dso, TableRow handle, String handleId) throws SQLException
SQLExceptionprotected static TableRow getHandleInternal(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 TableRow findHandleInternal(Context context, String handle) throws SQLException
context - DSpace contexthandle - The handle to resolveSQLException - If a database error occursprotected static String createId(int id) throws SQLException
SQLException - If a database error occursprotected void populateHandleMetadata(Item item, String handle) throws SQLException, IOException, AuthorizeException
Copyright © 2015 DuraSpace. All Rights Reserved.