File: tutorial-oai-z3950.html

package info (click to toggle)
idzebra 2.2.10-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,644 kB
  • sloc: ansic: 54,389; xml: 27,054; sh: 6,214; makefile: 1,099; perl: 210; tcl: 64
file content (130 lines) | stat: -rw-r--r-- 6,521 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<html><head><meta charset="ISO-8859-1"><title>7.Searching the OAI database by Z39.50 protocol</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"><link rel="home" href="index.html" title="Zebra - User's Guide and Reference"><link rel="up" href="tutorial.html" title="Chapter3.Tutorial"><link rel="prev" href="tutorial-oai-sru-yazfrontend.html" title="6.Setting up a correct SRU web service"><link rel="next" href="architecture.html" title="Chapter4.Overview of Zebra Architecture"></head><body><link rel="stylesheet" type="text/css" href="common/style1.css"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">7.Searching the <acronym class="acronym">OAI</acronym> database by <acronym class="acronym">Z39.50</acronym> protocol</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="tutorial-oai-sru-yazfrontend.html">Prev</a></td><th width="60%" align="center">Chapter3.Tutorial</th><td width="20%" align="right"><a accesskey="n" href="architecture.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="tutorial-oai-z3950"></a>7.Searching the <acronym class="acronym">OAI</acronym> database by <acronym class="acronym">Z39.50</acronym> protocol</h2></div></div></div><p>
    In this section we repeat the searches and presents we have done so
    far using the binary <acronym class="acronym">Z39.50</acronym> protocol, you can use any
    <acronym class="acronym">Z39.50</acronym> client.
    For instance, you can use the demo command-line client that comes
    with <span class="application">YAZ</span>.
   </p><p>
    Connecting to the server is done by the command
    </p><pre class="screen">
     yaz-client localhost:9999
    </pre><p>
   </p><p>
    When the client has connected, you can type:
    </p><pre class="screen">
     Z&gt; format xml
     Z&gt; querytype prefix
     Z&gt; elements oai
     Z&gt; find the
     Z&gt; show 1+1
    </pre><p>
   </p><p>
    <acronym class="acronym">Z39.50</acronym> presents using presentation stylesheets:
    </p><pre class="screen">
     Z&gt; elements dc
     Z&gt; show 2+1

     Z&gt; elements zebra
     Z&gt; show 3+1
    </pre><p>
   </p><p>
    <acronym class="acronym">Z39.50</acronym> buildin Zebra presents (in this configuration only if
    started without yaz-frontendserver):

    </p><pre class="screen">
     Z&gt; elements zebra::meta
     Z&gt; show 4+1

     Z&gt; elements zebra::meta::sysno
     Z&gt; show 5+1

     Z&gt; format sutrs
     Z&gt; show 5+1
     Z&gt; format xml

     Z&gt; elements zebra::index
     Z&gt; show 6+1

     Z&gt; elements zebra::snippet
     Z&gt; show 7+1

     Z&gt; elements zebra::facet::any:w
     Z&gt; show 1+1

     Z&gt; elements zebra::facet::publisher:p,title:p
     Z&gt; show 1+1
    </pre><p>
   </p><p>
    <acronym class="acronym">Z39.50</acronym> searches targeted at specific indexes and boolean
    combinations of these can be issued as well.

    </p><pre class="screen">
     Z&gt; elements dc
     Z&gt; find @attr 1=oai_identifier @attr 4=3 oai:caltechcstr.library.caltech.edu:4
     Z&gt; show 1+1

     Z&gt; find @attr 1=oai_datestamp @attr 4=3 2001-04-20
     Z&gt; show 1+1

     Z&gt; find @attr 1=oai_setspec @attr 4=3 7374617475733D756E707562
     Z&gt; show 1+1

     Z&gt; find @attr 1=title communication
     Z&gt; show 1+1

     Z&gt; find @attr 1=identifier @attr 4=3
     http://resolver.caltech.edu/CaltechCSTR:1986.5228-tr-86
     Z&gt; show 1+1
    </pre><p>
    etc, etc.
   </p><p>
    <acronym class="acronym">Z39.50</acronym> scan:
    </p><pre class="screen">
     yaz-client localhost:9999
     Z&gt; format xml
     Z&gt; querytype prefix
     Z&gt; scan @attr 1=oai_identifier @attr 4=3 oai
     Z&gt; scan @attr 1=oai_datestamp @attr 4=3 1
     Z&gt; scan @attr 1=oai_setspec @attr 4=3 2000
     Z&gt;
     Z&gt; scan @attr 1=title communication
     Z&gt; scan @attr 1=identifier @attr 4=3 a
    </pre><p>
   </p><p>
    <acronym class="acronym">Z39.50</acronym> search using server-side CQL conversion:
    </p><pre class="screen">
     Z&gt; format xml
     Z&gt; querytype cql
     Z&gt; elements dc
     Z&gt;
     Z&gt; find harry
     Z&gt;
     Z&gt; find dc.creator = the
     Z&gt; find dc.creator = the
     Z&gt; find dc.title = the
     Z&gt;
     Z&gt; find dc.description &lt; the
     Z&gt; find dc.title &gt; some
     Z&gt;
     Z&gt; find dc.identifier="http://resolver.caltech.edu/CaltechCSTR:1978.2276-tr-78"
     Z&gt; find dc.relation = something
    </pre><p>
   </p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p>
     <acronym class="acronym">Z39.50</acronym> scan using server side CQL conversion -
     unfortunately, this will _never_ work as it is not supported by the
     <acronym class="acronym">Z39.50</acronym> standard.
     If you want to use scan using server side CQL conversion, you need to
     make an SRW connection using  yaz-client, or a
     SRU connection using REST Web Services - any browser will do.
    </p></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p>
     All indexes defined by 'type="0"' in the
     indexing style  sheet must be searched using the '@attr 4=3'
     structure attribute instruction.
    </p></div><p>
    Notice that searching and scan on indexes
    <code class="literal">contributor</code>,  <code class="literal">language</code>,
    <code class="literal">rights</code>, and <code class="literal">source</code>
    might fail, simply because none of the records in the small example set
    have these fields set, and consequently, these indexes might not
    been created.
   </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="tutorial-oai-sru-yazfrontend.html">Prev</a></td><td width="20%" align="center"><a accesskey="u" href="tutorial.html">Up</a></td><td width="40%" align="right"><a accesskey="n" href="architecture.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">6.Setting up a correct <acronym class="acronym">SRU</acronym> web service</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">Chapter4.Overview of <span class="application">Zebra</span> Architecture</td></tr></table></div></body></html>