From: Adam Dickmeiss Date: Tue, 6 Jul 2010 11:36:04 +0000 (+0200) Subject: New UserInfoFormat-facet-1 X-Git-Tag: v4.0.11~8 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=b371ad40aaba0a2000cc31fee8cd536f3d5caeab;p=yaz-moved-to-github.git New UserInfoFormat-facet-1 The ASN.1 is both for facet request and facet response and is to be part of additionalSearchInfo for Search{Request,Response}. --- diff --git a/src/Makefile.am b/src/Makefile.am index d8dd1e9..0774c25 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -185,6 +185,12 @@ $(top_srcdir)/include/yaz/z-oclcui.h: \ $(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: \ @@ -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 + diff --git a/src/facet.asn b/src/facet.asn new file mode 100644 index 0000000..d5f399d --- /dev/null +++ b/src/facet.asn @@ -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 diff --git a/src/z.tcl b/src/z.tcl index 418593d..6ea7550 100644 --- 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 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.