|
Subject: Protege, named graphs, and SPARQL Newsgroups: gmane.comp.misc.ontology.protege.owl Date: 2005-08-03 10:13:46 GMT (3 years, 48 weeks, 16 hours and 54 minutes ago) (cc:'ing some folks who'll know more than me) Holger Knublauch wrote: > Nicolas F Rouquette wrote: > >> There's work on "Named Graphs" here: >> >> http://www.w3.org/2004/03/trix/ >> >> There's even a query language for Named Graphs, TriQL: >> >> http://www.wiwiss.fu-berlin.de/suhl/bizer/TriQL >> >> and an implementation of the whole thing in "NG4J" >> >> http://sourceforge.net/projects/ng4j >> >> However, this is based on Jena 2.x and as Holger pointed out, >> protege-owl is based on Jena 1.x. > > > To avoid misunderstandings, we use Jena 2.x in Protege, and currently > mostly the ARP parser and persistence mechanism. We don't use Jena > for the internal model representation at run-time, therefore we cannot > easily reuse extensions to Jena in Protege. You can always get a Jena > OntModel from a Protege OWLModel at run-time, but this is not updated > on changes. > > >> Jena itself supports graphs as well. However, it is unclear whether >> named graphs will show up in OWL >> and more precisely within OWL-DL. > > > Named graphs should work in OWL in principle, due to its layering on > top of RDF (each OWL document is also an RDF document). > > A main reason why there isn't support for named graphs in Protege yet > is that I didn't even know that they existed until they were recently > brought to my attention at the Protege conference (thanks for this by > the way). I scanned the documents which you mention and see that this > is a useful feature, and Protege should certainly support it in one > way or another. > > From my naive point of view, a limitation seems to be that named > graphs cannot easily be represented in the usual XML/RDF > serialization. This is the dominant file format though, and the one > that is supported by Protege's parser. So it seems that a solution > would require to build upon a mechanism which splits each named graph > into a separate RDF file. This could certainly be implemented at save > time. We are considering to add more options to the save mechanism > anyway, e.g. to automatically split instances and classes, to separate > public and private classes etc. So the idea of named graphs will also > play a role there (and suggestions from the community are welcome). > > A quite different question then is how to represent the named graphs > internally at run-time (so that the "cut points" can be determined), > and how to allow the user to define them in the user interface. I'd also encourage you to take a look at the SPARQL work on RDF querying, if you haven't already. SPARQL --- now a Last Call Working Draft --- includes an approach to querying a form of named graphs. There is also an XML format for representing query results, and a protocol. The former relates (in ways I'm unsure about) to the problem of serializing named graphs. I'm cc:'ing Andy Seaborne, who might have more to say about how the SPARQL work for Jena relates to other forms of "named graph". http://www.w3.org/TR/2005/WD-rdf-sparql-query-20050721/#specifyingDataset [[ Specifying RDF Datasets A SPARQL query may specify the dataset to be used for matching. The FROM clauses give IRIs that the query processor can use to create the default graph and the FROM NAMED clause can be used to specify named graphs. ]] The spec has a number of examples such as the following, which might give a flavour of SPARQL's graph-naming facilities (see spec for the corresponding target data and resultset)... PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX dc: <http://purl.org/dc/elements/1.1/> SELECT ?who ?g ?mbox FROM <http://example.org/dft.ttl> FROM NAMED <http://example.org/alice> FROM NAMED <http://example.org/bob> WHERE { ?g dc:publisher ?who . GRAPH ?g { ?x foaf:mbox ?mbox } } http://jena.hpl.hp.com/ARQ/ has an online demo, http://www.sparql.org/query.html that might be of interest. There's also usually one at http://librdf.org/query/ built on top of Redland, though that's offline today. cheers, Dan ------------------------------------------------------------------------- To unsubscribe go to http://protege.stanford.edu/community/subscribe.html |
|
|