-$Id: CHANGELOG,v 1.28 1996-09-03 13:52:09 adam Exp $
+$Id: CHANGELOG,v 1.29 1996-11-14 17:11:03 adam Exp $
06/19/95 Release of ir-tcl-1.0b
------------------------------------------------------
09/03/96 Bug fix: configure script could fail if yaz couldn't be located.
+11/14/96 Added some Explain documentation.
+
# (c) Index Data 1995-1996
# See the file LICENSE for details.
# Sebastian Hammer, Adam Dickmeiss
-# $Id: Makefile.in,v 1.41 1996-08-20 09:33:23 adam Exp $
+# $Id: Makefile.in,v 1.42 1996-11-14 17:11:04 adam Exp $
SHELL=/bin/sh
# IrTcl Version
echo "Installing clientrc.tcl"; \
$(INSTALL_DATA) clientrc.tcl $(IRTCLDIR); \
fi; \
+ for f in *.tcl; do \
+ echo "Installing $$f"; \
+ $(INSTALL_DATA) $$f $(IRTCLDIR); \
+ done; \
echo "Installing LICENSE" ; \
$(INSTALL_DATA) LICENSE $(IRTCLDIR); \
echo "Installing display format scripts"; \
# Sebastian Hammer, Adam Dickmeiss
#
# $Log: client.tcl,v $
-# Revision 1.97 1996-09-13 10:54:22 adam
+# Revision 1.98 1996-11-14 17:11:04 adam
+# Added Explain documentaion.
+#
+# Revision 1.97 1996/09/13 10:54:22 adam
# Started work on Explain in client.
#
# Revision 1.96 1996/08/09 15:30:18 adam
# Procedure tkerror {err}
# err error message
# Override the Tk error handler function.
-proc tkerrorx err {
+proc tkerror err {
set w .tkerrorw
if {[winfo exists $w]} {
set msg [lindex $status 2]
set addinfo [lindex $status 3]
tkerror "NSD$code: $msg: $addinfo"
+ dputs "xxxxxxxxxxxxxxx"
return
}
show-message "${setMax} hits"
global queryTypes
global queryButtons
global queryInfo
-
- if {![file writable "${libdir}/clientrc.tcl"]} {
+
+ if {[file exists clientrc.tcl]} {
+ set f [open "clientrc.tcl" w]
+ } elseif {![file writable "${libdir}/clientrc.tcl"]} {
set a [alert "Cannot open ${libdir}/clientrc.tcl for writing. Do you \
wish to save clientrc.tcl in the current directory instead?"]
if {! $a} {
# Setup file
-set {profile(Penn)} {{Penn State's Library} 128.118.88.200 210 {} 16384 8192 tcpip CATALOG 1 {} {} Z39 2 {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}}
+set {profile(Penn)} {{Penn State's Library} 128.118.88.200 210 {} 16384 8192 tcpip CATALOG 1 {} {} Z39 2 {} {} {} {} {} 847978115 {} {} {} {} {} {} {} {} {} {}}
set {profile(DanBib, SR)} {{SR Target DANBIB} 0103/find2.denet.dk 4500 {} 8192 8192 mosi danbib 1 {} 1 SR 8 {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}}
set {profile(RLG)} {{Research Libraries group} rlg.stanford.edu 210 {} 32768 32768 tcpip {DEM} 1 {} 1 Z39 5 {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}}
-set {profile(ztest9999)} {{YAZ server on localhost} localhost 9999 {} 50000 30000 tcpip Default {} {} {} Z39 33 2 0 0 4 842607655 842611277 842611107 {} {} {} {} {} {} {} {} {}}
+set {profile(ztest9999)} {{YAZ server on localhost} localhost 9999 {} 50000 30000 tcpip Default {} {} {} Z39 33 2 0 0 4 842607655 844779204 842611107 {} {} {} {} {} {} {} {} {}}
set {profile(AT&T server)} {{AT&T Z39 Server} z3950.research.att.com 210 {} 90000 90000 tcpip {explain books gils netlib ftp z39dbs ahd books books books factbook russian outside-marc} 1 {} {} Z39 21 {} {} {} {} {} 842605350 842605239 {Lucent Technologies Research Server} {} 100 600000 {} {} 0 {Salutations - this is Lucent Technologies experimental Z39.50 server. No guarentees, but free and unlimited access!} {}}
set {profile(CLSI)} {CLSI inet-gw.clsi.us.geac.com 210 {} 16384 8192 tcpip cl_default 1 {} {} Z39 13 {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}}
-set {profile(AULS)} {{Acadia university} auls.acadiau.ca 210 {} 16384 8192 tcpip AULS 1 {} {} Z39 14 {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}}
+set {profile(AULS)} {{Acadia university
+} auls.acadiau.ca 210 {} 16384 8192 tcpip {AULS mad} 1 {} {} Z39 14 {} {} {} {} {} {} {} {
+} {
+} {} {} {} {} {} {} {}}
set {profile(dranet)} {dranet dranet.dra.com 210 {} 16384 16384 tcpip drewdb 1 {} 1 Z39 15 {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}}
.\" Copyright (c) 1995, 1996 Index Data
.\" All rights reserved.
-.\" $Id: ir-set.n,v 1.2 1996-06-24 16:24:39 adam Exp $
+.\" $Id: ir-set.n,v 1.3 1996-11-14 17:11:13 adam Exp $
.TH ir-set N "24 June 1996" "IrTcl" "IR Set"
.SH NAME
ir-set \- IR set
as 0 or 1 for false and true respectively. If the \fIdata-type\fR is
\fBsubtree\fR the \fIdata\fR is a sub-list. In all other cases, the
\fIdata\fR is the empty string.
+.TP
+.BI "" zs " getExplain " position " [" pattern " " pattern " " ... "]"
+The Explain record on the specified position is returned. See the
+manual for a detailed explanation.
.SH "SEE ALSO"
.BR ir-assoc "(n)", " " ir-scan "(n)"
<!doctype linuxdoc system>
<!--
- $Id: ir-tcl.sgml,v 1.21 1996-08-08 14:41:57 adam Exp $
+ $Id: ir-tcl.sgml,v 1.22 1996-11-14 17:11:14 adam Exp $
-->
<article>
<title>IrTcl User's Guide and Reference
<author><htmlurl url="http://www.indexdata.dk/" name="Index Data">,
<tt><htmlurl url="mailto:info@index.ping.dk" name="info@index.ping.dk"></tt>
-<date>$Revision: 1.21 $
+<date>$Revision: 1.22 $
<abstract>
This document describes IrTcl -- an information retrieval toolkit for
Tcl and Tk that provides access to the Z39.50/SR protocol.
Proximity operation on op1 and op2. Not implemented yet.
<tag><tt>@set </tt><em>name</em></tag>
Result set reference
+<tag><tt>@attrset </tt><em>set</em></tag>
+ Whole query uses the specified attribute <em>set</em>. If this operator is
+ used it must be defined at the beginning of the query.
</descrip>
It is simple to build RPN queries in <sf/IrTcl/. Search terms
@attr 1=4 @and @attr 5=1 tech beta
</verb></tscreen>
+To search for the DatabaseInfo records from an Explain server, we
+could use
+<tscreen><verb>
+ @attrset exp1 @attr 1=1 DatabaseInfo
+</verb></tscreen>
+
<sect1>Search
<p>
In <sf/IrTcl/ a SUTRS record is treated as one single string. To retrieve
a SUTRS record use the <tt>getSutrs</tt> followed by an index.
+<sect1>GRS-1
+<p>
+To be written.
+
+<sect1>Explain
+<p>
+Explain records are retrieved like other records. The method,
+<tt>getExplain</tt> is followed by an index and, and an optional
+Explain record pattern.
+
+The returned record is a canonical representation of the Explain record.
+An ASN.1 sequence is represented as a list. Each item in the list
+consists of the name of the element, followed by its value if the value
+is supplied.
+
+The optional pattern that follows the index after <tt>getExplain</tt>
+consists of one or more elements, that is matched against the elements
+of the actual record.
+
+<bf/Example/
+
+One of the few targets that support explain is the ATT research server
+at <tt>z3950.research.att.com</tt>.
+
+The targetInfo record was returned by the target and it's stored in
+position 1 in the result set, <tt>z.1</tt>. To retrieve the whole
+record we must use
+<tscreen><verb>
+z.1 getExplain 1
+</verb></tscreen>
+
+and we get in return
+
+<tscreen><verb>
+{targetInfo commonInfo {name {Lucent Technologies Research Server}}
+recentNews icon {namedResultSets 1} {multipleDBsearch 0}
+{maxResultSets 100} {maxResultSize 600000} maxTerms timeoutInterval
+{welcomeMessage {strings { {language eng}
+{text
+{Salutations - this is Lucent Technologies experimental Z39.50 server.
+No guarentees, but free and unlimited access!}} } } }
+{contactInfo {name {Robert Waldstein}} {description {strings
+{ {language eng}
+{text {Librarian system designer - no legal anythings}} } } }
+{address {strings { {language eng} {text {Room 3D-591
+600 Mountain Ave
+Murray Hill
+N.J. USA 07974}} } } } {email wald@lucent.com} {phone {908 582-6171}} }
+description nicknames {usageRest {strings { {language eng}
+{text {None - as long as nonProfit research}} } } } paymentAddr
+{hours {strings { {language eng} {text {Should never be down}} } } }
+dbCombinations addresses commonAccessInfo }
+</verb></tscreen>
+
+The <tt>targetInfo</tt> above indicates the the record is really a
+<tt>targetInfo</tt> record. The <tt>commonInfo</tt>, which is optional, is
+not supplied by this server. The <tt>name</tt>, however is supplied,
+with the value <tt>Lucent Technologies Research Server</tt>.
+
+To retrieve the <tt>contactInfo</tt> from the record above we can
+extract the element from the record by using Tcl's list manipulation
+facilities, for example by doing
+<tscreen><verb>
+set ti [z.1 getExplain 1]
+lindex [lindex $ti 0] 12
+</verb></tscreen>
+which will return
+<tscreen><verb>
+contactInfo {name {Robert Waldstein}} {description {strings
+{ {language eng}
+{text {Librarian system designer - no legal anythings}} }
+} } {address {strings { {language eng} {text {Room 3D-591
+600 Mountain Ave
+Murray Hill
+N.J. USA 07974}} } } } {email wald@lucent.com} {phone {908 582-6171}}
+</verb></tscreen>
+
+We can also extract almost the same by doing
+<tscreen><verb>
+z.1 getExplain 1 targetInfo contactInfo
+</verb></tscreen>
+which will return
+<tscreen><verb>
+{name {Robert Waldstein}} {description {strings { {language eng}
+{text {Librarian system designer - no legal anythings}} } } }
+{address {strings { {language eng} {text {Room 3D-591
+600 Mountain Ave
+Murray Hill
+N.J. USA 07974}} } } } {email wald@lucent.com} {phone {908 582-6171}}
+</verb></tscreen>
+
+<bf/End of example/
+
<sect>Scan
<p>
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: ir-tcl.c,v $
- * Revision 1.96 1996-10-08 13:02:50 adam
+ * Revision 1.97 1996-11-14 17:11:07 adam
+ * Added Explain documentaion.
+ *
+ * Revision 1.96 1996/10/08 13:02:50 adam
* When dealing with records, odr_choice_enable_bias function is used to
* prevent decoding of externals.
*
switch (etype->what)
{
case Z_External_sutrs:
- logf (LOG_LOG, "Z_External_sutrs");
+ logf (LOG_DEBUG, "Z_External_sutrs");
oe->u.sutrs = rr;
if ((rl->u.dbrec.buf = ir_tcl_malloc (oe->u.sutrs->len+1)))
{
rl->u.dbrec.size = oe->u.sutrs->len;
break;
case Z_External_grs1:
- logf (LOG_LOG, "Z_External_grs1");
+ logf (LOG_DEBUG, "Z_External_grs1");
oe->u.grs1 = rr;
ir_tcl_grs_mk (oe->u.grs1, &rl->u.dbrec.u.grs1);
break;
case Z_External_explainRecord:
- logf (LOG_LOG, "Z_External_explainRecord");
+ logf (LOG_DEBUG, "Z_External_explainRecord");
if ((rl->u.dbrec.buf = ir_tcl_malloc (rl->u.dbrec.size)))
{
memcpy (rl->u.dbrec.buf, oe->u.octet_aligned->buf,