public interface HandleService
Currently, this class simply maps handles to local facilities; handles which are owned by other sites (including other DSpaces) are treated as non-existent.
| Modifier and Type | Method and Description |
|---|---|
long |
countHandlesByPrefix(Context context,
String prefix) |
int |
countTotal(Context context) |
String |
createHandle(Context context,
DSpaceObject dso)
Creates a new handle in the database.
|
String |
createHandle(Context context,
DSpaceObject dso,
String suppliedHandle)
Creates a handle entry, but with a handle supplied by the caller (new
Handle not generated)
|
String |
createHandle(Context context,
DSpaceObject dso,
String suppliedHandle,
boolean force)
Creates a handle entry, but with a handle supplied by the caller (new
Handle not generated)
|
String |
findHandle(Context context,
DSpaceObject dso)
Return the handle for an Object, or null if the Object has no handle.
|
String |
getCanonicalForm(String handle)
Transforms handle into a URI using canonical handle prefix
No attempt is made to verify that handle is in fact valid.
|
String |
getCanonicalPrefix()
Provides handle canonical prefix using http://hdl.handle.net/ if not
overridden by the configuration property handle.canonical.prefix.
|
List<String> |
getHandlesForPrefix(Context context,
String prefix)
Return all the handles which start with prefix.
|
String |
getPrefix()
Get the configured Handle prefix string, or a default
|
void |
modifyHandleDSpaceObject(Context context,
String handle,
DSpaceObject newOwner) |
DSpaceObject |
resolveToObject(Context context,
String handle)
Return the object which handle maps to, or null.
|
String |
resolveToURL(Context context,
String handle)
Return the local URL for handle, or null if handle cannot be found.
|
String |
resolveUrlToHandle(Context context,
String url)
Try to detect a handle in a URL.
|
void |
unbindHandle(Context context,
DSpaceObject dso)
Removes binding of Handle to a DSpace object, while leaving the
Handle in the table so it doesn't get reallocated.
|
int |
updateHandlesWithNewPrefix(Context context,
String newPrefix,
String oldPrefix) |
String resolveToURL(Context context, String handle) throws SQLException
context - DSpace contexthandle - The handleSQLException - If a database error occursString resolveUrlToHandle(Context context, String url) throws SQLException
context - DSpace contexturl - The URLSQLException - If a database error occursString getCanonicalPrefix()
String getCanonicalForm(String handle)
handle - The handleString createHandle(Context context, DSpaceObject dso) throws SQLException
context - DSpace contextdso - The DSpaceObject to create a handle forSQLException - If a database error occursString createHandle(Context context, DSpaceObject dso, String suppliedHandle) throws SQLException, IllegalStateException
context - DSpace contextdso - DSpaceObjectsuppliedHandle - existing handle valueIllegalStateException - if specified handle is already in use by another objectSQLExceptionString createHandle(Context context, DSpaceObject dso, String suppliedHandle, boolean force) throws SQLException, IllegalStateException
context - DSpace contextdso - DSpaceObjectsuppliedHandle - existing handle valueIllegalStateException - if specified handle is already in use by another objectSQLExceptionvoid unbindHandle(Context context, DSpaceObject dso) throws SQLException
context - DSpace contextdso - DSpaceObject whose Handle to unbind.SQLExceptionDSpaceObject resolveToObject(Context context, String handle) throws IllegalStateException, SQLException
context - DSpace contexthandle - The handle to resolveIllegalStateException - If handle was found but is not bound to an objectSQLException - If a database error occursString findHandle(Context context, DSpaceObject dso) throws SQLException
context - DSpace contextdso - The object to obtain a handle forSQLException - If a database error occursList<String> getHandlesForPrefix(Context context, String prefix) throws SQLException
context - DSpace contextprefix - The handle prefixSQLException - If a database error occursString getPrefix()
long countHandlesByPrefix(Context context, String prefix) throws SQLException
SQLExceptionint updateHandlesWithNewPrefix(Context context, String newPrefix, String oldPrefix) throws SQLException
SQLExceptionvoid modifyHandleDSpaceObject(Context context, String handle, DSpaceObject newOwner) throws SQLException
SQLExceptionint countTotal(Context context) throws SQLException
SQLExceptionCopyright © 2022 LYRASIS. All rights reserved.