DemoOOHTML

Building up the code for OOHTML here. The current example is just using GWT and SPARQL together.

The source is at http://appletserver.svn.sourceforge.net/viewvc/appletserver/DemoOOHTML.

And a ready-to-run binary (including Joseki with embedded Jetty server) is at http://sourceforge.net/project/showfiles.php?group_id=168062&package_id=213766.

To run the binary, just unzip it, cd into the directory and do "ant run". If the messages are promising (ending with listening on 0.0.0.0:2020 and Jetty ready), then you should be able to point your browser at http://localhost:2020/. The GWT & SPARQL demo is the third link down.

Samples

Try these sample queries to see some simple examples of SPARQL.

These use "/books" as the query base URL (text field at the top, "/books" is the default):

PREFIX books:   <http://example.org/book/>
PREFIX dc:      <http://purl.org/dc/elements/1.1/>
SELECT ?book ?title ?author
WHERE 
  { ?book dc:title ?title. ?book dc:creator ?author }
PREFIX books:   <http://example.org/book/>
PREFIX dc:      <http://purl.org/dc/elements/1.1/>
SELECT ?book ?title ?author
WHERE 
  { ?book dc:title ?title. OPTIONAL { ?book dc:creator ?author } }

These use "/sparql" as the query base URL (text field at the top, "/books" is the default):

SELECT ?x ?y ?z
FROM <http://purl.org/NET/erdf/extract?uri=http%3A%2F%2Fiandavis.com%2F>
WHERE {?x ?y ?z}
SELECT ?x  ?z
FROM <http://purl.org/NET/erdf/extract?uri=http%3A%2F%2Fiandavis.com%2F>
WHERE {?x <http://xmlns.com/foaf/0.1/project> ?z}
SELECT ?x  ?z
FROM <http://purl.org/NET/erdf/extract?uri=http%3A%2F%2Fiandavis.com%2F>
WHERE { <http://iandavis.com/#ian> ?x  ?z }
ORDER BY ASC(?x)
SELECT ?x  ?z
FROM <http://purl.org/NET/erdf/extract?uri=http%3A%2F%2Fiandavis.com%2F>
WHERE { <http://iandavis.com/#freya> ?x  ?z }
SELECT ?instance ?type ?name 
FROM <http://purl.org/NET/erdf/extract?uri=http%3A%2F%2Fiandavis.com%2F>
WHERE {
   ?instance <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?type.
   OPTIONAL { ?instance  <http://www.w3.org/2000/01/rdf-schema#label>  ?name }
}
ORDER BY ASC(?type) ASC(?instance)
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX doap: <http://usefulinc.com/ns/doap#>
SELECT ?instance ?type ?name 
FROM <http://purl.org/NET/erdf/extract?uri=http%3A%2F%2Fiandavis.com%2F>
WHERE {
   ?instance rdf:type ?type.
   OPTIONAL { ?instance  foaf:name  ?name }
   OPTIONAL { ?instance  doap:name  ?name }
   OPTIONAL { ?instance  rdfs:label  ?name }
}
ORDER BY ASC(?type) ASC(?instance)
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?x  ?z
FROM <http://purl.org/NET/erdf/extract?uri=http%3A%2F%2Fiandavis.com%2F>
WHERE {?x foaf:project ?z}

Tim Berners-Lee's Tabulator

Tabulator is an AJAX RDF browser. The del.icio.us tag tabulator.