3. A SADI service…
… is identified by a URI
also an HTTP URL
http://sadiframework.org/examples/hello
4. A SADI service…
… responds to GET with service description
RDF document describing the service URI
conforms to Feta (BioMoby, myGrid)
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:mygrid="http://www.mygrid.org.uk/mygrid-moby-service#">
<mygrid:serviceDescription rdf:about="http://sadiframework.org/examples/hello">
<mygrid:hasServiceNameText rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Hello</mygrid:hasServiceNameText>
<mygrid:hasServiceDescriptionText>A simple "Hello</mygrid:hasServiceDescriptionText>
<mygrid:hasOperation>
<mygrid:operation rdf:about="http://sadiframework.org/examples/hello#operation">
<mygrid:outputParameter>
<mygrid:parameter rdf:about="http://sadiframework.org/examples/hello#output">
<mygrid:objectType rdf:resource="http://sadiframework.org/examples/hello.owl#GreetedIndividual"/>
</mygrid:parameter>
5. A SADI service…
… responds to POST with service output
RDF in, RDF out
<hello:NamedIndividual rdf:about="http://sadiframework.org/examples/hello-input.rdf#1">
<foaf:name>Guy Incognito</foaf:name>
</hello:NamedIndividual>
<hello:GreetedIndividual rdf:about="http://sadiframework.org/examples/hello-input.rdf#1">
<hello:greeting>Hello, Guy Incognito!</hello:greeting>
</hello:GreetedIndividual>
7. A SADI service…
… has an input OWL class
describes the RDF it consumes
property restrictions characterize the data it needs
<owl:Class rdf:ID="NamedIndividual">
<owl:equivalentClass>
<owl:Restriction>
http://xmlns.com/foaf/0.1/name
<owl:onProperty rdf:resource="http://xmlns.com/foaf/0.1/name"/>
<owl:minCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int">1</owl:minCardinality>
</owl:Restriction>
</owl:equivalentClass>
</owl:Class>
8. A SADI service…
… has an output OWL class
describes the RDF it produces
property restrictions characterize the data it provides
<owl:Class rdf:ID="GreetedIndividual">
<owl:equivalentClass>
<owl:Restriction>
http://sadiframework.org/examples/hello.owl#greeting
<owl:onProperty rdf:resource="#greeting"/>
<owl:minCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int">1</owl:minCardinality>
</owl:Restriction>
</owl:equivalentClass>
</owl:Class>
11. OWL classes in SADI…
… are local to individual services
one service’s world-view can conflict with another,
but a client can use both
not dogmatically; some types are shared
(e.g. database records)
… use global properties
maximize interoperability
represent community agreement
12. Input OWL classes in SADI…
… are dynamically assignable
property restrictions are sufficient for membership
another way to discover services:
what can I get with what I have now?
15. • SPARQL engine
• triple patterns are matched against service descriptions
• knowledge base is dynamically populated
• queries can contain OWL classes,
which are expanded to the required triple patterns
• query is optimized to minimize the number of service calls
and the amount of data sent over the network
16. PREFIX sadi: <http://sadiframework.org/ontologies/predicates.owl#>
PREFIX dumontier: <http://ontology.dumontierlab.com/>
PREFIX kegg: <http://lsrn.org/KEGG_PATHWAY:>
SELECT ?gene ?protein ?seq
WHERE {
kegg:hsa00232 dumontier:hasParticipant ?gene .
?gene sadi:encodes ?protein .
?protein sadi:hasSequence ?seq
} Service
Service
Service
18. PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX patients: <http://biordf.net/cardioSHARE/patients.owl#>
PREFIX bmi: <http://sadiframework.org/examples/bmi.owl#>
SELECT ?patient ?bmi
FROM <http://biordf.net/cardioSHARE/patients.rdf>
WHERE {
?patient rdf:type patients:AtRiskPatient .
?patient bmi:BMI ?bmi
}
1. initialize an empty knowledge base
backed by an OWL reasoner
2. load URLs in FROM clauses
http://biordf.net/cardioSHARE/patients.rdf
<rdf:Description rdf:ID="patient6">
<mged:has_height>
<mged:Measurement>
<mged:has_units rdf:resource="&mged;m"/>
<mged:has_value>1.8034</mged:has_value>
</mged:Measurement>
</mged:has_height>
<mged:has_mass>
<mged:Measurement>
<mged:has_units rdf:resource="&mged;kg"/>
<mged:has_value>73.9355563</mged:has_value>
</mged:Measurement>
</mged:has_mass>
<rdfs:label>patient #6</rdfs:label>
<rdfs:comment>I am not a number, I am a free man!</rdfs:comment>
</rdf:Description>
19. PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX patients: <http://biordf.net/cardioSHARE/patients.owl#>
PREFIX bmi: <http://sadiframework.org/examples/bmi.owl#>
SELECT ?patient ?bmi
FROM <http://biordf.net/cardioSHARE/patients.rdf>
WHERE {
?patient rdf:type patients:AtRiskPatient .
?patient bmi:BMI ?bmi
}
3. select next triple pattern
?patient rdf:type patients:AtRiskPatient
4. process pattern
20. PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX patients: <http://biordf.net/cardioSHARE/patients.owl#>
PREFIX bmi: <http://sadiframework.org/examples/bmi.owl#>
SELECT ?patient ?bmi
FROM <http://biordf.net/cardioSHARE/patients.rdf>
WHERE {
?patient rdf:type patients:AtRiskPatient .
?patient bmi:BMI ?bmi .
} ?patient bmi:BMI ?x
}
5. decompose OWL class
http://biordf.net/cardioSHARE/patients.owl#AtRiskPatient
<owl:Class rdf:ID="AtRiskPatient">
<rdfs:label>A patient at risk for some condition</rdfs:label>
<owl:equivalentClass>
<owl:Restriction>
<owl:onProperty rdf:resource="&bmi;BMI"/>
BMI some double[> 25]
<owl:someValuesFrom>
<rdfs:Datatype>
<owl:onDatatype rdf:resource="&xsd;double"/>
<owl:withRestrictions rdf:parseType="Collection">
<rdf:Description>
<xsd:minExclusive rdf:datatype="&xsd;double">25</xsd:minExclusive>
</rdf:Description>
</owl:withRestrictions>
</rdfs:Datatype>
</owl:someValuesFrom>
</owl:Restriction>
</owl:equivalentClass>
</owl:Class>
21. PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX patients: <http://biordf.net/cardioSHARE/patients.owl#>
PREFIX bmi: <http://sadiframework.org/examples/bmi.owl#>
SELECT ?patient ?bmi
FROM <http://biordf.net/cardioSHARE/patients.rdf>
WHERE {
?patient rdf:type patients:AtRiskPatient .
?patient bmi:BMI ?bmi .
?patient bmi:BMI ?x
}
6. select next triple pattern
?patient bmi:BMI ?bmi
7. process pattern
22. PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX patients: <http://biordf.net/cardioSHARE/patients.owl#>
PREFIX bmi: <http://sadiframework.org/examples/bmi.owl#>
SELECT ?patient ?bmi
FROM <http://biordf.net/cardioSHARE/patients.rdf>
WHERE {
?patient rdf:type patients:AtRiskPatient .
?patient bmi:BMI ?bmi .
?patient bmi:BMI ?x
}
8. find services that attach the predicate
bmi:BMI →
http://sadiframework.org/examples/calculateBMI
9. find inputs to service
use ?patient candidates
no candidates; find instances of the service’s input class
http://sadiframework.org/examples/bmi.owl#InputClass
filter inputs previously sent to this service
23. PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX patients: <http://biordf.net/cardioSHARE/patients.owl#>
PREFIX bmi: <http://sadiframework.org/examples/bmi.owl#>
SELECT ?patient ?bmi
FROM <http://biordf.net/cardioSHARE/patients.rdf>
WHERE {
?patient rdf:type patients:AtRiskPatient .
?patient bmi:BMI ?bmi .
?patient bmi:BMI ?x
}
10.invoke the service
assemble minimal RDF that still satisfies the input class
POST that RDF and add the response to the KB
11.update variable candidates
use current triple pattern
25. PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX patients: <http://biordf.net/cardioSHARE/patients.owl#>
PREFIX bmi: <http://sadiframework.org/examples/bmi.owl#>
SELECT ?patient ?bmi
FROM <http://biordf.net/cardioSHARE/patients.rdf>
WHERE {
?patient rdf:type patients:AtRiskPatient .
?patient bmi:BMI ?bmi .
?patient bmi:BMI ?x
}
14.find services that attach the predicate
bmi:BMI →
http://sadiframework.org/examples/calculateBMI
15.find inputs to service
use ?patient candidates
filter inputs previously sent to this service
nothing to do
26. PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX patients: <http://biordf.net/cardioSHARE/patients.owl#>
PREFIX bmi: <http://sadiframework.org/examples/bmi.owl#>
SELECT ?patient ?bmi
FROM <http://biordf.net/cardioSHARE/patients.rdf>
WHERE {
?patient rdf:type patients:AtRiskPatient .
?patient bmi:BMI ?bmi .
?patient bmi:BMI ?x
}
16.select next triple pattern
no more patterns
17.execute original SPARQL query
using the populated knowledge base and a
conventional SPARQL reasoner
27. OWL classes in SHARE queries…
… are personal
but defined in terms of common properties
… are shared
class URIs resolve to their definitions
anyone can use your class with their data
… are flexible
disagree with a definition? try a new one!
28. OWL classes in SHARE queries…
… are workflows
describe the data that’s needed, not the services to call
(though the service chain can be reconstructed)
… are hypotheses?
“what is” → “what might be”
29. Acknowledgements
This research is supported by The Heart + Stroke Foundation of BC and Yukon, Microsoft Research,
The Canadian Institutes of Health Research, The Natural Sciences and Engineering Research Council of Canada and CANARIE.
Notes de l'éditeur
*make it obvious the input and output node are the same(with animation or label)*