[foaf-dev] SPARQL Querying CCO

Bob Ferris zazi at elbklang.net
Mon May 30 15:20:54 CEST 2011


Hi Rob,

the SPARQL query for this request should look like the following one:

PREFIX foaf:   <http://xmlns.com/foaf/0.1/>
PREFIX cco:    <http://purl.org/ontology/cco/core#>
PREFIX wo:     <http://purl.org/ontology/wo/core#>
PREFIX ex:     <http://example.org/>
SELECT ?name ?t ?wv
WHERE
   { ?x foaf:name ?name .
     ?x cco:habit ?h .
     ?h cco:topic ?t .
     ?h wo:weight ?w .
     ?w wo:weight_value ?wv .
     FILTER (?wv >= 7.0) }

You have to formulate your query to match the detailed descriptions of 
the cognitive characteristics.
Btw, you can download every example of the CCO specification 
documentation in RDF/XML or text/n3. You can find the references on the 
beginning of every example explanation, see, e.g., [1].

Cheers,


Bob


[1] 
http://smiy.sourceforge.net/cco/spec/cognitivecharacteristics.html#sec-cognitive-patterns-example


On 5/30/2011 12:33 PM, Rob Stewart wrote:
> Hi,
>
> I'm looking at the "Cognitive Patterns Example" on the page:
> http://schemapedia.com/schemas/cco
>
> Scenario: I want to SPARQL query this small dataset to obtain all
> CCO:habits that have a wo:weight_value of 0.7 or more.
>
> The result set would return:
> cco:topic<http://dbpedia.org/resource/Category:Knowledge_representation>
> cco:topic<http://dbpedia.org/resource/Category:Ontology_(information_science)>
> cco:topic<http://dbpedia.org/resource/Named_graph>
>
> And would omit:
> cco:topic<http://dbpedia.org/resource/Category:Ontology>
>
> Is there a SPARQL query that'd make this happen? I'm unsure how to
> SPARQL query reified RDF statements.
>
> --
> Rob Stewart


More information about the foaf-dev mailing list