# $Id: cql2pqf-org.txt,v 1.1 2006/10/12 13:02:52 gertsp Exp $
#
# Propeties file to drive org.z3950.zing.cql.CQLNode's toPQF()
# back-end and the YAZ CQL-to-PQF converter.  This specifies the
# interpretation of various CQL indexes, relations, etc. in terms
# of Type-1 query attributes.
#
# This configuration file generates queries using BIB-1 attributes.
# See http://www.loc.gov/z3950/agency/zing/cql/dc-indexes.html
# for the Maintenance Agency's work-in-progress mapping of Dublin Core
# indexes to Attribute Architecture (util, XD and BIB-2)
# attributes.

# Identifiers for prefixes used in this file. (index.*)
set.cql		= info:srw/cql-context-set/1/cql-v1.1
set.rec		= info:srw/cql-context-set/2/rec-1.0
set.alvis	= http://indexdata.dk/zebra/xslt/1
set.dc          = info:srw/cql-context-set/1/dc-v1.1
set.fedora      = info:srw/cql-context-set/1/dc-v1.1

# default set (in query)
set                     		= http://indexdata.dk/zebra/xslt/1

# The default access point and result-set references
index.cql.serverChoice			= 1=dc.description  2=3
index.cql.all                           = 1=dc.description  2=3

index.rec.id				= 1=rec:id               4=3

index.alvis.id				= 1=rec:id               4=3
index.alvis.date-modified		= 1=ac:date-modified     4=5
index.alvis.date-checked		= 1=ac:date-checked      4=5
index.alvis.identifier-url		= 1=ac:identifier-url    4=3
#index.alvis.identifier-server		= 1=ac:identifier-server 4=3
index.alvis.topic-class			= 1=an:topic-class
index.alvis.language			= 1=an:language
#index.alvis.text			= 1=text   2=3
index.alvis.wpcats			= 1=wpcats


index.fedora.PID                               = 1=PID
index.fedora.repositoryName                    = 1=repositoryName
index.fedora.property.contentModel             = 1=property.contentModel
index.fedora.property.createdDate              = 1=property.createdDate
index.fedora.property.label                    = 1=property.label
index.fedora.property.lastModifiedDate         = 1=property.lastModifiedDate
index.fedora.property.state                    = 1=property.state
index.fedora.property.type                     = 1=property.type
index.dc.title                          = 1=dc.title
index.dc.creator			            = 1=dc.creator
index.dc.subject			            = 1=dc.subject
index.dc.description		         	= 1=dc.description
index.dc.publisher			            = 1=dc.publisher
index.dc.contributor					= 1=dc.contributor
index.dc.date                 			= 1=dc.date
index.dc.type                 			= 1=dc.type
index.dc.format                        	= 1=dc.format
index.dc.identifier                     = 1=dc.identifier
index.dc.source                         = 1=dc.source
index.dc.language						= 1=dc.language
index.dc.relation                       = 1=dc.relation
index.dc.coverage                       = 1=dc.coverage
index.dc.rights                         = 1=dc.rights
index.fedora.DS1.text                          = 1=DS1.text
index.fedora.DS2.text                          = 1=DS2.text


# Relation attributes are selected according to the CQL relation by
# looking up the "relation.<relation>" property:
#
relation.<				= 2=1
relation.le				= 2=2
relation.eq				= 2=3
relation.exact				= 2=3
relation.ge				= 2=4
relation.>				= 2=5
relation.<>				= 2=6

### These two are not really right:
relation.all				= 2=3
relation.any				= 2=3

# BIB-1 doesn't have a server choice relation, so we just make the
# choice here, and use equality (which is clearly correct).
relation.scr				= 2=3

# Relation modifiers.
#
relationModifier.relevant		= 2=102
relationModifier.fuzzy			= 2=100
	### 100 is "phonetic", which is not quite the same thing
relationModifier.stem			= 2=101
relationModifier.phonetic		= 2=100

# Position attributes may be specified for anchored terms (those
# beginning with "^", which is stripped) and unanchored (those not
# beginning with "^").  This may change when we get a BIB-1 truncation
# attribute that says "do what CQL does".
#
position.first				= 3=1 6=1
	# "first in field"
position.any				= 3=3 6=1
	# "any position in field"
position.last				= 3=4 6=1
	# not a standard BIB-1 attribute
position.firstAndLast			= 3=3 6=3
	# search term is anchored to be complete field

# Structure attributes may be specified for individual relations; a
# default structure attribute my be specified by the pseudo-relation
# "*", to be used whenever a relation not listed here occurs.
#
structure.exact				= 4=108
	# string
structure.all				= 4=2
structure.any				= 4=2
structure.*				= 4=1

structure.eq                            = 4=5
	# phrase

# Truncation attributes used to implement CQL wildcard patterns.  The
# simpler forms, left, right- and both-truncation will be used for the
# simplest patterns, so that we produce PQF queries that conform more
# closely to the Bath Profile.  However, when a more complex pattern
# such as "foo*bar" is used, we fall back on Z39.58-style masking.
#
truncation.right			= 5=1
truncation.left				= 5=2
truncation.both				= 5=3
truncation.none				= 5=100
truncation.z3958			= 5=104

# Finally, any additional attributes that should always be included
# with each term can be specified in the "always" property.
#
always					= 6=1  9=1000
# 6=1: completeness = incomplete subfield
# 9=1000: estimatehits for hit liusts larger than 1000 hits