1. NBN:URN Generator andNBN:URN Generator and
ResolverResolver
ERPANET Workshop on PersistentERPANET Workshop on Persistent
IdentifiersIdentifiers
Cork, 17-18 June, 2004.Cork, 17-18 June, 2004.
Ádám HorváthÁdám Horváth
National Széchényi LibraryNational Széchényi Library
HungaryHungary
2. NBN:URN Generator and Resolver - ERPANET Workshop,
ContentsContents
PreparationPreparation
ProtocolProtocol
Design principlesDesign principles
NBN:URN generationNBN:URN generation
NBN:URN resolutionNBN:URN resolution
The web interfaceThe web interface
Technical backgroundTechnical background
Intended usersIntended users
3. NBN:URN Generator and Resolver - ERPANET Workshop,
PreparationPreparation
Looked for persistent identifierLooked for persistent identifier
– URN was chosenURN was chosen
Studied the relevant standardsStudied the relevant standards
http://http://wwwwww..uriuri..netnet//
Studied the existing implementationsStudied the existing implementations
– FinnishFinnish
– NorwegianNorwegian
– GermanGerman
5. NBN:URN Generator and Resolver - ERPANET Workshop,
Design principlesDesign principles
SimplicitySimplicity
– User friendly generationUser friendly generation
– Administration freeAdministration free
ReliabilityReliability
– The uniqueness of URN is guaranteedThe uniqueness of URN is guaranteed
– Only the owner of the document canOnly the owner of the document can
request a URNrequest a URN
6. NBN:URN Generator and Resolver - ERPANET Workshop,
The owner of the documentThe owner of the document
Who is the owner?Who is the owner?
– Who has the right to write into theWho has the right to write into the
documentdocument
AdvantagesAdvantages
– SimpleSimple
– Can be automatedCan be automated
– There is no problem with passwordsThere is no problem with passwords
7. NBN:URN Generator and Resolver - ERPANET Workshop,
Requesting URN - Step 1Requesting URN - Step 1
HTTP requestHTTP request
– http://nbn.oszk.hu/GetNBN?
url=http://solanum.oszk.hu/proba.ht
ml
The server checksThe server checks
– Does the document exist?Does the document exist?
– Is it an HTML document?Is it an HTML document?
– Is there already a URN for this document?Is there already a URN for this document?
– Has anyone placed a transaction for it?Has anyone placed a transaction for it?
8. NBN:URN Generator and Resolver - ERPANET Workshop,
AnswerAnswer
– The server places the requestThe server places the request
– OK:0:urn:nbn:hu-3006
tid:3291d4fcf5b5fce1d0
– Error:-9: Error message
Requesting URN - Step 1 (cont’d)Requesting URN - Step 1 (cont’d)
9. NBN:URN Generator and Resolver - ERPANET Workshop,
Writing the URN into the documentWriting the URN into the document
– It is the requester’s taskIt is the requester’s task
– <head>
...
<meta name="dc.identifier”
scheme="urn”
content="urn:nbn:hu-3006">
...
</head>
Requesting URN - Step 2Requesting URN - Step 2
10. NBN:URN Generator and Resolver - ERPANET Workshop,
Finalizing the requestFinalizing the request
– http://nbn.oszk.hu/GetNBN?
url=http://solanum.oszk.hu/proba.ht
ml
&urn=urn:nbn:hu-3006
&tid=3291d4fcf5b5fce1d0
Requesting URN - Step 3Requesting URN - Step 3
11. NBN:URN Generator and Resolver - ERPANET Workshop,
The server checksThe server checks
– Has the request already been placedHas the request already been placed
– Does the document existDoes the document exist
– Is it an HTML documentIs it an HTML document
– Does it contain the URNDoes it contain the URN
AnswerAnswer
– OKOK
– Error messageError message
Requesting URN - Step 3 (cont’d)Requesting URN - Step 3 (cont’d)
12. NBN:URN Generator and Resolver - ERPANET Workshop,
N2L (URN to URL)N2L (URN to URL)
– HTTP requestHTTP request
• http://nbn.oszk.hu/N2L?urn:nbn:hu-3006
– HTTP coded answerHTTP coded answer
• 303 (SEE OTHER): redirects to the appropriate URL.
• 404 (NOT FOUND): if the URN does not exist
Resolving URNResolving URN
13. NBN:URN Generator and Resolver - ERPANET Workshop,
L2N (URL to URN)L2N (URL to URN)
– HTTP requestHTTP request
• http://nbn.oszk.hu/L2N?
http://solanum.oszk.hu/proba.html
– HTTP coded answerHTTP coded answer
• Text (eg. urn:nbn:hu-3006).
• 404 ( FOUND): if it does not exist.
Resolving URN (cont’d)Resolving URN (cont’d)
14. NBN:URN Generator and Resolver - ERPANET Workshop,
N2Ls (URN to URLs)N2Ls (URN to URLs)
– HTTP requestHTTP request
• http://nbn.oszk.hu/N2Ls? urn:nbn:hu-3006
– HTTP coded answerHTTP coded answer
• HTML page with a list of URLs
• text/uri-list MIME type (if explicitly requested).
• 404 ( FOUND): if it does not exist.
Resolving URN (cont’d)Resolving URN (cont’d)
15. NBN:URN Generator and Resolver - ERPANET Workshop,
Changing the URN - URL assignmentChanging the URN - URL assignment
– This is also a three step processThis is also a three step process
• The document must exist in both the old and theThe document must exist in both the old and the
new URLnew URL
Deleting the URN - URL assignmentDeleting the URN - URL assignment
– This is also a three step processThis is also a three step process
• The document itself can only be deleted after theThe document itself can only be deleted after the
deletion of the URN - URL assignmentdeletion of the URN - URL assignment
Other functionsOther functions
16. NBN:URN Generator and Resolver - ERPANET Workshop,
Request and modification for dynamicRequest and modification for dynamic
pagespages
– http://nbn.oszk.hu/GetNBN
?
url=http://solanum.oszk.hu/proba.ht
ml
&nocheck=1
ServerServer
– Does not check the existence of theDoes not check the existence of the
documentdocument
Other functions (cont’d)Other functions (cont’d)
17. NBN:URN Generator and Resolver - ERPANET Workshop,
Bulk generation of URN’s is alsoBulk generation of URN’s is also
possiblepossible
– Sample scripts written in Python areSample scripts written in Python are
provided for the usersprovided for the users
Other functions (cont’d)Other functions (cont’d)
18. NBN:URN Generator and Resolver - ERPANET Workshop,
The functions can be invoked from aThe functions can be invoked from a
web interfaceweb interface
– Test request is also possibleTest request is also possible
– The interface is bilingual: Hungarian andThe interface is bilingual: Hungarian and
EnglishEnglish
The web interface also containsThe web interface also contains
background material: user guide, thebackground material: user guide, the
source of the application, sample scriptsource of the application, sample script
etc.etc.
Web interfaceWeb interface
19. NBN:URN Generator and Resolver - ERPANET Workshop,
PHP for the interfacePHP for the interface
Java servlets for the functionsJava servlets for the functions
PostgreSql is the databasePostgreSql is the database
It is an open source applicationIt is an open source application
Technical backgroundTechnical background
20. NBN:URN Generator and Resolver - ERPANET Workshop,
HungariansHungarians
– How can we ensure thisHow can we ensure this
• Only the Hungarian interface works on theOnly the Hungarian interface works on the
production databaseproduction database
• The English interface works on the developmentThe English interface works on the development
database. The purpose of the English interface isdatabase. The purpose of the English interface is
to make our results more widely available.to make our results more widely available.
Intended usersIntended users
21. NBN:URN Generator and Resolver - ERPANET Workshop,
Copies of the same object should haveCopies of the same object should have
the same URNthe same URN
Different versions of the same object,Different versions of the same object,
e.g. in MS Word and HTML shall havee.g. in MS Word and HTML shall have
different URNs.different URNs.
If an object is changed, a new URN onlyIf an object is changed, a new URN only
needs to be assigned if the intellectualneeds to be assigned if the intellectual
content of the object changes. Editorialcontent of the object changes. Editorial
changes (e.g. changes to fonts etc.) dochanges (e.g. changes to fonts etc.) do
not necessitate a change of URN.not necessitate a change of URN.
Guidelines for the requestGuidelines for the request
22. NBN:URN Generator and Resolver - ERPANET Workshop,
adam@oszk.huadam@oszk.hu
Thank you for your attentionThank you for your attention
Editor's Notes
Csak az első lépés ellenőrzése marad el, csak scriptből hívható meg, a véglegesítő scriptet is meg kell hívni.
Csak az első lépés ellenőrzése marad el, csak scriptből hívható meg, a véglegesítő scriptet is meg kell hívni.
Csak az első lépés ellenőrzése marad el, csak scriptből hívható meg, a véglegesítő scriptet is meg kell hívni.
Csak az első lépés ellenőrzése marad el, csak scriptből hívható meg, a véglegesítő scriptet is meg kell hívni.
Csak az első lépés ellenőrzése marad el, csak scriptből hívható meg, a véglegesítő scriptet is meg kell hívni.
Csak az első lépés ellenőrzése marad el, csak scriptből hívható meg, a véglegesítő scriptet is meg kell hívni.