From 8475d385a59bc414a07804de7de9692edc022364 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 28 Aug 1996 09:36:02 +0000 Subject: [PATCH] Removed nwi references. --- www/mtargets.egw | 14 +--- www/targets.egw | 14 +--- www/tdefine.egw | 5 +- www/tform.egw | 7 +- www/z39util.tcl | 242 ++++++++--------------------------------------------- www/ztargets.conf | 50 +---------- 6 files changed, 43 insertions(+), 289 deletions(-) diff --git a/www/mtargets.egw b/www/mtargets.egw index a41168f..a1f9341 100644 --- a/www/mtargets.egw +++ b/www/mtargets.egw @@ -1,6 +1,6 @@ { -# $Id: mtargets.egw,v 1.22 1996/05/24 11:16:00 adam Exp $ +# $Id: mtargets.egw,v 1.23 1996/08/28 09:36:02 adam Exp $ set setNo 1 source ztargets.conf if {![info exists debug]} { @@ -49,10 +49,6 @@ } proc targetC {t} { global targets - global waisFlag - if {!$waisFlag && ![string compare [lindex $targets($t) 1] WAIS]} { - return - } html {
} [lindex $targets($t) 0] html {: } set databases [splitDatabaseSpec $t] @@ -68,14 +64,6 @@ } html "

\n" } - if {![info exists waisFlag]} { - set waisFlag 1 - if {[catch {wais waisdummy}]} { - set waisFlag 0 - } else { - rename waisdummy {} - } - } serverList headlineC targetC html "\n" diff --git a/www/targets.egw b/www/targets.egw index 4f1ccb3..6ed311d 100644 --- a/www/targets.egw +++ b/www/targets.egw @@ -1,6 +1,6 @@ { -# $Id: targets.egw,v 1.26 1996/05/24 11:16:02 adam Exp $ +# $Id: targets.egw,v 1.27 1996/08/28 09:36:02 adam Exp $ source ztargets.conf if {![info exists debug]} { if {[lindex $sessionParms 1] == "1"} { @@ -51,11 +51,7 @@ global targets global env global sessionId - global waisFlag - if {!$waisFlag && ![string compare [lindex $targets($t) 1] WAIS]} { - return - } html {
} [lindex $targets($t) 0] html {} @@ -67,14 +63,6 @@ } html "
\n" } - if {![info exists waisFlag]} { - set waisFlag 1 - if {[catch {wais waisdummy}]} { - set waisFlag 0 - } else { - rename waisdummy {} - } - } serverList headlineC targetC html "
\n" diff --git a/www/tdefine.egw b/www/tdefine.egw index 28f27c8..e928334 100644 --- a/www/tdefine.egw +++ b/www/tdefine.egw @@ -1,6 +1,6 @@ { -# $Id: tdefine.egw,v 1.6 1996/03/14 11:50:49 adam Exp $ +# $Id: tdefine.egw,v 1.7 1996/08/28 09:36:03 adam Exp $ if {[info commands saveState] == ""} { source z39util.tcl @@ -77,9 +77,6 @@ html " search fields must be present
\n" set ok 0 } - if {![string compare recordType WAIS]} { - set attrList { {Free-text} {} } - } set hostSpec [mergeHostSpec $host $databases] if {$ok} { global targets diff --git a/www/tform.egw b/www/tform.egw index 5c6f060..bd0639f 100644 --- a/www/tform.egw +++ b/www/tform.egw @@ -1,6 +1,6 @@ { -# $Id: tform.egw,v 1.6 1996/03/14 11:50:50 adam Exp $ +# $Id: tform.egw,v 1.7 1996/08/28 09:36:03 adam Exp $ if {[info commands saveState] == ""} { source z39util.tcl @@ -44,7 +44,6 @@ html "\n
Record type:\n" html {
} - html "\n
Select WAIS for a WAIS server. The " + html "\n
The " html "other formats apply to Z39.50 servers" html "\n
Databases\n" @@ -83,4 +82,4 @@ button-main button-new-target } - \ No newline at end of file + diff --git a/www/z39util.tcl b/www/z39util.tcl index bd6a7b5..19c75f3 100644 --- a/www/z39util.tcl +++ b/www/z39util.tcl @@ -1,5 +1,5 @@ # -# $Id: z39util.tcl,v 1.45 1996/05/24 11:16:02 adam Exp $ +# $Id: z39util.tcl,v 1.46 1996/08/28 09:36:03 adam Exp $ # proc saveState {} { uplevel #0 { @@ -92,20 +92,6 @@ proc display-medium {zset no setNo targetNo} { html "
\n" return } - WAIS { - html { } - html [join [$zset getWAIS $no headline]] - html {} - html "
\n" - html {Score: } [$zset getWAIS $no score] - set lines [$zset getWAIS $no lines] - if {$lines > 0} { - html {, } $lines { lines} - } - html "
\n" - return - } } if {![catch { set author [$zset getMarc $no field 100 * a] @@ -202,17 +188,6 @@ proc display-brief {zset no setNo targetNo} { html "
\n" return } - WAIS { - html { } - html [string range [join [$zset getWAIS $no headline]] 0 70] - - html {} - set score [$zset getWAIS $no score] - html { Score } $score - html "
\n" - return - } } if {![catch { set author [$zset getMarc $no field 100 * a] @@ -310,10 +285,6 @@ proc display-raw {zset no setNo targetNo} { html "\n" [join [$zset getSutrs $no]] "\n\n" return } - WAIS { - html "\n" [join [$zset getWAIS $no text]] "\n\n" - return - } } if {[catch {set r [$zset getMarc $no line * * *]}]} { html "Unknown record type: $rtype
\n" @@ -530,114 +501,6 @@ proc display-full-marc {zset no setNo targetNo} { html "\n" } -proc display-full-wais {zset no setNo targetNo} { - global env - global hist - global sessionId - - set i 0 - set element junk - htmlToken l [join [$zset getWAIS $no text]] { - if {[string compare [string index $l 0] {<}]} { - if {[info exist data($element)]} { - set data($element) $data($element)$l - } else { - set data($element) $l - } - continue - } - switch -- $l { - { - set element title - } - { - set element dateOfLastModification - } - { - set element controlIdentifier - } - { - set element lastChecked - } - { - set element bytes - } - { - set element linkage - } - { - incr i - } -
  • { - set element "$i,linkage" - } - { - set element "$i,title" - } - { - set element ip - } - default { - set element junk - } - } - } - if {![info exists data(title)] || ![info exists data(linkage)]} { - set nwi 0 - } else { - set nwi 1 - } - html "
    \n" - html {
    Title} - if {$nwi} { - html {
    } $data(title) "" - html {
    URL} - html {
    } $data(linkage) "
    \n" - } else { - html {
    } [join [$zset getWAIS $no headline]] - } - html {
    Score
    } [$zset getWAIS $no score] - set lines [$zset getWAIS $no lines] - if {$lines > 0} { - html {
    Lines
    } $lines "
    \n" - } - if {!$nwi} { - html "
    \n" [join [$zset getWAIS $no text]] "\n
    \n" - return - } - if {[info exists data(bytes)]} { - html {
    Bytes
    } $data(bytes) - } - if {[info exists data(dateOfLastModification)]} { - html {
    Last modified
    } $data(dateOfLastModification) - } - if {[info exists data(lastChecked)]} { - html {
    Last checked
    } $data(lastChecked) "
    \n" - } - if {[info exists data(ip)]} { - html {
    Initial text
    } $data(ip) "
    \n" - } - if {0} { - html {} - html {Similar WAIS record
    } - } - if {[info exists data($i,linkage)]} { - html "
    References\n" - } - for {set i 1} {[info exists data($i,linkage)]} {incr i} { - html {
    } - if {[info exists data($i,title)]} { - html $data($i,title) - } else { - html Untitled - } - html "
    \n" - } - html "\n" -} - proc display-full {zset no setNo targetNo} { set type [$zset type $no] switch $type { @@ -662,10 +525,6 @@ proc display-full {zset no setNo targetNo} { html "
    " [join [$zset getSutrs $no]] "

    \n" return } - WAIS { - display-full-wais $zset $no $setNo $targetNo - return - } } if {[catch {set r [$zset getMarc $no line * * *]}]} { html "Unknown record type: $rtype
    \n" @@ -707,39 +566,29 @@ proc build-query {t ilines} { for {set i 1} {$i <= $ilines} {incr i} { set term [join [egw_form entry$i]] if {[string length $term] == 0} continue - if {![string compare [lindex $targets($t) 1] WAIS]} { - if {[string length $q] == 0} { - set q $term - } else { - set q "$term $q" - } - set op [egw_form logic$i] - continue - } else { - set field [join [egw_form menu$i]] - catch {unset attr} - foreach x [lindex $targets($t) 2] { - if {![string compare [lindex $x 0] $field]} { - set attr [lindex $x 1] - } - } - if {![info exists attr]} { - egw_log debug "attr failed for $t" - set attr [lindex [lindex [lindex $targets($t) 2] 0] 1] - } - egw_log debug "op=${op}" - switch $op { - And - { set q "@and $q ${attr} \"${term}\""; egw_log debug AND } - Or - { set q "@or $q ${attr} \"${term}\""; egw_log debug OR } - {} - { set q "${attr} \"${term}\""; egw_log debug NOPE } - default - { set q "@not $q ${attr} \"${term}\""; egw_log debug ANDNOT } + set field [join [egw_form menu$i]] + catch {unset attr} + foreach x [lindex $targets($t) 2] { + if {![string compare [lindex $x 0] $field]} { + set attr [lindex $x 1] } - set op [egw_form logic$i] } + if {![info exists attr]} { + egw_log debug "attr failed for $t" + set attr [lindex [lindex [lindex $targets($t) 2] 0] 1] + } + egw_log debug "op=${op}" + switch $op { + And + { set q "@and $q ${attr} \"${term}\""; egw_log debug AND } + Or + { set q "@or $q ${attr} \"${term}\""; egw_log debug OR } + {} + { set q "${attr} \"${term}\""; egw_log debug NOPE } + default + { set q "@not $q ${attr} \"${term}\""; egw_log debug ANDNOT } + } + set op [egw_form logic$i] } return $q } @@ -959,13 +808,9 @@ proc z39search {setNo piggy tno elements} { } } - if {![string compare [lindex $targets($host) 1] WAIS]} { - wais-set $zz.$setNo $zz - } else { - ir-set $zz.$setNo $zz - $zz.$setNo preferredRecordSyntax [lindex $targets($host) 1] - egw_log debug "set syntax to [lindex $targets($host) 1]" - } + ir-set $zz.$setNo $zz + $zz.$setNo preferredRecordSyntax [lindex $targets($host) 1] + egw_log debug "set syntax to [lindex $targets($host) 1]" if {![lindex $targets($host) 5]} { set elements {} } @@ -1170,13 +1015,9 @@ proc z39msearch {setNo elements start number cache} { html "ok
    \n" } - if {![string compare [lindex $targets($host) 1] WAIS]} { - wais-set z39$i.$setNo z39$i - } else { - ir-set z39$i.$setNo z39$i - z39$i.$setNo preferredRecordSyntax [lindex $targets($host) 1] - egw_log debug "set syntax to [lindex $targets($host) 1]" - } + ir-set z39$i.$setNo z39$i + z39$i.$setNo preferredRecordSyntax [lindex $targets($host) 1] + egw_log debug "set syntax to [lindex $targets($host) 1]" set hist($setNo,$i,offset) 0 eval z39$i.$setNo databaseNames $hist($setNo,$i,database) @@ -1400,9 +1241,7 @@ proc display-result-set-m-score {setNo} { if {[lindex $status 0] != "DBOSD"} continue set nor $hist($setNo,$i,offset) for {set j 1} {$j <= $nor} {incr j} { - if {![string compare [z39$i.$setNo recordType $j] WAIS]} { - set score [z39$i.$setNo getWAIS $j score] - } elseif {![string compare [z39$i.$setNo recordType $j] USmarc]} { + if {![string compare [z39$i.$setNo recordType $j] USmarc]} { set score [z39$i.$setNo getMarc $j field 999 * r] if {[scan $score %d score] != 1} { set score 10 @@ -1827,8 +1666,8 @@ proc button-scan-window {setNo} { proc maintenance {} { html {
    This page is maintained by } - html { Peter Wad Hansen .} - html {Last modified March 15, 1996.
    } + html { Nobody .} + html {Last modified x x x.
    } } proc splitHostSpec {host} { @@ -1859,21 +1698,12 @@ proc mkAssoc {assoc host} { global targets if {[catch {$assoc failback fail-response}]} { - if {![string compare [lindex $targets($host) 1] WAIS]} { - wais $assoc - } else { - ir $assoc - $assoc maximumRecordSize 1000000 - } + ir $assoc + $assoc maximumRecordSize 1000000 } else { - if {![string compare [lindex $targets($host) 1] WAIS]} { - if {[$assoc comstack] == "wais"} return - wais $assoc - } else { - if {[$assoc comstack] == "tcpip"} return - ir $assoc - $assoc maximumRecordSize 1000000 - } + if {[$assoc comstack] == "tcpip"} return + ir $assoc + $assoc maximumRecordSize 1000000 } } diff --git a/www/ztargets.conf b/www/ztargets.conf index 92ba027..15fed1b 100644 --- a/www/ztargets.conf +++ b/www/ztargets.conf @@ -1,4 +1,4 @@ -# $Id: ztargets.conf,v 1.35 1996/05/22 16:50:27 adam Exp $ +# $Id: ztargets.conf,v 1.36 1996/08/28 09:36:04 adam Exp $ # # This file contains the predefined targets in the WWW-Z39.50 gateway # Each target is an entry in the associative array "targets". The @@ -72,15 +72,6 @@ set targets(z3950.bibsys.no:2100/BIBSYS) [list \ union \ ] -#set targets(dtbsun.dtv.dk:4501/DEM) [list \ -# Aleph \ -# DEM \ -# $commonFields \ -# {} \ -# {Aleph Test server at DTV} \ -# 0 \ -#] - set targets(ir.dbc.bib.dk:2008/danbib) { DanBib DANMARC @@ -198,45 +189,6 @@ set targets(Tikal.dev.oclc.org/AGRICOLA) [list \ union \ ] -set targets(nwi.ub2.lu.se/sverige) { - SwedenWais - WAIS \ - { { {All Fields} {@attr 1=4} } } - {} - {Nordic Web Index - Sweden} - 1 - nwi -} - - -set targets(nwi.ub2.lu.se:2121/sverige) { - Sweden - USMARC - { { {All Fields} {@attr 1=1016 @attr 4=105} } - { {Title} {@attr 1=4 @attr 4=105} } - { {URL} {@attr gils 1=2021} } - { {Subject} {@attr 1=29 @attr 4=105} } - { {URL links} {@attr gils 1=2047} } } - {} - {Nordic Web Index - Sweden} - 1 - nwi -} - -set targets(mars.dtv.dk:9999/Default) { - Denmark - USMARC - { { {All Fields} {@attr 1=1016 @attr 4=105} } - { {Title} {@attr 1=4 @attr 4=105} } - { {URL} {@attr gils 1=2021} } - { {Subject} {@attr 1=29 @attr 4=105} } - { {URL links} {@attr gils 1=2047} } } - {} - {Nordic Web Index - Denmark} - 1 - nwi -} - set targets(netsrv.casi.sti.nasa.gov:10210/GILS) { NASA WAIS -- 1.7.10.4