-
Notifications
You must be signed in to change notification settings - Fork 36
Query Analyzer and Filters
The QNameFilter makes the search of URIs easier by using abreviations for well known namespaces. For example, instead of having to write the full URI 'http://xmlns.com/foaf/0.1/Person', one could use 'foaf:Person' if the qname 'foaf' has been mapped to the namespace 'http://xmlns.com/foaf/0.1/'.
The QNameFilter relies on an external file, containing all the mappings between qname and namespace, one mapping per line. The syntax of a mapping is the following:
{qname}={namespace} \n
For example, you could define the following mapping file:
foaf=http://xmlns.com/foaf/0.1/
dc=http://purl.org/dc/terms/
owl=http://www.w3.org/2002/07/owl#
The QNameFilter will replace in the query any of the qnames defined in the mapping file by its registered namespace. For example, if the query contain the term 'foaf:person', it will be replaced by 'http://xmlns.com/foaf/0.1/Person'.