Semantic query, rules, tools (Inference, triple stores, etc) 1
2
Semantic Web Layers 3
4
Ontology Spectrum 5
Ontology - declarative knowledge 6
What is Query? 7
SPARQL 8
SPARQL Solution Modifiers 9
Query examples 10
What happens 11
Using SPARQL with Jena 12
com. hpl. jena. query package // Open the bloggers RDF graph from the filesystem Input. Stream in = new File. Input. Stream(new File("bloggers. rdf")); // Create an empty in-memory model and populate it from the graph Model model = Model. Factory. create. Mem. Model. Maker(). create. Model(); model. read(in, null); // null base URI, since model URIs are absolute in. close(); // Create a new query String query. String = "PREFIX foaf: " + "SELECT ? url " + "WHERE {" + " ? contributor foaf: name "Jon Foobar". " + " ? contributor foaf: weblog ? url. " + " }”; Query query = Query. Factory. create(query. String); // Execute the query and obtain results Query. Execution qe = Query. Execution. Factory. create(query, model); Result. Set results = qe. exec. Select(); // Output query results Result. Set. Formatter. out(System. out, results, query); // Important - free up resources used running the query qe. close(); 13
More complex queries 14
15
16
17
18
19
20
Returning as XML 21
Final example 22
2 -page reference guide 23
Using Protégé 24
25
Rules - expressing logic 26
27
Examples 28
Rule Interchange Format (RIF) 29
30
More RIF testing 31
Testing class membership 32
XML for conclusion 33
34
Examples 35
36
Negation 37
Multiple rules, split disjunction 38
Using Protégé 39
Inference structure 40
Lastly and briefly 41
Implementation 42
Languages 43
RDFS 44
However 45
OWL requirements 46
The OWL language: 47
48
OWL Class Constructors 49
OWL axioms 50
SKOS properties 51
SKOS core and RDFS/OWL 52
OWL 2
Tutorial Summary 54