Scott, I am using TBC 3.4.0.
The general form of the query was taken from http://www.cambridgesemantics.com/2008/09/sparql-by-example/#%2833%29 . The exact query I am running (slightly edited to remove propriety information) is: PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX cc: <http://anchor/example#> SELECT * WHERE { { ?s rdf:type cc:exampleType } UNION { GRAPH ?g { ?s rdf:type cc:exampleType } } } The intent is to return all named graphs which contain resources of rdf:type "exampleType." This query works perfectly when executed via the Jena/SDB QueryExecution class, by code (excerpted) here: Dataset ds = DatasetStore.create(store); // an SDB Store Query query = QueryFactory.create("---the above query---")); QueryExecution qe = QueryExecutionFactory.create(query, ds ); try { ResultSet rs = qe.execSelect(); ResultSetFormatter.out(rs); } finally { qe.close(); } Thanks for any comments, Dave On Apr 5, 6:23 pm, Scott Henninger <[email protected]> wrote: > Dave; We'd need a couple of follow-up to look into this properly. > First is what version of TBC-ME are you using? The second is what > specific query template are you using? > > To access an existing SDB database, you'd need to use the same New > > RDF/OWL Jena SDB Database Connection, and fill in the information on > the relational database where the data is store. Note that this > wizard only creates a connection to an existing data store. There > aren't any stricter requirements for using a .sdb connector. > > -- Scott > > On Apr 5, 3:24 pm, DaveL <[email protected]> wrote: > > > > > > > > > Having read the discussion last month about Named Graphs, I find > > myself still a bit confused. > > > I'm developing an OWL app which uses SDB as the repository. In the > > repository are many Models which are named graphs representing > > resources, and some Models which are ontologies (referenced by the > > resources, via the SDB DocumentManager). > > > I tried connecting to this pre-existing store from TBS (Maestro > > Edition), and had a couple of odd results. > > > First, if I create the .sdb file using the wizard under New / RDF/OWL > > Jena SDB Database Connection, I can access the default graph (if I > > don't fill in the "Named Graph URI" field, or any specific graph if I > > put its URI in the field, but there doesn't appear to be a way to > > access the database as a whole. For example, I'd like to be able to > > query for all graphs which contain a triple matching a pattern. The > > template for doing this (in the SPARQL by example presentation) > > doesn't work for me. > > > Second, re-opening an existing .sdb file never seems to work. An > > exception is invariably thrown: > > > "Could not load \TopBraid\SDBRepository.sdb or one of its imports. > > The most recent URI washttp://localhost/dataStore > > No matching StoreCache entry found" > > > Once I get this error I must restart TBS before I can look at the > > database again. > > > Any guidance on what this means? Are there stricter requirements for > > the contents of the database than I am aware of, for example? (Things > > I must add to be TBS-compatible, for example. I note a reference in > > the .sdb file to a "config" model that I don't create...) > > > Thanks, > > > Dave Lebling -- You received this message because you are subscribed to the Google Group "TopBraid Suite Users", the topics of which include TopBraid Composer, TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/topbraid-users?hl=en
