Various client improvements. Medium presentation format looks better.
-$Id: CHANGELOG,v 1.5 1995-08-28 12:50:51 adam Exp $
+$Id: CHANGELOG,v 1.6 1995-10-16 17:00:51 adam Exp $
06/19/95 Release of ir-tcl-1.0b
------------------------------------------------------
08/24/95 IrTcl works with tk4.0 and tcl7.4.
08/28/95 Release of ir-tcl-1.0b2
+------------------------------------------------------
+10/16/95 New setting: ElementSetNames.
# Sebastian Hammer, Adam Dickmeiss
#
# $Log: client.tcl,v $
-# Revision 1.71 1995-10-13 15:35:27 adam
+# Revision 1.72 1995-10-16 17:00:52 adam
+# New setting: elementSetNames.
+# Various client improvements. Medium presentation format looks better.
+#
+# Revision 1.71 1995/10/13 15:35:27 adam
# Relational operators may be used in search entries - changes
# in proc index-query.
#
set popupMarcdf 0
set textWrap word
set recordSyntax None
+set elementSetNames None
set delayRequest {}
set queryTypes {Simple}
-font -Adobe-Times-Medium-R-Normal-*-180-* \
-background black -foreground white
+ $w.top.record tag configure marc-pref \
+ -font -Adobe-Times-Medium-R-Normal-*-180-* \
+ -foreground blue
+ $w.top.record tag configure marc-text \
+ -font -Adobe-Times-Medium-R-Normal-*-180-* \
+ -foreground black
+ $w.top.record tag configure marc-it \
+ -font -Adobe-Times-Medium-I-Normal-*-180-* \
+ -foreground black
+
pack $w.top.s -side right -fill y
pack $w.top.record -expand yes -fill both
global cancelFlag
global delayRequest
global recordSyntax
+ global elementSetNames
set target $hostid
} else {
z39.$setNo preferredRecordSyntax $recordSyntax
}
+ if {$elementSetNames == "None" } {
+ z39.$setNo elementSetNames {}
+ } else {
+ z39.$setNo elementSetNames $elementSetNames
+ }
z39 callback {search-response}
z39.$setNo search $query
show-status Searching 1 0
global displayFormat
global popupMarcdf
global recordSyntax
-
+ global elementSetNames
+
set windowGeometry(.) [wm geometry .]
if {[catch {set f [open ~/.clientrc.tcl w]}]} {
puts $f "set displayFormat $displayFormat"
puts $f "set popupMarcdf $popupMarcdf"
puts $f "set recordSyntax $recordSyntax"
+ puts $f "set elementSetNames $elementSetNames"
foreach n [array names windowGeometry] {
puts -nonewline $f "set \{windowGeometry($n)\} \{"
puts -nonewline $f $windowGeometry($n)
set completenessTmpValue 0
set useTmpValue 0
+ catch {destroy $w}
+ toplevelG $w
+
+ set n [lindex $attr 0]
+ wm title $w "Index setup $n"
+
+ top-down-window $w
+
set len [llength $attr]
for {set i 1} {$i < $len} {incr i} {
set q [lindex $attr $i]
}
}
}
- if {[winfo exists $w]} {
- destroy $w
- }
- toplevelG $w
-
- set n [lindex $attr 0]
- wm title $w "Index setup $n"
-
- top-down-window $w
frame $w.top.use -relief ridge -border 2
frame $w.top.relation -relief ridge -border 2
listbox $w.top.index.list -yscrollcommand [list $w.top.index.scroll set]
scrollbar $w.top.index.scroll -orient vertical -border 1 \
-command [list $w.top.index.list yview]
- bind $w.top.index.list <2> [list query-edit-index $queryNo]
+ bind $w.top.index.list <Double-1> [list query-edit-index $queryNo]
pack $w.top.index.list -side left -fill both -expand yes -padx 2 -pady 2
pack $w.top.index.scroll -side right -fill y -padx 2 -pady 2
foreach x $queryInfoTmp {
$w.top.index.list insert end [lindex $x 0]
}
+
# Bottom
bottom-buttons $w [list \
- {Ok} [list query-setup-action $queryNo] \
- {Add index} [list query-add-index $queryNo] \
- {Edit index} [list query-edit-index $queryNo] \
- {Delete index} [list query-delete-index $queryNo] \
- {Cancel} [list destroy $w]] 0
+ Ok [list query-setup-action $queryNo] \
+ Add [list query-add-index $queryNo] \
+ Edit [list query-edit-index $queryNo] \
+ Delete [list query-delete-index $queryNo] \
+ Cancel [list destroy $w]] 0
}
proc index-clear {} {
.top.options.m add cascade -label "Format" -menu .top.options.m.formats
.top.options.m add cascade -label "Wrap" -menu .top.options.m.wrap
.top.options.m add cascade -label "Syntax" -menu .top.options.m.syntax
+.top.options.m add cascade -label "Elements" -menu .top.options.m.elements
menu .top.options.m.query
.top.options.m.query add cascade -label "Select" \
.top.options.m.syntax add radiobutton -label "GRS1" \
-value GRS1 -variable recordSyntax
+menu .top.options.m.elements
+.top.options.m.elements add radiobutton -label "Unspecified" \
+ -value None -variable elementSetNames
+.top.options.m.elements add radiobutton -label "Full" \
+ -value F -variable elementSetNames
+.top.options.m.elements add radiobutton -label "Brief" \
+ -value B -variable elementSetNames
+
menubutton .top.help -text "Help" -menu .top.help.m
menu .top.help.m
}
.data.record tag configure marc-data -foreground black
.data.record tag configure marc-head \
- -font -Adobe-Times-Medium-R-Normal-*-180-* \
+ -font -Adobe-Times-Medium-R-Normal-*-140-* \
-foreground white -background black
+.data.record tag configure marc-pref \
+ -font -Adobe-Times-Medium-R-Normal-*-140-* \
+ -foreground blue
+.data.record tag configure marc-text \
+ -font -Adobe-Times-Medium-R-Normal-*-140-* \
+ -foreground black
+.data.record tag configure marc-it \
+ -font -Adobe-Times-Medium-I-Normal-*-140-* \
+ -foreground black
button .bot.logo -bitmap @${libdir}/bitmaps/book1 -command cancel-operation
if {[tk4]} {
# Setup file
+set {profile(zserver)} {Zserver localhost 8889 {} 90000 90000 tcpip dummy 1 {} 1 Z39 28}
set {profile(Penn)} {{Penn State's Library} 128.118.88.200 210 {} 16384 8192 tcpip CATALOG 1 {} {} Z39 2}
-set {profile(ztest)} {{test server} localhost 210 {} 16384 4096 tcpip dummy 1 {} 1 Z39 3}
+set {profile(ztest)} {{test server} localhost 210 {} 60000 60000 tcpip dummy 1 {} 1 Z39 3}
set {profile(madison)} {{University of Wisconsin-Madison} z3950.adp.wisc.edu 210 {} 16384 8192 tcpip madison 1 {} {} Z39 22}
set {profile(bibsys)} {{BIBSYS Target (YAZ-based)} z3950.bibsys.no 2100 {} 16384 8192 tcpip BIBSYS 1 {} 1 Z39 27}
-set {profile(Default)} {{} {} {210} {} 16384 8192 tcpip {} 1 {} {} {} 28}
+set {profile(Default)} {{} {} {210} {} 16384 8192 tcpip {} 1 {} {} {} 29}
set {profile(RLG)} {{Research Libraries group} rlg.stanford.edu 210 {} 4096 4096 tcpip {BKS AMC MAPS MDF REC SCO SER VIM NAF SAF AUT CATALOG ABI AVI DSA EIP FLP HAP HST NPA PAI PRA WLI} 1 {} 1 Z39 5}
set {profile(AT&T server)} {{AT&T Z39 Server} z3950.research.att.com 210 {} 16384 16384 tcpip Default 1 {} {} Z39 21}
set {profile(LOC)} {{Library of Congress} IBM2.LOC.gov 2210 {} 16384 16384 tcpip {BOOKS NAMES} 1 {} 0 Z39 6}
set {profile(DANBIB)} {{SR Target DANBIB} 0103/find2.denet.dk 4500 {} 8192 8192 mosi danbib 1 {} 1 SR 8}
set {profile(OCLC)} {{OCLC First search engine} z3950.oclc.org 210 {} 16384 8192 tcpip {ArticleFirst BiographyIndex BusinessPeriodicalsIndex} 1 {} {} Z39 9}
-set {profile(adad)} {a {} 210 {} 16384 8192 tcpip {} 1 {} {} Z39 26}
set {profile(CARL)} {{CARL systems} Z3950.carl.org 210 {} 16384 8192 tcpip {ACC AIC AUR BEM CUB DPL DNU EPL FRC LAW LCC MCC MIN MPL NJC NWC OCC PPC PUE RDR RGU SPL TCC TKU UNC WYO} 1 {} {} Z39 11}
-set {profile(CLSI)} {CLSI inet-gw.clsi.us.geac.com 210 {} 16384 8192 tcpip cl_default 1 {} {} Z39 13}
+set {profile(adad)} {a {} 210 {} 16384 8192 tcpip {} 1 {} {} Z39 26}
set {profile(Innovative)} {{Innovatives server: demo.iii.com} demo.iii.com 210 {} 16384 8192 tcpip DEFAULT 1 {} {} Z39 12}
+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(dranet)} {dranet dranet.dra.com 210 {} 16384 16384 tcpip drewdb 1 {} 1 Z39 15}
set {profile(canberra)} {canberra canberra.cs.umass.edu 2110 {} 30000 30000 tcpip cacm_dots 1 {} {} Z39 25}
+set {profile(dranet)} {dranet dranet.dra.com 210 {} 16384 16384 tcpip drewdb 1 {} 1 Z39 15}
set queryTypes {Simple phrase}
-set queryButtons {{ {I 0} {I 1} {I 2} } {{I 0} {I 1} {I 0}}}
-set queryInfo {{ {Title {1=4}} {Author {1=1}} {Subject {1=21}} {Any {1=1016}}} {{Title 1=4 4=1 6=2} {Author 1=1003 4=1 6=2} {ISBN 1=7} {ISSN 1=8} {Year 1=30 4=4 6=2} {Any {}}}}
+set queryButtons {{{I 3} {I 0} {I 1} {I 2}} {{I 0} {I 1} {I 0}}}
+set queryInfo {{ {Title {1=4}} {Author {1=1}} {Subject {1=21}} {Any {1=1016}} {Query 1=1016 2=102} {Title-rank 1=4 2=102} {Date/time 1=1012}} {{Title 1=4 4=1 6=2} {Author 1=1003 4=1 6=2} {ISBN 1=7} {ISSN 1=8} {Year 1=30 4=4 6=2} {Any {}}}}
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: ir-tcl.c,v $
- * Revision 1.57 1995-09-21 13:11:51 adam
+ * Revision 1.58 1995-10-16 17:00:55 adam
+ * New setting: elementSetNames.
+ * Various client improvements. Medium presentation format looks better.
+ *
+ * Revision 1.57 1995/09/21 13:11:51 adam
* Support of dynamic loading.
* Test script uses load command if necessary.
*
}
+/*
+ * do_elementSetNames: Set/Get element Set Names
+ */
+static int do_elementSetNames (void *obj, Tcl_Interp *interp,
+ int argc, char **argv)
+{
+ IrTcl_SetCObj *p = obj;
+
+ if (argc == 0)
+ {
+ p->elementSetNames = NULL;
+ return TCL_OK;
+ }
+ else if (argc == -1)
+ return ir_tcl_strdel (interp, &p->elementSetNames);
+ if (argc == 3)
+ {
+ free (p->elementSetNames);
+ if (ir_tcl_strdup (interp, &p->elementSetNames, argv[2]) == TCL_ERROR)
+ return TCL_ERROR;
+ }
+ Tcl_AppendResult (interp, p->elementSetNames, NULL);
+ return TCL_OK;
+}
+
+
static IrTcl_Method ir_method_tab[] = {
{ 1, "comstack", do_comstack },
{ 1, "protocol", do_protocol },
{ 0, "largeSetLowerBound", do_largeSetLowerBound},
{ 0, "mediumSetPresentNumber", do_mediumSetPresentNumber},
{ 0, "referenceId", do_referenceId },
+{ 0, "elementSetNames", do_elementSetNames },
{ 0, NULL, NULL}
};
}
else
req->preferredRecordSyntax = 0;
+
+ if (obj->set_inher.elementSetNames && *obj->set_inher.elementSetNames)
+ {
+ Z_ElementSetNames *esn = odr_malloc (p->odr_out, sizeof(*esn));
+
+ esn->which = Z_ElementSetNames_generic;
+ esn->u.generic = obj->set_inher.elementSetNames;
+ req->mediumSetElementSetNames = esn;
+ }
+ else
+ req->mediumSetElementSetNames = NULL;
+
req->query = &query;
if (!strcmp (obj->set_inher.queryType, "rpn"))
}
else
req->preferredRecordSyntax = 0;
-
+ if (obj->set_inher.elementSetNames && *obj->set_inher.elementSetNames)
+ {
+ Z_ElementSetNames *esn = odr_malloc (p->odr_out, sizeof(*esn));
+ Z_RecordComposition *compo = odr_malloc (p->odr_out, sizeof(*compo));
+
+ esn->which = Z_ElementSetNames_generic;
+ esn->u.generic = obj->set_inher.elementSetNames;
+
+ req->recordComposition = compo;
+ compo->which = Z_RecordComp_simple;
+ compo->u.simple = esn;
+ }
+ else
+ req->recordComposition = NULL;
return ir_tcl_send_APDU (interp, p, apdu, "present", argv[0]);
}
== TCL_ERROR)
return TCL_ERROR;
+ if (ir_tcl_strdup (interp, &dst->elementSetNames, src->elementSetNames)
+ == TCL_ERROR)
+ return TCL_ERROR;
+
if (src->preferredRecordSyntax &&
(dst->preferredRecordSyntax
= ir_tcl_malloc (sizeof(*dst->preferredRecordSyntax))))
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: ir-tclp.h,v $
- * Revision 1.16 1995-09-20 11:37:01 adam
+ * Revision 1.17 1995-10-16 17:00:56 adam
+ * New setting: elementSetNames.
+ * Various client improvements. Medium presentation format looks better.
+ *
+ * Revision 1.16 1995/09/20 11:37:01 adam
* Configure searches for tk4.1 and tk7.5.
* Work on GRS.
*
int replaceIndicator;
char *referenceId;
+ char *elementSetNames;
+
int smallSetUpperBound;
int largeSetLowerBound;
int mediumSetPresentNumber;