From 47fcaa2307337683215b398e3eaad2e06c5fe9db Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 16 Jul 2007 09:39:55 +0000 Subject: [PATCH] Added a lot more metadata for MARC21. This changes the ranking result a bit. Added test for 'record' command with- and without offset. --- debian/cfg.patch | 12 ++-- etc/marc21.xsl | 136 ++++++++++++++++++++++++++++++++++++------ etc/pazpar2.cfg.dist | 75 +++++++++++++++++------ test/test_http.cfg | 5 +- test/test_http_5.res | 53 +++++++++------- test/test_http_6.res | 17 ++++++ test/test_http_7.res | 2 + test/test_http_urls | 2 + www/jsdemo/example_client.js | 20 +++++-- 9 files changed, 247 insertions(+), 75 deletions(-) create mode 100644 test/test_http_6.res create mode 100644 test/test_http_7.res diff --git a/debian/cfg.patch b/debian/cfg.patch index 5f3b019..585e810 100644 --- a/debian/cfg.patch +++ b/debian/cfg.patch @@ -1,7 +1,7 @@ -5,7c5,6 -< -< -< +6,8c6,7 +< +< +< --- -> -> +> +> diff --git a/etc/marc21.xsl b/etc/marc21.xsl index a6b6445..a500ed9 100644 --- a/etc/marc21.xsl +++ b/etc/marc21.xsl @@ -1,10 +1,17 @@ + + + + + @@ -27,28 +34,20 @@ - - - - - - - - - - - + + + - - + + @@ -57,22 +56,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + - - + + - - + + + + + + + + diff --git a/etc/pazpar2.cfg.dist b/etc/pazpar2.cfg.dist index d60f8f3..8d5c48e 100644 --- a/etc/pazpar2.cfg.dist +++ b/etc/pazpar2.cfg.dist @@ -1,24 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/test/test_http.cfg b/test/test_http.cfg index 483eb70..6785316 100644 --- a/test/test_http.cfg +++ b/test/test_http.cfg @@ -1,6 +1,6 @@ - + @@ -10,6 +10,7 @@ + @@ -17,7 +18,7 @@ - + diff --git a/test/test_http_5.res b/test/test_http_5.res index a6a1052..b887fa9 100644 --- a/test/test_http_5.res +++ b/test/test_http_5.res @@ -15,57 +15,64 @@ -The Computer Bible -1973-1980 -Freedman, David Noel -2 +The use of passwords for controlled access to computer resources +1977 +Wood, Helen M +6 A plan for community college computer development -1971 +1971 +Cover title 8 -Washington metropolitan area rail computer feasibility study; final report +Washington metropolitan area rail computer feasibility study; +final report 1971 -Englund, Carl R +Englund, Carl R +"Contract DOT-UT-10003." 7 -The use of passwords for controlled access to computer resources -1977 -Wood, Helen M -6 +The Computer Bible +1973-1980 +Vols. 2, 8: Missoula, Mont. : Published by Scholars Press for Biblical Research Associates +2 -The Puget Sound Region : a portfolio of thematic computer maps -1974 -Hoerauf, Eugene A -3 +Computer science & technology +proceedings of a workshop held at the National Bureau of Standards, Gaithersburg, MD, June 3-4, 1976 +1977 +5 -Computer science & technology : proceedings of a workshop held at the National Bureau of Standards, Gaithersburg, MD, June 3-4, 1976 -1977 -Evans, John Martin -5 +The Puget Sound Region +a portfolio of thematic computer maps +1974 +Mairs, John W +Scale of maps ca. 1:1,000,000 +3 -Computer processing of dynamic images from an Anger scintillation camera : the proceedings of a workshop +Computer processing of dynamic images from an Anger scintillation camera +the proceedings of a workshop 1974 -Larson, Kenneth B +Includes bibliographical references and index 1 -Reconstruction tomography in diagnostic radiology and nuclear medicine : proceedings of the workshop +Reconstruction tomography in diagnostic radiology and nuclear medicine +proceedings of the workshop 1977 -Ter-Pogossian, Michel M +Includes bibliographical references and index 4 diff --git a/test/test_http_6.res b/test/test_http_6.res new file mode 100644 index 0000000..4fc8f51 --- /dev/null +++ b/test/test_http_6.res @@ -0,0 +1,17 @@ + +0 + +How to program a computer +Jack Collins +11224467 +11224466 +How to program a computer +Jack Collins +11224467 +11224467 + +How to program a computer +Jack Collins +11224466 +11224466 + diff --git a/test/test_http_7.res b/test/test_http_7.res new file mode 100644 index 0000000..781b985 --- /dev/null +++ b/test/test_http_7.res @@ -0,0 +1,2 @@ + +00362nam 22001698a 4504 11224467 DLC00000000000000.0910710c19910701nju 00010 eng 11224467DLCDLC123-xyzJack CollinsHow to program a computerPenguin8710p. cm. diff --git a/test/test_http_urls b/test/test_http_urls index eab57f6..fe1f8f3 100644 --- a/test/test_http_urls +++ b/test/test_http_urls @@ -4,3 +4,5 @@ http://localhost:9763/search.pz2?session=1&command=ping http://localhost:9763/search.pz2?session=1&command=search&query=computer 2 http://localhost:9763/search.pz2?session=1&command=show&start=0&number=1&block=1 +http://localhost:9763/search.pz2?session=1&command=record&id=0 +http://localhost:9763/search.pz2?session=1&command=record&id=0&offset=0 diff --git a/www/jsdemo/example_client.js b/www/jsdemo/example_client.js index 0863997..9d3984b 100644 --- a/www/jsdemo/example_client.js +++ b/www/jsdemo/example_client.js @@ -1,5 +1,5 @@ /* A very simple client that shows a basic usage of the pz2.js -** $Id: example_client.js,v 1.2 2007-06-22 10:54:46 adam Exp $ +** $Id: example_client.js,v 1.3 2007-07-16 09:39:56 adam Exp $ */ // create a parameters array and pass it to the pz2's constructor @@ -62,11 +62,18 @@ function my_onshow(data) { for (var i = 0; i < data.hits.length; i++) { var hit = data.hits[i]; - body.innerHTML += '
' - +'' + (i + 1 + recPerPage * ( curPage - 1)) + '. ' - +'' + hit["md-title"] + - ' by ' + hit["md-author"] + '
'; - + var html = '
' + +'' + (i + 1 + recPerPage * ( curPage - 1)) + '. ' + +'' + hit["md-title"] + + ' '; + if (hit["md-title-remainder"] !== undefined) { + html += '' + hit["md-title-remainder"] + ''; + } + if (hit["md-title-responsibility"] !== undefined) { + html += '' + hit["md-title-responsibility"] + ''; + } + html += '
'; + body.innerHTML += html; if ( hit.recid == curDetRecId ) { drawCurDetails(); } @@ -163,6 +170,7 @@ function drawCurDetails () '">
Ttle: '+data["md-title"] + "
Date: " + data["md-date"] + "
Author: " + data["md-author"] + + '
URL: ' + data["md-url"] + '' + "
Subject: " + data["md-subject"] + "
Location: " + data["location"][0].name + "
"; -- 1.7.10.4