Add MKC configuration PAZ-864
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 25 Apr 2013 10:04:43 +0000 (12:04 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 25 Apr 2013 10:04:43 +0000 (12:04 +0200)
service mkc.xml is in services-available . It uses settings in
settings/mkc .

debian/rules
etc/mkc.xml [new file with mode: 0644]
etc/settings/mkc/gutenberg.xml [new file with mode: 0644]
etc/settings/mkc/hathitrust.xml [new file with mode: 0644]
etc/settings/mkc/mkc.xml [new file with mode: 0644]
pazpar2.spec

index d440ab6..672ab97 100755 (executable)
@@ -76,8 +76,10 @@ binary-arch: build install
        # pazpar2 package
        cp $(CURDIR)/etc/server.xml $(CURDIR)/debian/pazpar2/etc/pazpar2/server.xml
        cp $(CURDIR)/etc/default.xml $(CURDIR)/debian/pazpar2/etc/pazpar2/services-available/
+       cp $(CURDIR)/etc/mkc.xml $(CURDIR)/debian/pazpar2/etc/pazpar2/services-available/
        cp $(CURDIR)/etc/services/*.xml $(CURDIR)/debian/pazpar2/etc/pazpar2/services-available
        cp $(CURDIR)/etc/settings/*.xml $(CURDIR)/debian/pazpar2/etc/pazpar2/settings/
+       cp -r $(CURDIR)/etc/settings/mkc $(CURDIR)/debian/pazpar2/etc/pazpar2/settings
        cp $(CURDIR)/etc/*.xsl $(CURDIR)/debian/pazpar2/etc/pazpar2/
        # pazpar2-apache2 package
        cp $(CURDIR)/debian/ap2pazpar2.cfg $(CURDIR)/debian/pazpar2-apache2/etc/pazpar2
diff --git a/etc/mkc.xml b/etc/mkc.xml
new file mode 100644 (file)
index 0000000..37d4484
--- /dev/null
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<service  xmlns="http://www.indexdata.com/pazpar2/1.0">
+  <timeout session="60" z3950_operation="30" z3950_session="180"/>
+  <settings src="settings/mkc"/>
+
+  <rank cluster="yes"
+        follow="0.0"
+        lead="1.0"
+        length="linear"
+        debug="yes"
+  />
+
+  <icu_chain id="relevance" locale="en">
+    <transform rule="[:Control:] Any-Remove"/>
+    <tokenize rule="l"/>
+    <transform rule="[[:WhiteSpace:][:Punctuation:]`] Remove"/>
+    <casemap rule="l"/>
+  </icu_chain>
+  
+  <icu_chain id="sort" locale="en">
+    <transform rule="[[:Control:][:WhiteSpace:][:Punctuation:]`] Remove"/>
+    <casemap rule="l"/>
+  </icu_chain>
+  
+  <icu_chain id="mergekey" locale="en">
+    <tokenize rule="l"/>
+    <transform rule="[[:Control:][:WhiteSpace:][:Punctuation:]`] Remove"/>
+    <casemap rule="l"/>
+  </icu_chain>
+  
+  <icu_chain id="facet" locale="en">
+    <display/>
+    <transform rule="Title"/>
+  </icu_chain>
+  
+  <!-- we try to keep same order as in marc21.xsl -->
+  <metadata name="id" brief="yes"/>
+  <metadata name="lccn" merge="unique"/>
+  <metadata name="isbn"/>
+  <metadata name="issn"/>
+  <metadata name="tech-rep-nr"/>
+  <metadata name="author" brief="yes" termlist="yes" merge="unique" 
+           rank="20" mergekey="optional" limitmap="ccl: au" />
+  <metadata name="author-title"/>
+  <metadata name="author-date"/>
+  <metadata name="corporate-name"/>
+  <metadata name="corporate-location"/>
+  <metadata name="corporate-date"/>
+  <metadata name="meeting-name"/>
+  <metadata name="meeting-location"/>
+  <metadata name="meeting-date"/>
+  <metadata name="date" brief="yes" sortkey="numeric" type="year"
+           merge="range" termlist="yes"/>
+  <metadata name="title" brief="yes" sortkey="skiparticle"
+           merge="longest" rank="20" mergekey="required"/>
+  <metadata name="title-remainder" brief="yes" merge="longest" rank="5"/>
+  <metadata name="title-responsibility" brief="yes" merge="longest"/>
+  <metadata name="title-dates" brief="yes" merge="longest"/>
+  <metadata name="title-medium" brief="yes" merge="longest"/>
+  <metadata name="title-number-section" brief="yes" merge="longest"/>
+  <metadata name="title-complete"/>
+  <metadata name="title-uniform"/>
+  <metadata name="medium" brief="yes" merge="longest" mergekey="optional" limitmap="local:" />
+  <metadata name="iii-id" brief="yes" merge="no"/>
+  <metadata name="edition"/>
+  <metadata name="publication-place"/>
+  <metadata name="publication-name"/>
+  <metadata name="publication-date"/>
+  <metadata name="physical-extent"/>
+  <metadata name="physical-format"/>
+  <metadata name="physical-dimensions"/>
+  <metadata name="physical-accomp"/>
+  <metadata name="physical-unittype"/>
+  <metadata name="physical-unitsize"/>
+  <metadata name="physical-specified"/>
+  
+  <metadata name="series-title"/>
+  
+  <metadata name="description" brief="yes" merge="longest" rank="3"/>
+  <metadata name="subject-long" rank="3"/>
+  <metadata name="subject" termlist="yes" rank="0" limitmap="ccl: su" />
+  <metadata name="snippet" brief="yes" merge="unique"/>
+  <metadata name="electronic-url" brief="yes" merge="unique"/>
+  <metadata name="electronic-format-type" />
+  <metadata name="electronic-format-instruction" />
+  <metadata name="electronic-text" brief="yes" merge="no"/>
+  <metadata name="electronic-note"/>
+  <metadata name="citation"/>
+  <metadata name="holding"/>
+  <metadata name="fulltext"/>
+  <metadata name="has-fulltext"/>
+  <metadata name="oclc-number"/>
+  <metadata name="system-control-nr"/>
+  <metadata name="locallocation" brief="yes"/>
+  <metadata name="callnumber" brief="yes"/>
+  <metadata name="publicnote" brief="yes"/>
+  
+  <!-- journals -->
+  <metadata name="journal-title"/>
+  <metadata name="journal-subpart"/>
+  <metadata name="volume-number"/>
+  <metadata name="issue-date"/>
+  <metadata name="issue-number"/>
+  <metadata name="pages-number"/>
+  
+  <metadata name="url_recipe" setting="postproc" brief="yes" merge="no"/>
+  <metadata name="open_url_resolver" setting="parameter" merge="no"/>
+  <metadata name="open-url" merge="longest"/>
+  <metadata name="use_url_proxy" setting="postproc" brief="yes" merge="no"/>
+  
+  <metadata name="publisher"/>
+  <metadata name="available"/>
+  <metadata name="due"/>
+  <metadata name="thumburl" brief="yes" merge="unique"/>
+  <metadata name="score"/>
+</service>
+<!-- Keep this comment at the end of the file
+     Local variables:
+     mode: nxml
+     End:
+-->
+
diff --git a/etc/settings/mkc/gutenberg.xml b/etc/settings/mkc/gutenberg.xml
new file mode 100644 (file)
index 0000000..d850d5f
--- /dev/null
@@ -0,0 +1,4 @@
+<settings target="mkc.indexdata.com:9008/gutenberg">
+  <set name="pz:name" value="Gutenberg"/>
+  <set name="pz:id" value="gutenberg"/>
+</settings>
diff --git a/etc/settings/mkc/hathitrust.xml b/etc/settings/mkc/hathitrust.xml
new file mode 100644 (file)
index 0000000..e1c37f2
--- /dev/null
@@ -0,0 +1,4 @@
+<settings target="mkc.indexdata.com:9008/hathitrust">
+  <set name="pz:name" value="Hathitrust"/>
+  <set name="pz:id" value="hathitrust"/>
+</settings>
diff --git a/etc/settings/mkc/mkc.xml b/etc/settings/mkc/mkc.xml
new file mode 100644 (file)
index 0000000..d5ab7bb
--- /dev/null
@@ -0,0 +1,31 @@
+<settings target="mkc.indexdata.com:9008/*">
+
+  <!-- This file introduces default settings for pazpar2 -->
+
+  <!-- authentication for the MKC service -->
+  <set name="pz:authentication" value="guest/guest"/>
+
+  <!-- mapping for unqualified search -->
+  <set name="pz:cclmap:term" value="t=l,r s=al"/>
+
+  <!-- field-specific mappings FIXME -->
+  
+  <set name="pz:cclmap:au" value="u=author s=al"/>
+  <set name="pz:cclmap:ti" value="u=title s=al"/>
+  <set name="pz:cclmap:su" value="u=subject s=al"/>
+  <set name="pz:cclmap:date" value="u=year r=r"/>
+  <set name="pz:cclmap:jt" value="u=journaltitle r=r"/>
+
+  <!-- Retrieval settings -->
+
+  <set name="pz:requestsyntax" value="xml"/>
+
+  <!-- Result normalization settings -->
+
+  <set name="pz:nativesyntax" value="xml"/>
+  <set name="pz:xslt" value="dc.xsl"/>
+
+  <!-- APDU log, use value="1" to enable -->
+  <set name="pz:apdulog" value="0"/>
+
+</settings>
index 5f5fbd5..b1bb2f9 100644 (file)
@@ -80,6 +80,7 @@ cp etc/server.xml ${RPM_BUILD_ROOT}/etc/pazpar2/
 cp etc/default.xml ${RPM_BUILD_ROOT}/etc/pazpar2/services-available/
 cp etc/services/*.xml ${RPM_BUILD_ROOT}/etc/pazpar2/services-available/
 cp etc/settings/*.xml ${RPM_BUILD_ROOT}/etc/pazpar2/settings/
+cp -r etc/settings/mkc ${RPM_BUILD_ROOT}/etc/pazpar2/settings
 cp etc/*.xsl ${RPM_BUILD_ROOT}/etc/pazpar2/
 mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d/init.d
 install -m755 rpm/pazpar2.init ${RPM_BUILD_ROOT}/etc/rc.d/init.d/pazpar2