New UserInfoFormat-facet-1
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 6 Jul 2010 11:36:04 +0000 (13:36 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 6 Jul 2010 11:36:04 +0000 (13:36 +0200)
The ASN.1 is both for facet request and facet response and is to
be part of additionalSearchInfo for Search{Request,Response}.

src/Makefile.am
src/facet.asn [new file with mode: 0644]
src/z.tcl

index d8dd1e9..0774c25 100644 (file)
@@ -185,6 +185,12 @@ $(top_srcdir)/include/yaz/z-oclcui.h: \
 $(srcdir)/z.tcl $(srcdir)/oclcui.asn $(YAZCOMP)
        $(TCLSH) $(YAZCOMP_Z) $(srcdir)/oclcui.asn
 
 $(srcdir)/z.tcl $(srcdir)/oclcui.asn $(YAZCOMP)
        $(TCLSH) $(YAZCOMP_Z) $(srcdir)/oclcui.asn
 
+# UserInfoFormat-facet-1
+z-facet-1.c \
+$(top_srcdir)/include/yaz/z-facet-1.h: $(srcdir)/facet.asn $(YAZCOMP)
+       $(TCLSH) $(YAZCOMP_Z) $(srcdir)/facet.asn
+
+
 # ILL protocol
 ill-core.c \
 $(top_srcdir)/include/yaz/ill-core.h: \
 # ILL protocol
 ill-core.c \
 $(top_srcdir)/include/yaz/ill-core.h: \
@@ -203,3 +209,4 @@ $(top_srcdir)/include/yaz/item-req.h: \
 $(srcdir)/ill.tcl $(srcdir)/item-req.asn $(YAZCOMP)
        $(TCLSH) $(YAZCOMP_I) $(srcdir)/item-req.asn
 
 $(srcdir)/ill.tcl $(srcdir)/item-req.asn $(YAZCOMP)
        $(TCLSH) $(YAZCOMP_I) $(srcdir)/item-req.asn
 
+
diff --git a/src/facet.asn b/src/facet.asn
new file mode 100644 (file)
index 0000000..d5f399d
--- /dev/null
@@ -0,0 +1,21 @@
+UserInfoFormat-facet-1
+{Z39-50-userInfoFormat facet-1 (1)} DEFINITIONS ::=
+BEGIN
+IMPORTS AttributeList, Term FROM Z39-50-APDU-1995;
+FacetList ::= SEQUENCE OF FacetField;
+
+FacetField ::= SEQUENCE {
+  -- attributes will specify:
+  --   1=use (field name)
+  --   3=sortorder 0=most frequent, 1=least frequent, ..
+  --   3=limit (integer)
+  attributes [1] IMPLICIT AttributeList,
+  terms [2] IMPLICIT SEQUENCE OF FacetTerm OPTIONAL
+}
+
+FacetTerm ::= SEQUENCE {
+  term [1] IMPLICIT Term,
+  count [2] IMPLICIT INTEGER
+}
+
+END
index 418593d..6ea7550 100644 (file)
--- a/src/z.tcl
+++ b/src/z.tcl
@@ -342,6 +342,9 @@ set m NegotiationRecordDefinition-charSetandLanguageNegotiation-3
 set filename($m) z-charneg
 set membermap($m,OriginProposal_0,private) {OriginProposal_0_private zprivate}
 set membermap($m,TargetResponse,private) {TargetResponse_private zprivate}
 set filename($m) z-charneg
 set membermap($m,OriginProposal_0,private) {OriginProposal_0_private zprivate}
 set membermap($m,TargetResponse,private) {TargetResponse_private zprivate}
+# ----
+set m UserInfoFormat-facet-1
+set filename($m) z-facet-1
 # ----------------------------------------------------------
 # "Constructed" types defined by means of C-types are declared here.
 # Each function returns the C-handler and the C-type.
 # ----------------------------------------------------------
 # "Constructed" types defined by means of C-types are declared here.
 # Each function returns the C-handler and the C-type.