230 likes | 387 Vues
NBN:URN Generator and Resolver. ERPANET Workshop on Persistent Identifiers Cork, 17-18 June, 2004. Ádám Horváth National Széchényi Library Hungary. Contents. Preparation Protocol Design principles NBN:URN generation NBN:URN resolution The web interface Technical background
E N D
NBN:URN Generator and Resolver ERPANET Workshop on Persistent Identifiers Cork, 17-18 June, 2004. Ádám Horváth National Széchényi Library Hungary
Contents Preparation Protocol Design principles NBN:URN generation NBN:URN resolution The web interface Technical background Intended users NBN:URN Generator and Resolver - ERPANET Workshop, Cork - Ádám Horváth
Preparation • Studied the relevant standards http://www.uri.net/ Studied the existing implementations • Finnish • Norwegian • German NBN:URN Generator and Resolver - ERPANET Workshop, Cork - Ádám Horváth
Protocol • THTTP protocol (RFC 2169) • Implemented features • N2L • N2LS • L2N NBN:URN Generator and Resolver - ERPANET Workshop, Cork - Ádám Horváth
Design principles • Simplicity • User friendly generation • Administration free • Reliability • The uniqueness of URN is guaranteed • Only the owner of the document can request a URN NBN:URN Generator and Resolver - ERPANET Workshop, Cork - Ádám Horváth
The owner of the document • Who is the owner? • Who has the right to write into the document • Advantages • Simple • Can be automated • There is no problem with passwords NBN:URN Generator and Resolver - ERPANET Workshop, Cork - Ádám Horváth
Requesting URN - Step 1 • HTTP request • http://nbn.oszk.hu/GetNBN?url=http://solanum.oszk.hu/proba.html • The server checks • Does the document exist? • Is it an HTML document? • Is there already a URN for this document? • Has anyone placed a transaction for it? NBN:URN Generator and Resolver - ERPANET Workshop, Cork - Ádám Horváth
Requesting URN - Step 1 (cont’d) • Answer • The server place the request • OK:0:urn:nbn:hu-3006tid:3291d4fcf5b5fce1d0 • Error:-9: Error message NBN:URN Generator and Resolver - ERPANET Workshop, Cork - Ádám Horváth
Requesting URN - Step 2 • Writing the URN into the document • It is the requester’s task • <head> ...<meta name="dc.identifier” scheme="urn” content="urn:nbn:hu-3006">...</head> NBN:URN Generator and Resolver - ERPANET Workshop, Cork - Ádám Horváth
Requesting URN - Step 3 • Finalizing the request • http://nbn.oszk.hu/GetNBN?url=http://solanum.oszk.hu/proba.html&urn=urn:nbn:hu-3006&tid=3291d4fcf5b5fce1d0 NBN:URN Generator and Resolver - ERPANET Workshop, Cork - Ádám Horváth
Requesting URN - Step 3 (cont’d) • The server checks • Has the request already been placed • Does the document exist • Is it an HTML document • Does it contain the URN • Answer • OK • Error message NBN:URN Generator and Resolver - ERPANET Workshop, Cork - Ádám Horváth
Resolving URN • N2L (URN to URL) • HTTP request • http://nbn.oszk.hu/N2L?urn:nbn:hu-3006 • HTTP coded answer • 303 (SEE OTHER): redirects to the appropriate URL. • 404 (NOT FOUND): if the URN does not exist NBN:URN Generator and Resolver - ERPANET Workshop, Cork - Ádám Horváth
Resolving URN (cont’d) • L2N (URL to URN) • HTTP request • http://nbn.oszk.hu/L2N?http://solanum.oszk.hu/proba.html • HTTP coded answer • Text (eg. urn:nbn:hu-3006). • 404 ( FOUND): if it does not exist. NBN:URN Generator and Resolver - ERPANET Workshop, Cork - Ádám Horváth
Resolving URN (cont’d) • N2Ls (URN to URLs) • HTTP request • http://nbn.oszk.hu/N2Ls? urn:nbn:hu-3006 • HTTP coded answer • HTML page with a list of URLs • text/uri-list MIME type (if explicitly requested). • 404 ( FOUND): if it does not exist. NBN:URN Generator and Resolver - ERPANET Workshop, Cork - Ádám Horváth
Other functions • Changing the URN - URL assignment • This is also a three step process • The document must exist in both the old and the new URL • Deleting the URN - URL assignment • This is also a three step process • The document itself can only be deleted after the deletion of the URN - URL assignment NBN:URN Generator and Resolver - ERPANET Workshop, Cork - Ádám Horváth
Other functions (cont’d) • Request and modification for dynamic pages • http://nbn.oszk.hu/GetNBN?url=http://solanum.oszk.hu/proba.html&nocheck=1 • Server • Does not check the existence of the document NBN:URN Generator and Resolver - ERPANET Workshop, Cork - Ádám Horváth
Other functions (cont’d) • Bulk generation of URN’s is also possible • Sample scripts written in Python are provided for the users NBN:URN Generator and Resolver - ERPANET Workshop, Cork - Ádám Horváth
Web interface • The functions can be invoked from a web interface • Test request is also possible • The interface is bilingual: Hungarian and English • The web interface also contains background material: user guide, the source of the application, sample script etc. NBN:URN Generator and Resolver - ERPANET Workshop, Cork - Ádám Horváth
Technical background • PHP for the interface • Java servlets for the functions • PostgreSql is the database • It is an open source application NBN:URN Generator and Resolver - ERPANET Workshop, Cork - Ádám Horváth
Intended users • Hungarians • How can we ensure this • Only the Hungarian interface works on the production database • The English interface works on the development database. The purpose of the English interface is to make our results more widely available. NBN:URN Generator and Resolver - ERPANET Workshop, Cork - Ádám Horváth
Guidelines for the request • Copies of the same object should have the same URN • Different versions of the same object, e.g. in MS Word and HTML shall have different URNs. • If an object is changed, a new URN only needs to be assigned if the intellectual content of the object changes. Editorial changes (e.g. changes to fonts etc.) do not necessitate a change of URN. NBN:URN Generator and Resolver - ERPANET Workshop, Cork - Ádám Horváth
Resolving URN in the OPAC • We build a database on the THTTP resolvers. • The OPAC display program consults with this database and sends the URN to the appropriate resolver. NBN:URN Generator and Resolver - ERPANET Workshop, Cork - Ádám Horváth
Thank you for your attention adam@oszk.hu NBN:URN Generator and Resolver - ERPANET Workshop, Cork - Ádám Horváth