I'll cut this up so the thread isn't as difficult to follow... On Apr 8, 2:57 pm, DaveL <[email protected]> wrote: > More inline responses: > > On Apr 8, 2:03 pm, Scott Henninger <[email protected]> wrote: > > > > 2. So, I imported the ontologies into my project from the files before > > > creating the connection. This seemed to work better, but the resulting > > > "Ontology Overview" complains that there are multiple owl:Ontologies > > > in the model. It's not entirely clear from the popup explanation what > > > it does in this case and how to work around it. > > > 2a. The first sentence has thrown me off. What files are being added > > to the workspace? If you create an SDB connection, the only thing > > saved in your workspace is a .sdb file in Turtle format. It's about > > 20 lines and contains only connection information - i.e. how to get to > > the database, log in and what (if any) named graph is being > > accessed. The actual data is stored in the relational database of > > your choice. Given the rest of your statements, I think this is > > understood, so either clarification is needed or this is a source of > > the issues. > > Are you saying that a project which has an .sdb file can only have > that .sdb file as a member? By "import" I meant I added them to the > same project the .sdb is in.
There are no limitations on the files that can be in a project. Mixing different file types (text serializations, database connectors, etc.) is perfectly valid, normal, and common. So this is OK. > Today I tried deleting them and while it successfully creates the .sdb > file, the SPARQL queries no longer find my items. I'm missing some context and/or steps here. Perhaps a new thread with a procedure to reproduce this can get me back on track? You may want to take a look at http://www.topquadrant.com/products/TBS_FAQ.html#TBC10 to see how base URIs are utilized in Composer. I wonder if there was a base URI conflict somewhere in here that caused a problem? > Below is the error report I get. I don't know what Calais is, but > there seems to be no way to turn it off, or why it is being invoked. The query you gave probably was in the form of "GRAPH ?g {...}" In the context of Composer, this asks for all graphs in the registry - that means all graphs in the workspace, regardless of which project they are stored in (note that this context is different from that assumed in the tutorial you cited). Composer is errantly opening a graph to our Calais import feature. If you add a Calais API key (Preferences > Calais Text Analysis) the error will go away. However, FROM is not working correctly in 3.4.x so any GRAPH ?x {} query will search the entire workspace, regardless of what is stated in FROM and/ or FROM NAMED. When I tried this, it took a while, came back with a different exception, but it had found the data I had in SDB. That's not to say it's working as expected yet…. The FROM issue and Calais error are known defects that will be resolved in 3.5. In the meantime, you can use "GRAPH <base uri of graph> {...}" to address any of the named, unnamed, and union graphs in your SDB datastore. If you are having issues with that, please ask. For the original question of "I'd like to be able to query for all graphs which contain a triple matching a pattern" the procedure is the following: 1) Create a connector file to SDB specifying urn:x-arq:UnionGraph as the SDB Named Graph URI 2) Query against the base URI of the .sdb connector file created in step 1 > > > 4. It still doesn't work to re-open a connection file one has created > > > and saved. The error is as reported in my first message. The only > > > workaround is to create a new connection file with a different name or > > > restart TBC. > > > > I'd like to understand a little more about what is happening in item > > 2) before addressing this. Re-opening connector files works reliably > > in TBC-ME 3.4.0. > > This error (not finding a StoreCache entry) occurs whether or not I > have the imported ontologies in the Project. I'm assuming that you > mean "re-opening" should work in the same instance of TBC, as by dbl- > clicking the .sdb file name in the Navigation pane. Yes, I did mean that. If you are trying to access the same database with multiple instances of TBC, this should work. I.e. create the connector to a named (or the unnamed) graph, then copy the .sdb file and import to another instance of TBC. Or just create a different connector with the same database URI and name for the named graph. Is this the sort of thing you're trying to do? Any connector that properly points to the SDB database will get the most current data contents. The .sdb file is just a connector. What data storage back-end are you using? We would be interested in a reproducible procedure for this issue, if you have the time to provide one. -- Scott On Apr 8, 2:57 pm, DaveL <[email protected]> wrote: > More inline responses: > > On Apr 8, 2:03 pm, Scott Henninger <[email protected]> wrote: > > > > > Dave, see responses inline: > > > On Apr 7, 3:09 pm, DaveL <[email protected]> wrote: > > > > Thanks, Scott, that helps clarify the usage model. > > > > Unfortunately, I'm still having some issues. > > > > 1. My database contains named graphs which correspond to ontologies; > > > this is a feature SDB permits to allow you to reference an ontology > > > stored in the database rather than having to load from a file. When I > > > create the connection, I got an error that it couldn't find one (out > > > of four) referenced ontologies in the database. The resulting > > > connection didn't find much of anything. > > > If you have four ontologies (named graphs) then, you will need four > > connector files, one for each named graph. If you want to access the > > unnamed graph in SDB, you will need another connector file. Same for > > accessing the union graph. > > Today, the "can't find ontology" problem appears to have vanished. I'm > completely unclear as to why. > > > > 2. So, I imported the ontologies into my project from the files before > > > creating the connection. This seemed to work better, but the resulting > > > "Ontology Overview" complains that there are multiple owl:Ontologies > > > in the model. It's not entirely clear from the popup explanation what > > > it does in this case and how to work around it. > > > 2a. The first sentence has thrown me off. What files are being added > > to the workspace? If you create an SDB connection, the only thing > > saved in your workspace is a .sdb file in Turtle format. It's about > > 20 lines and contains only connection information - i.e. how to get to > > the database, log in and what (if any) named graph is being > > accessed. The actual data is stored in the relational database of > > your choice. Given the rest of your statements, I think this is > > understood, so either clarification is needed or this is a source of > > the issues. > > Are you saying that a project which has an .sdb file can only have > that .sdb file as a member? By "import" I meant I added them to the > same project the .sdb is in. > Today I tried deleting them and while it successfully creates the .sdb > file, the SPARQL queries no longer find my items. > > Below is the error report I get. I don't know what Calais is, but > there seems to be no way to turn it off, or why it is being invoked. > > eclipse.buildId=unknown > java.version=1.6.0_21 > java.vendor=Sun Microsystems Inc. > BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US > Command-line arguments: -os win32 -ws win32 -arch x86 > > Error > Fri Apr 08 15:36:30 EDT 2011 > Failed to retrieve all query results > > java.lang.IllegalArgumentException: Missing Calais license key - see > Calais Preferences (under Window > Preferences... > TopBraid Composer) > at org.topbraid.calais.CalaisUtil.callCalais(CalaisUtil.java:39) > at > org.topbraid.calais.graphstore.CalaisGraphStore.load(CalaisGraphStore.java: > 63) > at > org.topbraid.core.registry.IFileGraphSource.graphStoreLoad(IFileGraphSource.java: > 66) > at > org.topbraid.core.registry.IFileGraphSource.loadSpecialGraph(IFileGraphSource.java: > 45) > at org.topbraid.core.registry.GraphSource.loadGraph(GraphSource.java: > 84) > at org.topbraid.core.io.IO.load(IO.java:252) > at org.topbraid.core.io.IO.load(IO.java:555) > at org.topbraid.core.io.IO.load(IO.java:204) > at org.topbraid.sparql.TopBraidDataset.load(TopBraidDataset.java:471) > at org.topbraid.sparql.TopBraidDataset$4.map1(TopBraidDataset.java: > 319) > at org.topbraid.sparql.TopBraidDataset$4.map1(TopBraidDataset.java:1) > at org.topbraid.sparql.TopBraidDataset$5.map1(TopBraidDataset.java: > 376) > at org.topbraid.sparql.TopBraidDataset$5.map1(TopBraidDataset.java:1) > at > org.topbraid.sparql.TopBraidDataset.resolveURIasModel(TopBraidDataset.java: > 355) > at > org.topbraid.sparql.TopBraidDataset.getNamedModel(TopBraidDataset.java: > 283) > at org.topbraid.sparql.TopBraidDataset.getGraph(TopBraidDataset.java: > 117) > at com.hp.hpl.jena.sparql.engine.main.iterator.QueryIterGraph > $QueryIterGraphInner.buildIterator(QueryIterGraph.java:182) > at com.hp.hpl.jena.sparql.engine.main.iterator.QueryIterGraph > $QueryIterGraphInner.nextIterator(QueryIterGraph.java:166) > at com.hp.hpl.jena.sparql.engine.main.iterator.QueryIterGraph > $QueryIterGraphInner.hasNextBinding(QueryIterGraph.java:116) > at > com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java: > 69) > at > com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextBinding(QueryIterRepeatApply.java: > 60) > at > com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java: > 69) > at > com.hp.hpl.jena.sparql.engine.iterator.QueryIterConcat.hasNextBinding(QueryIterConcat.java: > 73) > at > com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java: > 69) > at > com.hp.hpl.jena.sparql.engine.iterator.QueryIterRepeatApply.hasNextBinding(QueryIterRepeatApply.java: > 60) > at > com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java: > 69) > at > com.hp.hpl.jena.sparql.engine.iterator.QueryIterConvert.hasNextBinding(QueryIterConvert.java: > 52) > at > com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java: > 69) > at > com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextBinding(QueryIteratorWrapper.java: > 31) > at > com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java: > 69) > at > com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorWrapper.hasNextBinding(QueryIteratorWrapper.java: > 31) > at > com.hp.hpl.jena.sparql.engine.iterator.QueryIteratorBase.hasNext(QueryIteratorBase.java: > 69) > at > com.hp.hpl.jena.sparql.engine.ResultSetStream.hasNext(ResultSetStream.java: > 63) > at org.topbraidcomposer.sparql.view.SPARQLView > $8.handleResultSet(SPARQLView.java:364) > at org.topbraidcomposer.sparql.view.SPARQLView > $10.runSelectOrDescribe(SPARQLView.java:458) > at org.topbraidcomposer.sparql.view.SPARQLView$10.run(SPARQLView.java: > 428) > at org.topbraidcomposer.core.util.ThreadUtil$1$1.run(ThreadUtil.java: > 63) > at java.lang.Thread.run(Unknown Source) > > > 2b. The multiple ontologies warning aligns the ontology statement and > > baseURI statement of the connector. It is safe to ignore or click to > > let the system take care of it. > > Today, this problem has gone away. I have no idea why. > > > > 4. It still doesn't work to re-open a connection file one has created > > > and saved. The error is as reported in my first message. The only > > > workaround is to create a new connection file with a different name or > > > restart TBC. > > > I'd like to understand a little more about what is happening in item > > 2) before addressing this. Re-opening connector files works reliably > > in TBC-ME 3.4.0. > > This error (not finding a StoreCache entry) occurs whether or not I > have the imported ontologies in the Project. I'm assuming that you > mean "re-opening" should work in the same instance of TBC, as by dbl- > clicking the .sdb file name in the Navigation pane. > > > > 5. Bug report: very few of your windows, most importantly error > > > message pop-ups, permit you to copy/paste out of them. Makes life > > > tedious. > > > All errors, along with warnings and some informational messages are > > found in the Error Log. Open this view in Window > Show View >Error > > Log. Double-click on a message to get a pop-up that you can copy, > > along with some nice buttons to copy to the clipboard, etc. > > Thank you. That's helpful. > > > > > -- Scott -- 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
