|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mycore.services.urn.MCRURNManager
public class MCRURNManager
Provides methods to create URNs (urn:nbn:de) and assign them to documents. A URN (uniform resource name) is a special kind of persistent identifier. This class handles URNs from the german subnamespace of NBN (national bibliographic number), these URNs all start with urn:nbn:de:... More information on persistent identifiers can be found at http://www.persistent-identifier.de/ URNs are described by RFC 2141 and have the following syntax: urn:[NID]:[SNID]-[NISS][Checksum] NID = namespace ID, in this implementation always "nbn:de" SNID = subnamespace ID, a unique identifier for an organization or public library that creates and assigns URNs within its subnamespace NISS = namespace-specific string, a unique ID Checksum: all nbn:de URNs end with one digit that is a checksum Example: urn:nbn:de:465-miless-20060622-213404-0017 A MyCoRe systen can generate URNs for more than one subnamespace. There must be one or more configurations that control the prefix (subnamespace) of generated URNs and the algorithm used to build new NISS within that subnamespace. Each configuration has a unique "subnamespace configuration ID" in mycore.properties, and optional additional properties depending on the implementation. MCR.URN.SubNamespace.[ConfigID].Prefix=[URNPrefix], for example MCR.URN.SubNamespace.Essen.Prefix=urn.nbn.de:hbz:465-
| Constructor Summary | |
|---|---|
MCRURNManager()
|
|
| Method Summary | |
|---|---|
static void |
assignURN(String urn,
String documentID)
Assigns the given urn to the given document ID |
static void |
assignURN(String urn,
String derivateID,
String path,
String filename)
Assigns the given urn to the given derivate ID |
static String |
buildAndAssignURN(String documentID,
String configID)
Create and Assign a new URN to the given Document Ensure that new created URNs do not allready exist in URN store |
static String |
buildChecksum(String urn)
Calculates the checksum for the given urn:nbn:de. |
static String |
buildURN(String configID)
Builds a URN using a MCRNISSBuilder object. |
static String |
buildURN(String configID,
String niss)
Builds a URN with a custom, given NISS. |
static String |
getDocumentIDforURN(String urn)
Retrieves the document ID that is assigned to the given urn |
static String |
getURNforDocument(String documentID)
Retrieves the URN that is assigned to the given document ID |
static boolean |
hasURNAssigned(String objId)
|
static boolean |
isAssigned(String urn)
Returns true if the given urn is assigned to a document ID |
static boolean |
isValid(String urn)
Returns true if the given URN has a valid structure and the checksum is correct. |
static void |
removeURN(String urn)
Removes the urn (and assigned document ID) from the persistent store |
static void |
removeURNByObjectID(String objID)
Removes the urn (and assigned document ID) from the persistent store |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MCRURNManager()
| Method Detail |
|---|
public static String buildChecksum(String urn)
public static String buildURN(String configID,
String niss)
configID - the ID of a subnamespace configuration in mycore.propertiesniss - the custom NISS
public static String buildURN(String configID)
configID - the ID of a subnamespace configuration in mycore.properties
public static boolean isValid(String urn)
public static boolean isAssigned(String urn)
public static void assignURN(String urn,
String documentID)
public static boolean hasURNAssigned(String objId)
public static void assignURN(String urn,
String derivateID,
String path,
String filename)
urn - the urn to assignderivateID - the id of the derivatepath - the path of the derivate in the internal filesystemfilename - the filenamepublic static String getURNforDocument(String documentID)
public static String getDocumentIDforURN(String urn)
public static void removeURN(String urn)
public static void removeURNByObjectID(String objID)
public static String buildAndAssignURN(String documentID,
String configID)
documentID - a MCRIDconfigID - - the configurationID of the URN Builder
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||