set bib1(6) {Title uniform}
set bib1(7) {ISBN}
set bib1(8) {ISSN}
-set bib1(9) {LC card number}
+set bib1(9) {LC card no.}
set bib1(10) {BNB card no.}
-set bib1(11) {BGF number}
-set bib1(12) {Local number}
+set bib1(11) {BGF no.}
+set bib1(12) {Local no.}
set bib1(13) {Dewey classificat}
set bib1(14) {UDC classification}
set bib1(15) {Bliss classification}
-set bib1(16) {LC call number}
-set bib1(17) {NLM call number}
-set bib1(18) {NAL call number}
-set bib1(19) {MOS call number}
+set bib1(16) {LC call no.}
+set bib1(17) {NLM call no.}
+set bib1(18) {NAL call no.}
+set bib1(19) {MOS call no.}
set bib1(20) {Local classification}
set bib1(21) {Subject heading}
set bib1(22) {Subject Rameau}
set bib1(1001) {Record type}
set bib1(1002) {Name}
set bib1(1003) {Author}
-set bib1(1004) {Author-name personal}
-set bib1(1005) {Author-name corporate}
-set bib1(1006) {Author-name conference}
+set bib1(1004) {Author, personal}
+set bib1(1005) {Author, corporate}
+set bib1(1006) {Author, conference}
set bib1(1007) {Identifier--standard}
set bib1(1008) {Subject--LC children's}
-set bib1(1009) {Subject name -- personal}
+set bib1(1009) {Subject name--personal}
set bib1(1010) {Body of text}
set bib1(1011) {Date/time added to db}
-set bib1(1012) {Date/time last modified}
+set bib1(1012) {Date/time last mod.}
set bib1(1013) {Authority/format id}
set bib1(1014) {Concept-text}
set bib1(1015) {Concept-reference}
set bib1(1024) {Map-scale}
set bib1(1025) {Music-key}
set bib1(1026) {Related-periodical}
-set bib1(1027) {Report-number}
-set bib1(1028) {Stock-number}
-set bib1(1030) {Thematic-number}
+set bib1(1027) {Report-no.}
+set bib1(1028) {Stock-no.}
+set bib1(1030) {Thematic-no.}
set bib1(1031) {Material-type}
set bib1(1032) {Doc-id}
set bib1(1033) {Host-item}
set elementSetNames None
set delayRequest {}
set debugMode 0
+set queryAutoOld 0
set queryTypes {Simple}
set queryButtons { { {I 0} {I 1} {I 2} } }
set setOffset 0
set setMax 0
+set syntaxList {None sep USMARC UNIMARC UKMARC DANMARC FINMARC NORMARC PICAMARC sep SUTRS sep GRS1}
+
+
set font(bb,normal) {Helvetica 24}
set font(bb,bold) {Helvetica 24 bold}
set font(b,normal) {Helvetica 24}
source "bib-1.tcl"
+set queryAutoOld $queryAuto
+
# Convert old format to new format...
foreach target [array names profile] {
set timedef [clock seconds]
tkerror "Connection rejected by target: $u"
} else {
z39 failback [list explain-crash $target $base]
- explain-check $target [list ready-response $base]
+ explain-check $target [list ready-response $base] $base
}
}
# Procedure explain-check
# Stub function to check explain. May be overwritten later.
-proc explain-check {target response} {
- eval $response [list $target]
-}
+#proc explain-check {target response}
+# eval $response [list $target]
+
# Procedure ready-response
# Called after a target has been initialized and, possibly, explained
global profile queryAuto
get-attributeDetails $target $base
changeQueryButtons $target $base
+ configureOptionsSyntax $target $base
if {[info exists profile($target,AttributeDetails,$base,Bib1Use)] && $queryAuto == 1} {
changeQueryButtons $target $base
change-queryInfo $target $base
# query type information given by the globals $queryButtonsFind and
# $queryInfoFind are affected by this operation.
proc query-select {i} {
- global queryButtonsFind queryInfoFind queryButtons queryInfo
+ global queryButtonsFind queryInfoFind queryButtons queryInfo queryAuto queryAutoOld hostid currentDb profile
+
+ if {$queryAutoOld == 1 && $queryAuto == 0} {
+ set queryAutoOld $queryAuto
+ return
+ }
+ if {$queryAutoOld == 0 && $queryAuto == 1 && [info exists profile($hostid,AttributeDetails,$currentDb,Bib1Use)] == 0} {
+ set queryAutoOld $queryAuto
+ return
+ }
set queryInfoFind [lindex $queryInfo $i]
set queryButtonsFind [lindex $queryButtons $i]
index-lines .lines 1 $queryButtonsFind $queryInfoFind activate-index
$w.clist delete 0 last
foreach n $queryTypes {
if {$n == "Auto"} {
- $w.clist add check -label $n -variable queryAuto
+ $w.clist add check -label $n -variable queryAuto -command [list query-select $i]
} else {
$w.clist add command -label $n -command [list query-select $i]
}
lappend queryInfoTmp [list $newI {}]
$w.top.index.list insert end $newI
destroy .query-add-index
- #destroy $w.top.lines
- #frame $w.top.lines -relief ridge -border 2
index-lines $w.top.lines 0 $queryButtonsTmp $queryInfoTmp activate-e-index
- #pack $w.top.lines -side left -pady 6 -padx 6 -fill y
}
# Procedure query-add-line
#base database name
#Changes the Options|Syntax menu acording to the information obtained via explain.
proc configureOptionsSyntax {target base} {
- if {[info exists profile{$target,syntax,$base}]} {
- #Dette kan ikke laves færdigt da Zebra ikke leverer nogle record syntax oplysninger endnu.
-
+ global profile syntaxList
+ set activate 0
+ set i -1
+ if {[info exists profile($target,RecordSyntaxes,$base)]} {
+ foreach syntax $syntaxList {
+ incr i
+ if {$syntax == "sep"} {continue}
+ .top.options.m.syntax entryconfigure $i -variable 0
+ if {[lsearch $profile($target,RecordSyntaxes,$base) $syntax] != -1} {
+ configure-enable-e .top.options.m.syntax $i
+ if {$activate == 0} {
+ .top.options.m.syntax invoke $i
+ set activate 1
+ }
+ } else {
+ configure-disable-e .top.options.m.syntax $i
+ }
+ }
} else {
- initOptionsSyntax
+ foreach syntax $syntaxList {
+ incr i
+ if {$syntax == "sep"} {continue}
+ configure-enable-e .top.options.m.syntax $i
+ }
+ .top.options.m.syntax invoke 0
}
}
# Init: Definition of the Options|Syntax menu.
proc initOptionsSyntax {} {
- irmenu .top.options.m.syntax
- .top.options.m.syntax add radiobutton -label None -value None -variable recordSyntax
- .top.options.m.syntax add separator
- .top.options.m.syntax add radiobutton -label USMARC \
- -value USMARC -variable recordSyntax
- .top.options.m.syntax add radiobutton -label UNIMARC \
- -value UNIMARC -variable recordSyntax
- .top.options.m.syntax add radiobutton -label UKMARC \
- -value UKMARC -variable recordSyntax
- .top.options.m.syntax add radiobutton -label DANMARC \
- -value DANMARC -variable recordSyntax
- .top.options.m.syntax add radiobutton -label FINMARC \
- -value FINMARC -variable recordSyntax
- .top.options.m.syntax add radiobutton -label NORMARC \
- -value NORMARC -variable recordSyntax
- .top.options.m.syntax add radiobutton -label PICAMARC -value PICAMARC -variable recordSyntax
- .top.options.m.syntax add separator
- .top.options.m.syntax add radiobutton -label SUTRS -value SUTRS -variable recordSyntax
- .top.options.m.syntax add separator
- .top.options.m.syntax add radiobutton -label GRS1 -value GRS1 -variable recordSyntax
+ global syntaxList
+ set w .top.options.m.syntax
+ irmenu $w
+ foreach syntax $syntaxList {
+ if {$syntax == "sep"} {
+ $w add separator
+ } else {
+ $w add radiobutton -label $syntax -value $syntax -variable recordSyntax
+ }
+ }
}
initOptionsSyntax
}
incr index
}
+ rename z39.attributeDetails ""
} else {
.debug-window.top.t insert end "Ingen explain\n"
}
puts $crec
set rec [z39.targetInfo getExplain 1]
-
set trec [z39.targetInfo getExplain 1 targetInfo]
puts "--- targetInfo"
puts $rec
# Procedure explain-check
# Checks target for explain database.
# Evals "$finish $target" on finish.
-proc explain-check {target finish} {
+proc explain-check {target finish base} {
global profile
set refresh 0
set time [clock seconds]
set etime $profile($target,timeLastExplain)
if {[string length $etime]} {
- # Check last explain. If 1 day since last explain do explain egain.
+ # Check last explain. If 1 day since last explain do explain again.
# 1 day = 86400
if {$time > [expr 0 + $etime]} {
set refresh 1
}
if {$refresh} {
explain-refresh $target $finish
+# get-attributeDetails $target $base
} else {
eval $finish [list $target]
}
# Setup file
-set profile(BIBSYS,AttributeDetails,gils,Bib1Use) {1012 1019 1007 62 1005 4}
-set profile(BIBSYS,AttributeDetails,marc,Bib1Use) {1005 30 1018 1006 59 4 1003 1004}
set profile(BIBSYS,authentication) {}
set profile(BIBSYS,comstack) tcpip
set profile(BIBSYS,databases) {BIBSYS PERI}
set profile(BIBSYS,targetInfoName) {}
set profile(BIBSYS,timeDefine) 878567355
set profile(BIBSYS,timeLastExplain) {}
-set profile(BIBSYS,timeLastInit) 907078128
+set profile(BIBSYS,timeLastInit) 907773417
set profile(BIBSYS,welcomeMessage) {}
-set profile(BIBSYS,windowNumber) 4
+set profile(BIBSYS,windowNumber) 3
set profile(Bagel:210,AttributeDetails,gils,Bib1Use) {1012 1019 1007 62 1005 4}
set profile(Bagel:210,AttributeDetails,marc,Bib1Use) {1005 30 1018 1006 59 4 1003 1004}
+set profile(Bagel:210,RecordSyntaxes,gils) {SUTRS GRS1 USMARC}
set profile(Bagel:210,authentication) {}
set profile(Bagel:210,comstack) tcpip
set profile(Bagel:210,databases) {dranet.dra.com IR-Explain-1 gils marc}
set profile(Bagel:210,smallSetUpperBound) 0
set profile(Bagel:210,targetInfoName) Zebra
set profile(Bagel:210,timeDefine) {}
-set profile(Bagel:210,timeLastExplain) 907078051
-set profile(Bagel:210,timeLastInit) 907078051
+set profile(Bagel:210,timeLastExplain) 907773347
+set profile(Bagel:210,timeLastInit) 907773347
set profile(Bagel:210,welcomeMessage) {}
set profile(Bagel:210,windowNumber) 1
set {profile(Bell Laboratories Library Network,authentication)} {}
set {profile(Bell Laboratories Library Network,timeLastExplain)} 887288368
set {profile(Bell Laboratories Library Network,timeLastInit)} 887288368
set {profile(Bell Laboratories Library Network,welcomeMessage)} {Salutations - this is Lucent Technologies experimental Z39.50 server. No guarentees, but free and unlimited access!}
-set {profile(Bell Laboratories Library Network,windowNumber)} 16
+set {profile(Bell Laboratories Library Network,windowNumber)} 15
set {profile(Bibliothèque Nationale du Québec,authentication)} {}
set {profile(Bibliothèque Nationale du Québec,comstack)} tcpip
set {profile(Bibliothèque Nationale du Québec,databases)} IRIS
set {profile(British Library:,timeLastExplain)} {}
set {profile(British Library:,timeLastInit)} 893840445
set {profile(British Library:,welcomeMessage)} {}
-set {profile(British Library:,windowNumber)} 3
+set {profile(British Library:,windowNumber)} 4
set profile(DanBib,authentication) {}
set profile(DanBib,comstack) tcpip
set profile(DanBib,databases) DANBIBV2
set profile(Default,timeLastExplain) {}
set profile(Default,timeLastInit) {}
set profile(Default,welcomeMessage) {}
-set profile(Default,windowNumber) 20
+set profile(Default,windowNumber) 19
set profile(LOC,authentication) {}
set profile(LOC,comstack) tcpip
set profile(LOC,databases) {BOOKS NAMES AUTH MAPS MUSIC BIB SERIALS SUBJECTS}
set profile(LOC,targetMaxTerms) {}
set profile(LOC,timeDefine) 878567355
set profile(LOC,timeLastExplain) {}
-set profile(LOC,timeLastInit) 902482859
+set profile(LOC,timeLastInit) 907587281
set profile(LOC,welcomeMessage) {}
set profile(LOC,windowNumber) 12
set {profile(OCLC FirstSearch,authentication)} {}
set {profile(OCLC FirstSearch,targetMaxTerms)} {}
set {profile(OCLC FirstSearch,timeDefine)} {}
set {profile(OCLC FirstSearch,timeLastExplain)} {}
-set {profile(OCLC FirstSearch,timeLastInit)} 893840324
+set {profile(OCLC FirstSearch,timeLastInit)} 907164654
set {profile(OCLC FirstSearch,welcomeMessage)} {}
-set {profile(OCLC FirstSearch,windowNumber)} 15
+set {profile(OCLC FirstSearch,windowNumber)} 14
set profile(Penn,authentication) {}
set profile(Penn,comstack) tcpip
set profile(Penn,databases) CATALOG
set profile(Penn,timeLastExplain) {}
set profile(Penn,timeLastInit) 902483000
set profile(Penn,welcomeMessage) {}
-set profile(Penn,windowNumber) 19
+set profile(Penn,windowNumber) 18
set {profile(Steiermrkische Landesbibliothek,authentication)} {}
set {profile(Steiermrkische Landesbibliothek,comstack)} tcpip
set {profile(Steiermrkische Landesbibliothek,databases)} {lbopac miopac}
set {profile(Steiermrkische Landesbibliothek,timeLastInit)} {}
set {profile(Steiermrkische Landesbibliothek,welcomeMessage)} {}
set {profile(Steiermrkische Landesbibliothek,windowNumber)} 2
-set {profile(University of Crete,AttributeDetails,gils,Bib1Use)} {1012 1019 1007 62 1005 4}
-set {profile(University of Crete,AttributeDetails,marc,Bib1Use)} {1005 30 1018 1006 59 4 1003 1004}
set {profile(University of Crete,authentication)} {}
set {profile(University of Crete,comstack)} tcpip
set {profile(University of Crete,databases)} ptolemeos_ii
set profile(author,timeLastExplain) {}
set profile(author,timeLastInit) 887288138
set profile(author,welcomeMessage) {}
-set profile(author,windowNumber) 18
+set profile(author,windowNumber) 17
set profile(dranet,authentication) {}
set profile(dranet,comstack) tcpip
set profile(dranet,databases) drewdb
set profile(ztest9999,timeLastExplain) 902228978
set profile(ztest9999,timeLastInit) 902228978
set profile(ztest9999,welcomeMessage) {}
-set profile(ztest9999,windowNumber) 14
+set profile(ztest9999,windowNumber) 13
set queryTypes {Simple Phrase Auto}
set queryButtons {{{I 3} {I 0} {I 0}} {{I 0} {I 1} {I 0}} {{I 4} {I 5} {I 3}}}
-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-regular 1=4 2=3 4=2 5=102} {Ranked 1=1016 2=102 3=3 4=1 6=1}} {{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 {}}} {{{Author-name corporate} 1=1005} {Date 1=30} {Publisher 1=1018} {{Author-name conference} 1=1006} {{Place publication} 1=59} {Title 1=4} {Author 1=1003} {{Author-name personal} 1=1004}}}
-set queryAuto 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-regular 1=4 2=3 4=2 5=102} {Ranked 1=1016 2=102 3=3 4=1 6=1}} {{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 {}}} {{{Date/time last mod.} 1=1012} {Record-source 1=1019} {Identifier--standard 1=1007} {Abstract 1=62} {{Author, corporate} 1=1005} {Title 1=4}}}
+set queryAuto 1