ExampleIn this example the property URI http://xmlns.com/foaf/0.1/name is mapped to "name" and the URI http://xmlns.com/foaf/0.1/nick is mapped to "nick": <?xml version="1.0" encoding="utf-8"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:bf="http://schemas.talis.com/2006/bigfoot/configuration#" xmlns:frm="http://schemas.talis.com/2006/frame/schema#" > <bf:FieldPredicateMap rdf:about="http://api.talis.com/stores/mystore/indexes/default/fpmaps/default"> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="http://api.talis.com/stores/mystore/indexes/default/fpmaps/default#name"> <frm:property rdf:resource="http://xmlns.com/foaf/0.1/name"/> <frm:name>name</frm:name> </rdf:Description> </frm:mappedDatatypeProperty> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="http://api.talis.com/stores/mystore/indexes/default/fpmaps/default#nick"> <frm:property rdf:resource="http://xmlns.com/foaf/0.1/nick"/> <frm:name>nick</frm:name> </rdf:Description> </frm:mappedDatatypeProperty> </bf:FieldPredicateMap> </rdf:RDF> Note that at present, only properties listed in a store's Field/Predicate map are indexed for searching and that only literal values are indexed. The Field Predicate Map configuration for a Store is managed via the Store Field Predicate Map . AnalyzersMappings in a field/predicate map can be assigned a language analyzer using the For example, in this mapping, the foaf:name predicate is assigned a normalised english analyzer: <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:bf="http://schemas.talis.com/2006/bigfoot/configuration#" xmlns:frm="http://schemas.talis.com/2006/frame/schema#" > <bf:FieldPredicateMap rdf:about="http://api.talis.com/stores/mystore/indexes/default/fpmaps/default"> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="http://api.talis.com/stores/mystore/indexes/default/fpmaps/default#name"> <frm:property rdf:resource="http://xmlns.com/foaf/0.1/name"/> <frm:name>name</frm:name> <bf:analyzer rdf:resource="http://schemas.talis.com/2007/bigfoot/analyzers#norm-en" /> </rdf:Description> </frm:mappedDatatypeProperty> </bf:FieldPredicateMap> The following analyzers are supported: English StandardURI: A standard English analyzer and the default if no analyzer is specified. Words are split on punctuation characters, removing the punctuation. Words containing a dot are not split. Words containing both hyphens and numbers are not split. Email addresses and hostnames are not split. Stop words are removed. Searches on fields with this type of analyzer are case insensitive. The following words are considered to be stop words and will not be indexed: a, an, and, are, as, at, be, but, by, for, if, in, into, is, it, no, not, of, on, or, such, that, the, their, then, there, these, they, this, to, was, will, with English No-StopURI: English analyzer without stop words. This is identical to the standard English analyzer but all words are indexed. English NormalisedURI: English analyzer without stop words and with accent support. This is identical to the standard English analyzer but all words are indexed plus any accented characters in the ISO Latin 1 character set are replaced by their unaccented equivalent. The following table shows the replacements made:
KeywordsURI: This analyzer does not split the field at all. The entire value of the field is indexed as a single token. Dutch StandardURI: A standard Dutch language analyzer. Words are split on punctuation characters, removing the punctuation. Words containing a dot are not split. Words containing both hyphens and numbers are not split. Email addresses and hostnames are not split. Stop words are removed. Searches on fields with this type of analyzer are case sensitive. The following words are considered to be stop words and will not be indexed: de, en, van, ik, te, dat, die, in, een, hij, het, niet, zijn, is, was, op, aan, met, als, voor, had, er, maar, om, hem, dan, zou, of, wat, mijn, men, dit, zo, door, over, ze, zich, bij, ook, tot, je, mij, uit, der, daar, haar, naar, heb, hoe, heeft, hebben, deze, u, want, nog, zal, me, zij, nu, ge, geen, omdat, iets, worden, toch, al, waren, veel, meer, doen, toen, moet, ben, zonder, kan, hun, dus, alles, onder, ja, eens, hier, wie, werd, altijd, doch, wordt, wezen, kunnen, ons, zelf, tegen, na, reeds, wil, kon, niets, uw, iemand, geweest, andere German StandardURI: A standard German language analyzer. Words are split on punctuation characters, removing the punctuation. Words containing a dot are not split. Words containing both hyphens and numbers are not split. Email addresses and hostnames are not split. Stop words are removed and any remaining words are stemmed. Searches on fields with this type of analyzer are case insensitive. The following words are considered to be stop words and will not be indexed: einer, eine, eines, einem, einen, der, die, das, dass, daß, du, er, sie, es, was, wer, wie, wir, und, oder, ohne, mit, am, im, in, aus, auf, ist, sein, war, wird, ihr, ihre, ihres, als, für, von, mit, dich, dir, mich, mir, mein, sein, kein, durch, wegen, wird French StandardURI: A standard French language analyzer. Words are split on punctuation characters, removing the punctuation. Words containing a dot are not split. Words containing both hyphens and numbers are not split. Email addresses and hostnames are not split. Stop words are removed and any remaining words are stemmed. Searches on fields with this type of analyzer are case insensitive. The following words are considered to be stop words and will not be indexed: a, afin, ai, ainsi, après, attendu, au, aujourd, auquel, aussi, autre, autres, aux, auxquelles, auxquels, avait, avant, avec, avoir, c, car, ce, ceci, cela, celle, celles, celui, cependant, certain, certaine, certaines, certains, ces, cet, cette, ceux, chez, ci, combien, comme, comment, concernant, contre, d, dans, de, debout, dedans, dehors, delà, depuis, derrière, des, désormais, desquelles, desquels, dessous, dessus, devant, devers, devra, divers, diverse, diverses, doit, donc, dont, du, duquel, durant, dès, elle, elles, en, entre, environ, est, et, etc, etre, eu, eux, excepté, hormis, hors, hélas, hui, il, ils, j, je, jusqu, jusque, l, la, laquelle, le, lequel, les, lesquelles, lesquels, leur, leurs, lorsque, lui, là, ma, mais, malgré, me, merci, mes, mien, mienne, miennes, miens, moi, moins, mon, moyennant, même, mêmes, n, ne, ni, non, nos, notre, nous, néanmoins, nôtre, nôtres, on, ont, ou, outre, où, par, parmi, partant, pas, passé, pendant, plein, plus, plusieurs, pour, pourquoi, proche, près, puisque, qu, quand, que, quel, quelle, quelles, quels, qui, quoi, quoique, revoici, revoilà, s, sa, sans, sauf, se, selon, seront, ses, si, sien, sienne, siennes, siens, sinon, soi, soit, son, sont, sous, suivant, sur, ta, te, tes, tien, tienne, tiennes, tiens, toi, ton, tous, tout, toute, toutes, tu, un, une, va, vers, voici, voilà, vos, votre, vous, vu, vôtre, vôtres, y, à, ça, ès, été, être, ô. Greek StandardURI: A standard French language analyzer. Words are split on punctuation characters, removing the punctuation. Words containing a dot are not split. Words containing both hyphens and numbers are not split. Email addresses and hostnames are not split. Stop words are removed. Searches on fields with this type of analyzer are case insensitive. Chinese + Japanese + Korean StandardURI: A standard CJK language analyzer. Porter Stemming AnalyzerURI: An analyzer that performs case normalisation, latin1 char normalisation and porter stemming. The standard English stop word list is also applied. No Stop Word, Porter Stemming AnalyzerURI: An analyzer that performs case normalisation, latin1 char normalisation and porter stemming. Does not apply any stop words. Validation of Field/Predicate MapsWhen a Field/Predicate map is submitted to a store it must conform to certain constraints. The store uses the following Sparql queries to check whether the map conforms. If any clause returns TRUE then the map will be rejected. In the example shown the URI of the Field/Predicate Map is http://api.talis.com/stores/mystore/indexes/default/fpmaps/default These Sparql queries corresponds to the following checks. The update will fail if the submitted map...
ASK WHERE
{
<%1$s> frm:mappedDatatypeProperty ?mdp .
?mdp frm:name ?name1 .
OPTIONAL { ?mdp frm:property ?prop1 . }
FILTER (! BOUND(?prop1)) .
}
Failing this sparql query results in the error message: "One of the mappings in the supplied description does not contain a mapped property."
ASK WHERE
{
<%1$s> frm:mappedDatatypeProperty ?mdp .
?mdp frm:property ?prop1 .
OPTIONAL { ?mdp frm:name ?name1 . }
FILTER (! BOUND(?name1)) .
}
Failing this sparql query results in the error message: "One of the mappings in the supplied description does not contain a mapped name."
ASK WHERE
{
<%1$s> frm:mappedDatatypeProperty ?mdp .
?mdp frm:name ?name1 .
?mdp frm:name ?name2 .
FILTER (?name1 != ?name2) .
}
Failing this sparql query results in the error message: "One of the mappings in the supplied description contains more than one mapped name."
ASK WHERE
{
<%1$s> frm:mappedDatatypeProperty ?mdp .
?mdp frm:property ?prop1 .
?mdp frm:property ?prop2 .
FILTER (?prop1 != ?prop2) .
}
Failing this sparql query results in the error message: "One of the mappings in the supplied description contains more than one mapped property."
ASK WHERE
{
<%1$s> frm:mappedDatatypeProperty ?mdp .
?mdp ?anyproperty ?anyvalue .
FILTER isIRI(?mdp)
FILTER BOUND(?anyvalue)
FILTER (!REGEX(STR(?mdp), '^%1$s#')) .
}
Failing this sparql query results in the error message: "The supplied description contains a property whose uri is not prefixed with the map's uri plus a # character.
ASK WHERE
{
<%1$s> frm:mappedDatatypeProperty ?mdp .
FILTER (! ISIRI(?mdp)) .
}
Failing this sparql query results in the error message: "The supplied description contains mappings which are not uri's." ASK WHERE
{
<%1$s> frm:mappedDatatypeProperty ?mdp .
?mdp frm:name ?mpname .
{
FILTER ISLITERAL(?mpname)
FILTER (!REGEX(?mpname, '^[a-zA-Z][a-zA-Z0-9]*$'))
}
}
Failing this sparql query results in the error message: "The supplied description contains a property with a name which does not conform to the regex ^[a-zA-Z][a-zA-Z0-9]*$." ASK WHERE
{
<%1$s> frm:mappedDatatypeProperty ?mdp .
?mdp frm:name ?mpname .
{
FILTER (! ISLITERAL(?mpname) )
}
}
Failing this sparql query results in the error message: "The supplied description contains a name which is not a literal." ASK WHERE
{
<%1$s> frm:mappedDatatypeProperty ?mdp .
?mdp frm:property ?mpproperty .
FILTER (! ISIRI(?mpproperty) )
}
Failing this sparql query results in the error message: "The supplied description contains mappings with a property that isn't a URI." ASK WHERE
{
<%1$s> frm:mappedDatatypeProperty ?mdp .
?s ?p ?o .
FILTER ( ?s != <%1$s> )
OPTIONAL {?s2 ?p2 ?s . }
FILTER ( ! BOUND(?s2) )
}
Failing this sparql query results in the error message: "The supplied description contains triples with a subject other than the map that is not the object of another triple."; ASK WHERE
{
?anysubject ?anyproperty ?anyvalue .
OPTIONAL { <%1$s> ?anyproperty2 ?anyvalue2 . }
FILTER (! BOUND(?anyvalue2) )
}
Failing this sparql query results in the error message: "The supplied description contains triples but does not contain one that has the map as its subject."; |

© Talis Systems Ltd. 2011 Content is available under