Code Exchange
From n² wiki
We're keen to help store owners and/or administrators to share configuration of their stores. Currently this is limited to things like field/predicate maps and query profiles, however we expect to have a whole range of configuration options that will affect store behaviour. This page can be used to discover these snippets of config. For the moment, we can just add them inline, but as the list grows we can refactor the page to organise it better.
[edit] The Default Field/Predicate Map Used in RDF-oriented stores
This is the default one for stores geared towards general RDF use.
<?xml version="1.0" encoding="utf-8"?> <rdf:RDF xmlns:frm="http://schemas.talis.com/2006/frame/schema#" 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#"> <bf:FieldPredicateMap rdf:about="{fpmap-uri}"> <rdfs:label>default field/predicate map</rdfs:label> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="{fpmap-uri}#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="{fpmap-uri}#nick"> <frm:property rdf:resource="http://xmlns.com/foaf/0.1/nick"/> <frm:name>nick</frm:name> </rdf:Description> </frm:mappedDatatypeProperty> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="{fpmap-uri}#label"> <frm:property rdf:resource="http://www.w3.org/2000/01/rdf-schema#label"/> <frm:name>label</frm:name> </rdf:Description> </frm:mappedDatatypeProperty> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="{fpmap-uri}#comment"> <frm:property rdf:resource="http://www.w3.org/2000/01/rdf-schema#comment"/> <frm:name>comment</frm:name> </rdf:Description> </frm:mappedDatatypeProperty> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="{fpmap-uri}#title"> <frm:property rdf:resource="http://purl.org/dc/elements/1.1/title"/> <frm:name>title</frm:name> </rdf:Description> </frm:mappedDatatypeProperty> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="{fpmap-uri}#description"> <frm:property rdf:resource="http://purl.org/dc/elements/1.1/description"/> <frm:name>description</frm:name> </rdf:Description> </frm:mappedDatatypeProperty> </bf:FieldPredicateMap> </rdf:RDF>
Note: don't forget to substitute your map's URI for the {fpmap-uri} token
[edit] A FOAF-oriented Field/Predicate Map
This one is heavily geared towards RDF containing FOAF
<?xml version="1.0" encoding="utf-8"?> <rdf:RDF xmlns:frm="http://schemas.talis.com/2006/frame/schema#" 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#"> <bf:FieldPredicateMap rdf:about="{fpmap-uri}"> <rdfs:label>default field/predicate map</rdfs:label> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="{fpmap-uri}#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="{fpmap-uri}#nick"> <frm:property rdf:resource="http://xmlns.com/foaf/0.1/nick"/> <frm:name>nick</frm:name> </rdf:Description> </frm:mappedDatatypeProperty> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="{fpmap-uri}#givenname"> <frm:property rdf:resource="http://xmlns.com/foaf/0.1/givenname"/> <frm:name>givenname</frm:name> </rdf:Description> </frm:mappedDatatypeProperty> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="{fpmap-uri}#firstname"> <frm:property rdf:resource="http://xmlns.com/foaf/0.1/firstName"/> <frm:name>firstname</frm:name> </rdf:Description> </frm:mappedDatatypeProperty> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="{fpmap-uri}#family_name"> <frm:property rdf:resource="http://xmlns.com/foaf/0.1/family_name"/> <frm:name>family_name</frm:name> </rdf:Description> </frm:mappedDatatypeProperty> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="{fpmap-uri}#surname"> <frm:property rdf:resource="http://xmlns.com/foaf/0.1/surname"/> <frm:name>surname</frm:name> </rdf:Description> </frm:mappedDatatypeProperty> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="{fpmap-uri}#jabberid"> <frm:property rdf:resource="http://xmlns.com/foaf/0.1/jabberID"/> <frm:name>jabberid</frm:name> </rdf:Description> </frm:mappedDatatypeProperty> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="{fpmap-uri}#mboxsha1sum"> <frm:property rdf:resource="http://xmlns.com/foaf/0.1/mbox_sha1sum"/> <frm:name>mboxsha1sum</frm:name> </rdf:Description> </frm:mappedDatatypeProperty> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="{fpmap-uri}#msnchatid"> <frm:property rdf:resource="http://xmlns.com/foaf/0.1/msnChatID"/> <frm:name>msnchatid</frm:name> </rdf:Description> </frm:mappedDatatypeProperty> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="{fpmap-uri}#plan"> <frm:property rdf:resource="http://xmlns.com/foaf/0.1/plan"/> <frm:name>plan</frm:name> </rdf:Description> </frm:mappedDatatypeProperty> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="{fpmap-uri}#yahoochatid"> <frm:property rdf:resource="http://xmlns.com/foaf/0.1/yahooChatID"/> <frm:name>yahoochatid</frm:name> </rdf:Description> </frm:mappedDatatypeProperty> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="{fpmap-uri}#aimchatid"> <frm:property rdf:resource="http://xmlns.com/foaf/0.1/aimChatID"/> <frm:name>aimchatid</frm:name> </rdf:Description> </frm:mappedDatatypeProperty> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="{fpmap-uri}#gender"> <frm:property rdf:resource="http://xmlns.com/foaf/0.1/gender"/> <frm:name>gender</frm:name> </rdf:Description> </frm:mappedDatatypeProperty> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="{fpmap-uri}#olb"> <frm:property rdf:resource="http://purl.org/vocab/bio/0.1/olb"/> <frm:name>olb</frm:name> </rdf:Description> </frm:mappedDatatypeProperty> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="{fpmap-uri}#type"> <frm:property rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#type"/> <frm:name>type</frm:name> </rdf:Description> </frm:mappedDatatypeProperty> </bf:FieldPredicateMap> </rdf:RDF>
[edit] A Bibliographic-oriented Field/Predicate Map
This is the map used by the ukbib store:
<rdf:RDF xmlns:frm="http://schemas.talis.com/2006/frame/schema#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" > <frm:FieldPredicateMap rdf:about="{fpmap-uri}"> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="{fpmap-uri}#1"> <frm:name>xMdate</frm:name> <frm:property rdf:resource="http://www.openarchives.org/OAI/2.0/datestamp"/> </rdf:Description> </frm:mappedDatatypeProperty> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="{fpmap-uri}#2"> <frm:property rdf:resource="http://purl.org/dc/elements/1.1/description"/> <frm:name>description</frm:name> </rdf:Description> </frm:mappedDatatypeProperty> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="{fpmap-uri}#3"> <frm:name>title</frm:name> <frm:property rdf:resource="http://purl.org/dc/elements/1.1/title"/> </rdf:Description> </frm:mappedDatatypeProperty> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="{fpmap-uri}#4"> <frm:property rdf:resource="http://purl.org/dc/elements/1.1/type"/> <frm:name>type</frm:name> </rdf:Description> </frm:mappedDatatypeProperty> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="{fpmap-uri}#5"> <frm:property rdf:resource="http://purl.org/dc/elements/1.1/identifier"/> <frm:name>id</frm:name> </rdf:Description> </frm:mappedDatatypeProperty> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="{fpmap-uri}#6"> <frm:property rdf:resource="http://purl.org/dc/elements/1.1/language"/> <frm:name>language</frm:name> </rdf:Description> </frm:mappedDatatypeProperty> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="{fpmap-uri}#7"> <frm:name>format</frm:name> <frm:property rdf:resource="http://purl.org/dc/elements/1.1/format"/> </rdf:Description> </frm:mappedDatatypeProperty> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="{fpmap-uri}#8"> <frm:property rdf:resource="http://purl.org/dc/elements/1.1/publisher"/> <frm:name>publisher</frm:name> </rdf:Description> </frm:mappedDatatypeProperty> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="{fpmap-uri}#9"> <frm:property rdf:resource="http://purl.org/dc/elements/1.1/creator"/> <frm:name>author</frm:name> </rdf:Description> </frm:mappedDatatypeProperty> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="{fpmap-uri}#10"> <frm:name>date</frm:name> <frm:property rdf:resource="http://purl.org/dc/elements/1.1/date"/> </rdf:Description> </frm:mappedDatatypeProperty> <frm:mappedDatatypeProperty> <rdf:Description rdf:about="{fpmap-uri}#11"> <frm:property rdf:resource="http://purl.org/dc/elements/1.1/subject"/> <frm:name>subject</frm:name> </rdf:Description> </frm:mappedDatatypeProperty> </frm:FieldPredicateMap> </rdf:RDF>

