From fabio.mancinelli at xwiki.com Thu Aug 2 00:49:42 2007 From: fabio.mancinelli at xwiki.com (Fabio Mancinelli) Date: Thu, 2 Aug 2007 00:49:42 +0200 Subject: [Rdf2go-devel] Request for information Message-ID: <55B5C298-2361-4517-A436-D783543685BB@xwiki.com> Dear all, as some of you might already know, I started to collaborate with the Nepomuk project and, therefore, I am using many of the technologies related to RDF2Go. In an effort for better understanding those technologies, I started to experimenting with them. I must admit that I am a bit confused and so I am asking this list for some clarifications... *** 1) Which libraries? From the RDF2Go page, download section (http://wiki.ontoworld.org/ wiki/RDF2Go#Download) I am invited to download the required libraries from http://semweb4j.org/site/rdf2go/download.html. Here I can find the rdf2go.api, rdf2go.api.impl.base for using RDF2Go. I wrote a simple program [2] and everything worked fine. However in the tutorial, at the end of Lesson 1 there is a link to Semweb4j.rdf2go that points to http://ontoware.org/frs/?group_id=49 Here I can find similar libraries, org.semweb4j.rdf2go.api and org.semweb4j.rdf2go.impl.base, that basically have the same content, including the same package structure. So my first question is what is the difference between rdf2go.* and org.semweb4j.* and which one should I use? Why there is such an overlap of classes in these two libraries? My opinion is that they are basically the same thing with a different name, but maybe I am overlooking something (in fact I have problems using the org.semweb4j.* suite) *** 2) Sesame In Nepomuk there is a strong usage of RDF2Go in combination with Sesame. So I wanted to experiment with this setting. I succesfully built a program that directly uses Sesame and writes RDF models in a native store on disk. So I wanted to check if I was able to do the same thing through RDF2Go. I got the two jars openrdf-sesame-2.0-beta4-onejar.jar and openrdf- rdf2go-2.0-beta4.jar and I put them with all the other rdf2go.* jars [1]. Then I got stuck for configuring the binding. Apparently it is not automatic, and I haven't find clear documentation or examples on how to do it. I also looked at this page http://rdf2go.ontoware.org/config.html but I think it is a bit outdated since in the libraries I have in [1], the class org.ontoware.rdf2go.impl.ModelFactory does not exist. Looking at the semweb4j counterpart, I have noticed that there exist this org.semweb4j.rdf2go.impl.openrdf.jar that looks like an "adapter" for Sesame (that can also be found in lib directory embedded in the jar as openrdf-sesame-2.0-alpha4.jar) but still... no chance to make it work [2]. I apologize if this is not the right place for this mail or if I am asking trivial things, but I was unable to find this information on RDF2Go-related sites and I really want to understand how all these pieces fit together. Thank you for your help, Fabio [1] The jars I have in my classpath are for my experiments are: log4j-1.2.14.jar openrdf-rdf2go-2.0-beta4.jar openrdf-sesame-2.0-beta4-onejar.jar rdf2go.api-4.4.7.jar rdf2go.impl.base-4.4.6.jar slf4j-api-1.3.0.jar slf4j-log4j12-1.3.0.jar [2] This is the code I wrote using RDF2Go: ModelFactory modelFactory = RDF2Go.getModelFactory(); Model model = modelFactory.createModel(); model.open(); URI subject = model.createURI("http://example.com/Subject"); URI predicate = model.createURI("http://example.com/Predicate"); URI objectA = model.createURI("http://example.com/ObjectA"); URI objectB = model.createURI("http://example.com/ObjectB"); model.addStatement(subject, predicate, objectA); model.addStatement(subject, predicate, objectB); model.close(); And I would like the two statements to be persisted by Sesame in a given directory using a Native Store, as I successfully did in another example using directly Sesame. From voelkel at fzi.de Thu Aug 2 16:47:16 2007 From: voelkel at fzi.de (Max Voelkel) Date: Thu, 2 Aug 2007 16:47:16 +0200 Subject: [Rdf2go-devel] Request for information In-Reply-To: <55B5C298-2361-4517-A436-D783543685BB@xwiki.com> References: <55B5C298-2361-4517-A436-D783543685BB@xwiki.com> Message-ID: <781394193.20070802164716@fzi.de> Hi Fabio, F> as some of you might already know, I started to collaborate with the F> Nepomuk project and, therefore, I am using many of the technologies F> related to RDF2Go. first, please note that RDF2Go and RDF2Go-as-used-in-Nepomuk has some differences. I currently manange RDF2Go and it's releases. Using some magic scripts, Antoni Mylka from DFKI produces OSGI-Bundles from the sourcecode, these versions are then used within NEPOMUK. The current version released by me is 4.4.6, the latest version used in NEPOMUK is 4.4.1, I think. THe NEPOMUK-version should be available in the Eclipse Target Platform. F> *** 1) Which libraries? This is of course always a question. Therefore, we switched to Maven, in order to get dependency managenment right. F> From the RDF2Go page, download section (http://wiki.ontoworld.org/ F> wiki/RDF2Go#Download) I am invited to download the required libraries F> from http://semweb4j.org/site/rdf2go/download.html. Here I can find F> the rdf2go.api, rdf2go.api.impl.base for using RDF2Go. I wrote a F> simple program [2] and everything worked fine. Good! F> However in the tutorial, at the end of Lesson 1 there is a link to F> Semweb4j.rdf2go that points to http://ontoware.org/frs/?group_id=49 Ouch, this is outdated. I removed the link. F> Here I can find similar libraries, org.semweb4j.rdf2go.api and F> org.semweb4j.rdf2go.impl.base, that basically have the same content, F> including the same package structure. It's the same content, just the files are named differently. F> So my first question is what is the difference between rdf2go.* and F> org.semweb4j.* and which one should I use? Branding only. We use now the maven naming conventions, which is rdf2go.* ... includign the version number. You can also get the releases directly from our public maven repo: http://semweb4j.org/repo F> *** 2) Sesame F> In Nepomuk there is a strong usage of RDF2Go in combination with F> Sesame. So I wanted to experiment with this setting. I succesfully F> built a program that directly uses Sesame and writes RDF models in a F> native store on disk. So I wanted to check if I was able to do the F> same thing through RDF2Go. Ok. F> I got the two jars openrdf-sesame-2.0-beta4-onejar.jar and openrdf- F> rdf2go-2.0-beta4.jar and I put them with all the other rdf2go.* jars F> [1]. Where did you get these Jars from? There are some version issues: Either you take everything from the Eclipse Target Platform and use RDF2Go 4.4.1 with Sesame beta4 - OR - You use 'our' version of the openrdf-rdf2go adapter, which is a 'hacked' POM in the sense that it uses a more recent, less buggy version of RDF2Go. You can get it here: http://semweb4j.org/repo/org/openrdf/openrdf-rdf2go/2.0-beta4hack/ In the near future, Aduna will release a new version of Sesame, together with a new version of the openrdf-rdf2go adapter. F> Then I got stuck for configuring the binding. Apparently it is not F> automatic, and I haven't find clear documentation or examples on how F> to do it. Right, this is poorly documented. I wrote up a little summary here: http://ontoworld.org/wiki/RDF2Go/Binding F> I also looked at this page http://rdf2go.ontoware.org/config.html but F> I think it is a bit outdated since in the libraries I have in [1], F> the class org.ontoware.rdf2go.impl.ModelFactory does not exist. right, outdated. Now even marked as such. F> Looking at the semweb4j counterpart, I have noticed that there exist F> this org.semweb4j.rdf2go.impl.openrdf.jar that looks like an F> "adapter" for Sesame (that can also be found in lib directory F> embedded in the jar as openrdf-sesame-2.0-alpha4.jar) but still... no F> chance to make it work [2]. Depends on the versions: again, use all from one "vendor" ( :- ), all from Nepomuk ETP or all from semweb4j.org/repo. F> I apologize if this is not the right place for this mail or if I am F> asking trivial things, but I was unable to find this information on F> RDF2Go-related sites and I really want to understand how all these F> pieces fit together. Thank you very much to shake up the documentation a little! I hope things are clearer now - please continue to email us ;-) Kind Regards, Max -- Max V?lkel office: +49 721 9654-854 http://Xam.de mobile: +49 171 8359678 FZI Forschungszentrum Informatik http://www.FZI.de an der Universit?t Karlsruhe telephone: +49-721-9654-0 Haid-und-Neu-Str. 10-14 fax: +49-721-9654-959 D-76131 Karlsruhe Stiftung des b?rgerlichen Rechts. Az: 14-0563.1 Regierungspr?sidium Karlsruhe. Vorstand: Prof. Dr.-Ing. R?diger Dillmann, Dipl. Wi.-Ing. Michael Flor, Prof. Dr. Dr.-Ing. Jivka Ovtcharova, Prof. Dr. rer. nat. Rudi Studer. Vorsitzender des Kuratoriums: Ministerialdirigent G?nther Le?nerkraus. From axel at rauschma.de Mon Aug 6 18:14:03 2007 From: axel at rauschma.de (Axel Rauschmayer) Date: Mon, 6 Aug 2007 18:14:03 +0200 Subject: [Rdf2go-devel] Sesame: ModelRuntimeException: Connection is null Message-ID: <976E18F7-3FAA-4015-9959-E2237B70B27C@rauschma.de> Executing the unit test below my signature, I get the following exception: org.ontoware.rdf2go.exception.ModelRuntimeException: Connection is null at org.openrdf.rdf2go.RepositoryModel.assertModel (RepositoryModel.java:498) at org.openrdf.rdf2go.RepositoryModel.findStatements (RepositoryModel.java:209) at org.ontoware.rdf2go.model.impl.AbstractModelRemovePatterns.removeStateme nts(AbstractModelRemovePatterns.java:30) at org.ontoware.rdf2go.model.impl.AbstractModelSetImpl.removeStatements (AbstractModelSetImpl.java:231) at de.hypergraphs.hyena.core.rdf.model.ObservableModelSetImpl.removeStateme nts(ObservableModelSetImpl.java:264) at de.hypergraphs.hyena.core.rdf.model.RDF2GoTest.test (RDF2GoTest.java:38) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.junit.internal.runners.TestMethodRunner.executeMethodBody (TestMethodRunner.java:99) at org.junit.internal.runners.TestMethodRunner.runUnprotected (TestMethodRunner.java:81) at org.junit.internal.runners.BeforeAndAfterRunner.runProtected (BeforeAndAfterRunner.java:34) at org.junit.internal.runners.TestMethodRunner.runMethod (TestMethodRunner.java:75) at org.junit.internal.runners.TestMethodRunner.run (TestMethodRunner.java:45) at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod (TestClassMethodsRunner.java:66) at org.junit.internal.runners.TestClassMethodsRunner.run (TestClassMethodsRunner.java:35) at org.junit.internal.runners.TestClassRunner$1.runUnprotected (TestClassRunner.java:42) at org.junit.internal.runners.BeforeAndAfterRunner.runProtected (BeforeAndAfterRunner.java:34) at org.junit.internal.runners.TestClassRunner.run (TestClassRunner.java:52) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run (JUnit4TestReference.java:38) at org.eclipse.jdt.internal.junit.runner.TestExecution.run (TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests (RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests (RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run (RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main (RemoteTestRunner.java:196) Am I doing something wrong? Maybe a new version of RDF2Go fixes the problem, but I had to go with the version that came with latest Sesame adapter that I could find. This is my setup: > openrdf-sesame-2.0-beta4-onejar.jar > org.openrdf.rdf2go-4.4.1.2682.jar > rdf2go-4.4.1.jar > rdf2go-impl-base-4.4.1.jar Thanks, Axel -- Axel Rauschmayer http://www.pst.ifi.lmu.de/~rauschma/ import org.junit.Before; import org.junit.Test; import org.ontoware.rdf2go.model.ModelSet; import org.ontoware.rdf2go.model.node.URI; import org.ontoware.rdf2go.model.node.Variable; import org.openrdf.rdf2go.RepositoryModelSet; import org.openrdf.repository.Repository; import org.openrdf.repository.RepositoryException; import org.openrdf.repository.sail.SailRepository; import org.openrdf.sail.memory.MemoryStore; public class RDF2GoTest { private ModelSet modelSet; @Before public void before() { this.modelSet = new ObservableModelSetImpl(new RepositoryModelSet (createSesameMemoryRepository())); this.modelSet.open(); } private static Repository createSesameMemoryRepository() { try { MemoryStore sail = new MemoryStore(); Repository rep = new SailRepository(sail); rep.initialize(); return rep; } catch (RepositoryException e) { throw new RuntimeException(e); } } @Test public void test() { URI uri = modelSet.createURI("http://example"); modelSet.addStatement(null, uri, uri, uri); modelSet.removeStatements(null, Variable.ANY, Variable.ANY, Variable.ANY); } } From leo.sauermann at dfki.de Wed Aug 8 19:31:31 2007 From: leo.sauermann at dfki.de (Leo Sauermann) Date: Wed, 08 Aug 2007 19:31:31 +0200 Subject: [Rdf2go-devel] Sesame: ModelRuntimeException: Connection is null In-Reply-To: <976E18F7-3FAA-4015-9959-E2237B70B27C@rauschma.de> References: <976E18F7-3FAA-4015-9959-E2237B70B27C@rauschma.de> Message-ID: <46B9FDF3.7050605@dfki.de> Hi RDF2Go, this was indeed a problem. I think this shows that someone should seriously fix the RDF2Go JUnit tests, because when this fails, I wonder why anything in RDF2Go works: modelSet.addStatement(null, uri, uri, uri); modelSet.removeStatements(null, Variable.ANY, Variable.ANY, Variable.ANY); I fixed this by overriding the removeStatements method in the sesame-rdf2go driver, but the problem is rooted in the Abstract implementations, that do not care about opening/closing models and also handle context in the modelset a little weird. (AbstractModelSet has a find(c,s,p,o) methods, AbstractModelSet should never call getModel(c).find(s,p,o) during remove/exists calls) the fix is committed to the sesame repo. best Leo It was Axel Rauschmayer who said at the right time 06.08.2007 18:14 the following words: > Executing the unit test below my signature, I get the following > exception: > > org.ontoware.rdf2go.exception.ModelRuntimeException: Connection is null > at org.openrdf.rdf2go.RepositoryModel.assertModel > (RepositoryModel.java:498) > at org.openrdf.rdf2go.RepositoryModel.findStatements > (RepositoryModel.java:209) > at > org.ontoware.rdf2go.model.impl.AbstractModelRemovePatterns.removeStateme > nts(AbstractModelRemovePatterns.java:30) > at > org.ontoware.rdf2go.model.impl.AbstractModelSetImpl.removeStatements > (AbstractModelSetImpl.java:231) > at > de.hypergraphs.hyena.core.rdf.model.ObservableModelSetImpl.removeStateme > nts(ObservableModelSetImpl.java:264) > at de.hypergraphs.hyena.core.rdf.model.RDF2GoTest.test > (RDF2GoTest.java:38) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke > (NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke > (DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at org.junit.internal.runners.TestMethodRunner.executeMethodBody > (TestMethodRunner.java:99) > at org.junit.internal.runners.TestMethodRunner.runUnprotected > (TestMethodRunner.java:81) > at org.junit.internal.runners.BeforeAndAfterRunner.runProtected > (BeforeAndAfterRunner.java:34) > at org.junit.internal.runners.TestMethodRunner.runMethod > (TestMethodRunner.java:75) > at org.junit.internal.runners.TestMethodRunner.run > (TestMethodRunner.java:45) > at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod > (TestClassMethodsRunner.java:66) > at org.junit.internal.runners.TestClassMethodsRunner.run > (TestClassMethodsRunner.java:35) > at org.junit.internal.runners.TestClassRunner$1.runUnprotected > (TestClassRunner.java:42) > at org.junit.internal.runners.BeforeAndAfterRunner.runProtected > (BeforeAndAfterRunner.java:34) > at org.junit.internal.runners.TestClassRunner.run > (TestClassRunner.java:52) > at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run > (JUnit4TestReference.java:38) > at org.eclipse.jdt.internal.junit.runner.TestExecution.run > (TestExecution.java:38) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests > (RemoteTestRunner.java:460) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests > (RemoteTestRunner.java:673) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run > (RemoteTestRunner.java:386) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main > (RemoteTestRunner.java:196) > > Am I doing something wrong? Maybe a new version of RDF2Go fixes the > problem, but I had to go with the version that came with latest > Sesame adapter that I could find. This is my setup: > >> openrdf-sesame-2.0-beta4-onejar.jar >> org.openrdf.rdf2go-4.4.1.2682.jar >> rdf2go-4.4.1.jar >> rdf2go-impl-base-4.4.1.jar >> > > Thanks, > > Axel > > -- > Axel Rauschmayer > http://www.pst.ifi.lmu.de/~rauschma/ > > import org.junit.Before; > import org.junit.Test; > import org.ontoware.rdf2go.model.ModelSet; > import org.ontoware.rdf2go.model.node.URI; > import org.ontoware.rdf2go.model.node.Variable; > import org.openrdf.rdf2go.RepositoryModelSet; > import org.openrdf.repository.Repository; > import org.openrdf.repository.RepositoryException; > import org.openrdf.repository.sail.SailRepository; > import org.openrdf.sail.memory.MemoryStore; > > public class RDF2GoTest { > private ModelSet modelSet; > > @Before > public void before() { > this.modelSet = new ObservableModelSetImpl(new RepositoryModelSet > (createSesameMemoryRepository())); > this.modelSet.open(); > } > > private static Repository createSesameMemoryRepository() { > try { > MemoryStore sail = new MemoryStore(); > Repository rep = new SailRepository(sail); > rep.initialize(); > return rep; > } catch (RepositoryException e) { > throw new RuntimeException(e); > } > } > > @Test > public void test() { > URI uri = modelSet.createURI("http://example"); > modelSet.addStatement(null, uri, uri, uri); > modelSet.removeStatements(null, Variable.ANY, Variable.ANY, > Variable.ANY); > } > > } > > > > > _______________________________________________ > Rdf2go-devel mailing list > Rdf2go-devel at ontoware.org > http://ontoware.org/mailman/listinfo/rdf2go-devel > -- ____________________________________________________ DI Leo Sauermann http://www.dfki.de/~sauermann Deutsches Forschungszentrum fuer Kuenstliche Intelligenz DFKI GmbH Trippstadter Strasse 122 P.O. Box 2080 Fon: +49 631 20575-116 D-67663 Kaiserslautern Fax: +49 631 20575-102 Germany Mail: leo.sauermann at dfki.de Geschaeftsfuehrung: Prof.Dr.Dr.h.c.mult. Wolfgang Wahlster (Vorsitzender) Dr. Walter Olthoff Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes Amtsgericht Kaiserslautern, HRB 2313 ____________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://ontoware.org/pipermail/rdf2go-devel/attachments/20070808/deb64330/attachment-0001.html From leo.sauermann at dfki.de Thu Aug 9 16:17:30 2007 From: leo.sauermann at dfki.de (Leo Sauermann) Date: Thu, 09 Aug 2007 16:17:30 +0200 Subject: [Rdf2go-devel] rdf2go/sesame + open/close In-Reply-To: <46AE1254.702@aduna-software.com> References: <46AA18D1.7090300@dfki.de> <46ADADA8.3040501@dfki.uni-kl.de> <46ADE3B4.10302@dfki.de> <724900392.20070730170507@fzi.de> <46AE1254.702@aduna-software.com> Message-ID: <46BB21FA.8020708@dfki.de> Hi RDF2Go, I reviewed the suggestions on the wiki [1] and see that at the moment, the "leave it open" best practice gets the most "pro" argeuments. I extended the best practice recommendation to this words: "establish a best practice recommendation: all modelsets have to be open all the time and have to be left open once opened, if someone else wants to access them in the future. A Model or ModelSet passed to you in a method parameter is assumed to be open already. The object that creates a ModelSet is responsible for opening and closing it. Calling close/open to flush bulk operations is ok but not needed, as Bulk operations are implemented in update(Diff)." That said, the only architectural Change I would recommend is: * calling ModelSet.getModel() requires the modelSet to be open and will throw an exception otherwise * calling ModelSet.getModel() will return an open model. (this is very handy and good) * calling ModelSet.close() will close the modelset and all returned models (this is handy when doign a shutdown) * calling Model.close() will only close the model, but not the modelset. It is a good practice to do that, but not required. -> for all these changes: we need strict JUnit tests to positively/negatively enforce this. I would NOT argue for the usage-count approach, as this complicates things and makes the behavior unpredicatable (calling close() will not always close). Please give feedback, after a few more days of discussion I would hope we can agree on a new best practice. best Leo [1] http://ontoworld.org/wiki/Talk:RDF2Go#Open.2FClose It was Christiaan Fluit who said at the right time 30.07.2007 18:31 the following words: > Max Voelkel wrote: > >> The analysis shows quite clearly hat Sesame 2 connection handling is an issue. >> The open/close thing came in to hanlde Sesames open/close, Jena does not have >> this notion. >> >> We should learn more about how it works and why it works the way it works. >> >> @Aduna: Why is there open/close and how should it be used? >> > > Arjohn (who is also on this list, but cc-ing to be sure) is currently on > holiday leave and this question is really best answered by him. > > Nevertheless, I'll give it a try :) My guess is that he modeled this > after the JDBC APIs, which are used in some of the SAIL implementations. > The reason why this was done is probably the same as why you added it to > RDF2Go. Rather than adding open() and close() to the RDF2Go API, you > could also have considered this an "internal issue" for the RDF2Go > driver to solve. I expect that this is much harder to implement (and > keep it reliable and scalable) than when Model(Set) are explicitly told > when to open and close stuff. Exactly the same problem occurs when > creating a Sesame SAIL implementation operating on top of a database or > some other information system with a non-negligible initialization > overhead. My guess is that that is the main reason why Sesame also has > open and close methods. > > I wonder whether your life would get easier if you get rid of the open > method (meaning for the openrdf driver that connections are always > opened after creation) and keep the close method (perhaps better renamed > to dispose). Is there a use case where you create a Model that you don't > open immediately afterwards? > > > Regards, > > Chris > -- > > _______________________________________________ > Rdf2go-devel mailing list > Rdf2go-devel at ontoware.org > http://ontoware.org/mailman/listinfo/rdf2go-devel > -- ____________________________________________________ DI Leo Sauermann http://www.dfki.de/~sauermann Deutsches Forschungszentrum fuer Kuenstliche Intelligenz DFKI GmbH Trippstadter Strasse 122 P.O. Box 2080 Fon: +49 631 20575-116 D-67663 Kaiserslautern Fax: +49 631 20575-102 Germany Mail: leo.sauermann at dfki.de Geschaeftsfuehrung: Prof.Dr.Dr.h.c.mult. Wolfgang Wahlster (Vorsitzender) Dr. Walter Olthoff Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes Amtsgericht Kaiserslautern, HRB 2313 ____________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://ontoware.org/pipermail/rdf2go-devel/attachments/20070809/4231e721/attachment.html From axel at rauschma.de Thu Aug 9 18:24:25 2007 From: axel at rauschma.de (Axel Rauschmayer) Date: Thu, 9 Aug 2007 18:24:25 +0200 Subject: [Rdf2go-devel] rdf2go/sesame + open/close Message-ID: A few comments "from the outside" (=an RDF2Go newbie), so forgive any ignorance you might encounter. > * calling Model.close() will only close the model, but not the > modelset. > It is a good practice to do that, but not required. Considering your other comments (Model.open() being discouraged or auto-performed), this sounds more like a package-internal operation. In general, I would like a Model to be just a "curried" wrapper for a ModelSet (currently it seems to be the other way around: a ModelSet wraps several Models). - Compare: There are resource centric Java APIs where wrapper objects hold a resource and provide the same API as the triple store (minus the "subject" part of each method signature). - Similarly, a Model could just be a triple wrapper for the quad API "ModelSet". Advantages: - No more opening and closing. - A more solid core API (ModelSet). - I have use cases where I need Models to encapsulate *sets* of contexts (and not just a single context). This change makes it possible, because one would never list the models of a ModelSet, just its context URIs and then instantiate a ModelSet with 1 or more context URIs (varargs...). The Sesame quad API does this very well: Contexts are always a vararg; zero context URIs mean "look everywhere", 1 or more context URIs mean "look at all these contexts". Does this make sense? Greetings, Axel -- Axel Rauschmayer http://www.pst.ifi.lmu.de/~rauschma/ From leo.sauermann at dfki.de Thu Aug 9 18:56:21 2007 From: leo.sauermann at dfki.de (Leo Sauermann) Date: Thu, 09 Aug 2007 18:56:21 +0200 Subject: [Rdf2go-devel] rdf2go/sesame + open/close In-Reply-To: References: Message-ID: <46BB4735.2030302@dfki.de> two issues: 1) don't forget to discuss my first question namely, what is best practice for close/open - do we have an agreement? Because the issue braught up by Alex does not affect the best practice, it only affects the implementation of the abstract classes and Adapters. I understand that Axel agreed with my other points (if not, please say so) * ModelSet.open() is called once by the creator of the ModelSet, and then open modelsets are passed around until the same creator closes it again. ModelSet.getModel() implies an open model is returned. 2) Axel, your "view from the outside" quite resembles how modern Quadstores work, only the initial implementation of Jena NG4J by Richard Cyganiak had the notion of "a modelset is a collection of independent models". So, I would say: yes, its a good way to view a Model as a Wrapper on ModelSet, in cases when you have a quadstore underneath and called ModelSet.getModel(). BUT when you handle individual models, the wrapping wrong. For example: Model m = RDF2Go.getModelFactory().createModel(); m.open(); m.read(....my foaf file....); .... nevertheless, from USING them, the inside implementation (ModelSet wrapping model or Model wrapping modelset) is not visible when using hte interfaces. BUT the implementation of AbstractModelSet was implemented in a "a ModelSet wraps a Model" way, which caused havoc because of its bug-ness, so I vote +1 on "a model wraps a modelset, when created by ModelSet.open()" I created a new, separated IBAW argument on the wiki page. http://ontoworld.org/wiki/Talk:RDF2Go#Model_wrapping_ModelSet_when_created_by_ModelSet Axel, I think there is an argumentation error in this line: > I have use cases where I need Models to encapsulate *sets* of > contexts (and not just a single context). This change makes it > possible, because one would never list the models of a ModelSet, just > its context URIs and then instantiate a ModelSet with 1 or more > context URIs (varargs...). The Sesame quad API does this very well: > Contexts are always a vararg; zero context URIs mean "look > everywhere", 1 or more context URIs mean "look at all these contexts". I would think you mean Model instead of ModelSet ".... its context URIs and then instantiate a Model with 1 or more context URIs (varargs...) ..." (otherwise you would wrap a modelset with a modelset, which is bad because you wanted to have multiple contexts in one model), I changed this on the wiki page, if I am wrong, change it back to your original. It was Axel Rauschmayer who said at the right time 09.08.2007 18:24 the following words: > A few comments "from the outside" (=an RDF2Go newbie), so forgive any > ignorance you might encounter. > > >> * calling Model.close() will only close the model, but not the >> modelset. >> It is a good practice to do that, but not required. >> > > Considering your other comments (Model.open() being discouraged or > auto-performed), this sounds more like a package-internal operation. > > In general, I would like a Model to be just a "curried" wrapper for a > ModelSet (currently it seems to be the other way around: a ModelSet > wraps several Models). > - Compare: There are resource centric Java APIs where wrapper objects > hold a resource and provide the same API as the triple store (minus > the "subject" part of each method signature). > - Similarly, a Model could just be a triple wrapper for the quad API > "ModelSet". > > Advantages: > - No more opening and closing. > - A more solid core API (ModelSet). > - I have use cases where I need Models to encapsulate *sets* of > contexts (and not just a single context). This change makes it > possible, because one would never list the models of a ModelSet, just > its context URIs and then instantiate a ModelSet with 1 or more > context URIs (varargs...). The Sesame quad API does this very well: > Contexts are always a vararg; zero context URIs mean "look > everywhere", 1 or more context URIs mean "look at all these contexts". > > Does this make sense? > > Greetings, > > Axel > > -- > Axel Rauschmayer > http://www.pst.ifi.lmu.de/~rauschma/ > > > > > _______________________________________________ > Rdf2go-devel mailing list > Rdf2go-devel at ontoware.org > http://ontoware.org/mailman/listinfo/rdf2go-devel > -- ____________________________________________________ DI Leo Sauermann http://www.dfki.de/~sauermann Deutsches Forschungszentrum fuer Kuenstliche Intelligenz DFKI GmbH Trippstadter Strasse 122 P.O. Box 2080 Fon: +49 631 20575-116 D-67663 Kaiserslautern Fax: +49 631 20575-102 Germany Mail: leo.sauermann at dfki.de Geschaeftsfuehrung: Prof.Dr.Dr.h.c.mult. Wolfgang Wahlster (Vorsitzender) Dr. Walter Olthoff Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes Amtsgericht Kaiserslautern, HRB 2313 ____________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://ontoware.org/pipermail/rdf2go-devel/attachments/20070809/278328bd/attachment.html From axel at rauschma.de Thu Aug 9 19:53:25 2007 From: axel at rauschma.de (Axel Rauschmayer) Date: Thu, 9 Aug 2007 19:53:25 +0200 Subject: [Rdf2go-devel] rdf2go/sesame + open/close References: <6867EA5B-DC72-4AC6-AB7D-9BA4E99625EB@rauschma.de> Message-ID: > 1) don't forget to discuss my first question > namely, what is best practice for close/open - do we have an > agreement? Concerning open() (close() is another issue): The cleanest solution might be to eliminate it completely (just like in java.io's Streams and Readers which also need to be closed). Is there any reason for this two-step opening process? > BUT when you handle individual models, the wrapping wrong. > For example: > Model m = RDF2Go.getModelFactory().createModel(); > m.open(); > m.read(....my foaf file....); Yes, stand-alone models make a lot of sense. The nice thing about them (following the Model-wraps-ModelSet idea) is that they can be completely implemented by RDF2Go and don't add complications to the adapter layers for Sesame, Jena, etc. > Axel, I think there is an argumentation error in this line: >> I have use cases where I need Models to encapsulate *sets* of >> contexts (and not just a single context). This change makes it >> possible, because one would never list the models of a ModelSet, >> just its context URIs and then instantiate a ModelSet with 1 or >> more context URIs (varargs...). The Sesame quad API does this very >> well: Contexts are always a vararg; zero context URIs mean "look >> everywhere", 1 or more context URIs mean "look at all these >> contexts". > > I would think you mean Model instead of ModelSet > ".... its context URIs and then instantiate a Model with 1 or more > context URIs (varargs...) ..." Correct, that was a typo. -- Axel Rauschmayer http://www.pst.ifi.lmu.de/~rauschma/ From axel at rauschma.de Thu Aug 9 20:13:39 2007 From: axel at rauschma.de (Axel Rauschmayer) Date: Thu, 9 Aug 2007 20:13:39 +0200 Subject: [Rdf2go-devel] Multiple ModelSet users Message-ID: <03CA91D6-04C2-448B-8881-E16288765E6B@rauschma.de> What is the actual problem with this scenario [1]? - close(): Why would any user invoke this method? If there is a need for invoking close() before the complete and final shutdown then maybe a method commit() should be introduced. But abandoning auto- commit will cost some simplicity and lead to migration pains. - Note: even if you introduce a session object, you still have to perform the final shutdown manually and only once. So I don't see how this would solve any problems. It *would*, however, be useful if RDF2Go were to be migrated toward a session-oriented approach (= a single repository produces several sessions which are the main access API). Currently I would assume that concurrent access to the same ModelSet is forbidden, with transactions it becomes possible. - open(): eliminate it completely? Then no guideline is necessary here. [1] http://ontoworld.org/wiki/Talk:RDF2Go#Open.2FClose -- Axel Rauschmayer http://www.pst.ifi.lmu.de/~rauschma/ From leo.sauermann at dfki.de Fri Aug 10 10:22:45 2007 From: leo.sauermann at dfki.de (Leo Sauermann) Date: Fri, 10 Aug 2007 10:22:45 +0200 Subject: [Rdf2go-devel] Multiple ModelSet users In-Reply-To: <03CA91D6-04C2-448B-8881-E16288765E6B@rauschma.de> References: <03CA91D6-04C2-448B-8881-E16288765E6B@rauschma.de> Message-ID: <46BC2055.8060403@dfki.de> It was Axel Rauschmayer who said at the right time 09.08.2007 20:13 the following words: > What is the actual problem with this scenario [1]? > this code sucks::::::::::::: ms = Manager.getModelSet(); boolean wasopen = ms.isOpen(); if (!wasopen) ms.open; try { ms.........dothethingthatclientsusuallydo ms....do another thing that takes 20 seconds ms.... is the modelset still open or did somebody else close it? who knows.... } finally { if (!wasopen) ms.close; } this is what you would want to do::::::::::::::::::::: (no "if") ms = Manager.getModelSet(); ms.........dothethingthatclientsusuallydo ms....do another thing that takes 20 seconds ms.... the modelset stays open... > - close(): Why would any user invoke this method? If there is a need > for invoking close() before the complete and final shutdown then > maybe a method commit() should be introduced. But abandoning auto- > commit will cost some simplicity and lead to migration pains. > ok, autocommit should never be abandoned, otherwise we are dragged into sesameistic complexity. > - Note: even if you introduce a session object, you still have to > perform the final shutdown manually and only once. So I don't see how > this would solve any problems. It *would*, however, be useful if > RDF2Go were to be migrated toward a session-oriented approach (= a > single repository produces several sessions which are the main access > API). Currently I would assume that concurrent access to the same > ModelSet is forbidden, with transactions it becomes possible. > the underlying framework will then deadlock ("concurrent modification....") Both Jena and Sesame have problems with multi-threaded read/writes. If sessions or synchronization are ever needed, they should be done using Java.synchronized, Malte Kiesel suggested that out of the simple argument: Java does this already. > - open(): eliminate it completely? Then no guideline is necessary here. > I would not do that, not before RDF2Go 5.0 (which I hope we do not-so-soon and after a lot of thinking and discussion) all our code assumes the open() method. Sesame does "open" Sesame: Repsitory.initialize() Jena doesn't, I think. I have no problem leaving it in, especially because then open() & close() build a "couple", they correspond to each other and people know that when they call open, they have to call close, I think thats ok. its somehow intuitive. probably garbage collection will have its problems with Models, so an explicit close() is good, compared to the implicit finalization of java.util.Lists and java.util.Sets (where garbage collection works) best Leo > [1] http://ontoworld.org/wiki/Talk:RDF2Go#Open.2FClose > > -- > Axel Rauschmayer > http://www.pst.ifi.lmu.de/~rauschma/ > > > > > _______________________________________________ > Rdf2go-devel mailing list > Rdf2go-devel at ontoware.org > http://ontoware.org/mailman/listinfo/rdf2go-devel > -- ____________________________________________________ DI Leo Sauermann http://www.dfki.de/~sauermann Deutsches Forschungszentrum fuer Kuenstliche Intelligenz DFKI GmbH Trippstadter Strasse 122 P.O. Box 2080 Fon: +49 631 20575-116 D-67663 Kaiserslautern Fax: +49 631 20575-102 Germany Mail: leo.sauermann at dfki.de Geschaeftsfuehrung: Prof.Dr.Dr.h.c.mult. Wolfgang Wahlster (Vorsitzender) Dr. Walter Olthoff Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes Amtsgericht Kaiserslautern, HRB 2313 ____________________________________________________ From leo.sauermann at dfki.de Fri Aug 10 10:26:33 2007 From: leo.sauermann at dfki.de (Leo Sauermann) Date: Fri, 10 Aug 2007 10:26:33 +0200 Subject: [Rdf2go-devel] Multiple ModelSet users In-Reply-To: <03CA91D6-04C2-448B-8881-E16288765E6B@rauschma.de> References: <03CA91D6-04C2-448B-8881-E16288765E6B@rauschma.de> Message-ID: <46BC2139.4080803@dfki.de> It was Axel Rauschmayer who said at the right time 09.08.2007 20:13 the following words: > What is the actual problem with this scenario [1]? > > - close(): Why would any user invoke this method? If there is a need > for invoking close() before the complete and final shutdown then > maybe a method commit() should be introduced. But abandoning auto- > commit will cost some simplicity and lead to migration pains. > yes, rdf2go assumes you have auto-commit, and this is good (I implemented a buffered model that commits on a commit() call, allowing you to do this as extension, see here: http://dev.nepomuk.semanticdesktop.org/browser/trunk/java/org.semanticdesktop.nepomuk.comp.pimoservice/src/org/semanticdesktop/nepomuk/comp/pimoservice/client/DiffModelSet.java) From voelkel at fzi.de Tue Aug 7 09:02:40 2007 From: voelkel at fzi.de (Max Voelkel) Date: Tue, 7 Aug 2007 09:02:40 +0200 Subject: [Rdf2go-devel] Sesame: ModelRuntimeException: Connection is null In-Reply-To: <976E18F7-3FAA-4015-9959-E2237B70B27C@rauschma.de> References: <976E18F7-3FAA-4015-9959-E2237B70B27C@rauschma.de> Message-ID: <1475518403.20070807090240@fzi.de> A> org.ontoware.rdf2go.exception.ModelRuntimeException: Connection is null Your Model is not open. model.open(); should fix it, after You got it from the ModelFactory. Kind Regards, Max -- Max V?lkel office: +49 721 9654-854 http://Xam.de mobile: +49 171 8359678 FZI Forschungszentrum Informatik http://www.FZI.de an der Universit?t Karlsruhe telephone: +49-721-9654-0 Haid-und-Neu-Str. 10-14 fax: +49-721-9654-959 D-76131 Karlsruhe Stiftung des b?rgerlichen Rechts. Az: 14-0563.1 Regierungspr?sidium Karlsruhe. Vorstand: Prof. Dr.-Ing. R?diger Dillmann, Dipl. Wi.-Ing. Michael Flor, Prof. Dr. Dr.-Ing. Jivka Ovtcharova, Prof. Dr. rer. nat. Rudi Studer. Vorsitzender des Kuratoriums: Ministerialdirigent G?nther Le?nerkraus. From voelkel at fzi.de Fri Aug 10 10:41:18 2007 From: voelkel at fzi.de (Max Voelkel) Date: Fri, 10 Aug 2007 10:41:18 +0200 Subject: [Rdf2go-devel] Multiple ModelSet users In-Reply-To: <03CA91D6-04C2-448B-8881-E16288765E6B@rauschma.de> References: <03CA91D6-04C2-448B-8881-E16288765E6B@rauschma.de> Message-ID: <1842430803.20070810104118@fzi.de> Hi Axel and all, it's the goal of RDF2Go to be a portable API for both triple and quad stores. Therefore, at the API level, one should not assume that each Model always belongs to a ModelSet. On the other hand, all 'real', big, cool stores which have database connections and stuff handle quads. So it's fine to remove open/close from Model. It is also planned to introduce commit() and have an autocommit-mode turned on by default. Currently, RDF2Go has no sessions and the decision whether to allow concurrent access is up to the implementation. Sesame doesn't. I guess it's also no so easy :-) Kind Regards, Max -- Max V?lkel office: +49 721 9654-854 http://Xam.de mobile: +49 171 8359678 FZI Forschungszentrum Informatik http://www.FZI.de an der Universit?t Karlsruhe telephone: +49-721-9654-0 Haid-und-Neu-Str. 10-14 fax: +49-721-9654-959 D-76131 Karlsruhe Stiftung des b?rgerlichen Rechts. Az: 14-0563.1 Regierungspr?sidium Karlsruhe. Vorstand: Prof. Dr.-Ing. R?diger Dillmann, Dipl. Wi.-Ing. Michael Flor, Prof. Dr. Dr.-Ing. Jivka Ovtcharova, Prof. Dr. rer. nat. Rudi Studer. Vorsitzender des Kuratoriums: Ministerialdirigent G?nther Le?nerkraus. From axel at rauschma.de Fri Aug 10 10:42:17 2007 From: axel at rauschma.de (Axel Rauschmayer) Date: Fri, 10 Aug 2007 10:42:17 +0200 Subject: [Rdf2go-devel] Multiple ModelSet users In-Reply-To: <46BC2055.8060403@dfki.de> References: <03CA91D6-04C2-448B-8881-E16288765E6B@rauschma.de> <46BC2055.8060403@dfki.de> Message-ID: > this is what you would want to do::::::::::::::::::::: (no "if") > > ms = Manager.getModelSet(); > ms.........dothethingthatclientsusuallydo > ms....do another thing that takes 20 seconds > ms.... the modelset stays open... OK. Then the guidelines become very simple: - Call open directly after the constructor. - Only call close during the final shutdown. > ok, autocommit should never be abandoned, otherwise we are dragged > into sesameistic complexity. > [...] > If sessions or synchronization are ever needed, they should be done > using Java.synchronized, Malte Kiesel suggested that out of the > simple argument: Java does this already. Agreed. Simplicity rules. >> - open(): eliminate it completely? Then no guideline is necessary >> here. >> > I would not do that, not before RDF2Go 5.0 (which I hope we do not- > so-soon and after a lot of thinking and discussion) > all our code assumes the open() method. > [...] > I have no problem leaving it in, especially because then open() & > close() build a "couple", > they correspond to each other and people know that when they call > open, they have to call close, > I think thats ok. its somehow intuitive. Yes, it's not so bad. RDF2Go 5.0 sounds interesting (a bit like Python 3000), I have a few more suggestions I can contribute to it, if you guys are interested. The main criteria is: If open() is always called directly after the constructor then there is no need for it. Furthermore, there are several levels of elemination: turning it into an empty stub and deprecating it; printing a warning; etc. > probably garbage collection will have its problems with Models, so > an explicit close() is good, > compared to the implicit finalization of java.util.Lists and > java.util.Sets (where garbage collection works) Yes that probably can't be helped. It makes sure that RDF2Go fits with many RDF APIs. Axel -- Axel Rauschmayer http://www.pst.ifi.lmu.de/~rauschma/ From leo.sauermann at dfki.de Fri Aug 10 10:53:20 2007 From: leo.sauermann at dfki.de (Leo Sauermann) Date: Fri, 10 Aug 2007 10:53:20 +0200 Subject: [Rdf2go-devel] Multiple ModelSet users In-Reply-To: <1842430803.20070810104118@fzi.de> References: <03CA91D6-04C2-448B-8881-E16288765E6B@rauschma.de> <1842430803.20070810104118@fzi.de> Message-ID: <46BC2780.7020709@dfki.de> It was Max Voelkel who said at the right time 10.08.2007 10:41 the following words: > Hi Axel and all, > > it's the goal of RDF2Go to be a portable API for both triple and quad stores. > Therefore, at the API level, one should not assume that each Model always > belongs to a ModelSet. > > On the other hand, all 'real', big, cool stores which have database > connections and stuff handle quads. > > So it's fine to remove open/close from Model. > I don't think so, there are non-quadstore implementations out there and when you generate models using ModelFactory.createModel(), you *must* close them. NO, don't remove open/close from Model - the APIs of Model and ModelSet should always be very similar. we had many problems because methods from Model where not in ModelSet and vice versa. > It is also planned to introduce commit() and have an autocommit-mode turned on > by default. > We should discuss this thouroghly before introducing it. I would really want to see clear example why it is needed, in what context, how to implement it in the adapters, and how to programm against it. this is not simple and you may have noticed how incredibly complicated sesame2 went after they had commit. You suddenly stumble upon very ugly things: A ModelSet.openConnection(), B Model.commit-> does this imply ModelSet.commit() C { Model.startTransaction(); model.add(s); assertTrue(model.contains(s)); } C is NOT solved in Sesame2 (at least in my knowledge)! at all means, avoid this hell. > Currently, RDF2Go has no sessions and the decision whether to allow concurrent > access is up to the implementation. Sesame doesn't. Sesame has sessions and allows concurrent access using a Read/Write locking strategy. all very complicated. > I guess it's also no so > easy :-) > And its a cause of ugly deadlocks and other things that waste time when coding, thats why we use RDF2Go and not sesame directly. best Leo > Kind Regards, > Max > > -- > Max V?lkel office: +49 721 9654-854 > http://Xam.de mobile: +49 171 8359678 > > FZI Forschungszentrum Informatik http://www.FZI.de > an der Universit?t Karlsruhe telephone: +49-721-9654-0 > Haid-und-Neu-Str. 10-14 fax: +49-721-9654-959 > D-76131 Karlsruhe > > Stiftung des b?rgerlichen Rechts. Az: 14-0563.1 Regierungspr?sidium Karlsruhe. > Vorstand: Prof. Dr.-Ing. R?diger Dillmann, Dipl. Wi.-Ing. Michael Flor, > Prof. Dr. Dr.-Ing. Jivka Ovtcharova, Prof. Dr. rer. nat. Rudi Studer. > Vorsitzender des Kuratoriums: Ministerialdirigent G?nther Le?nerkraus. > > > _______________________________________________ > Rdf2go-devel mailing list > Rdf2go-devel at ontoware.org > http://ontoware.org/mailman/listinfo/rdf2go-devel > > -- ____________________________________________________ DI Leo Sauermann http://www.dfki.de/~sauermann Deutsches Forschungszentrum fuer Kuenstliche Intelligenz DFKI GmbH Trippstadter Strasse 122 P.O. Box 2080 Fon: +49 631 20575-116 D-67663 Kaiserslautern Fax: +49 631 20575-102 Germany Mail: leo.sauermann at dfki.de Geschaeftsfuehrung: Prof.Dr.Dr.h.c.mult. Wolfgang Wahlster (Vorsitzender) Dr. Walter Olthoff Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes Amtsgericht Kaiserslautern, HRB 2313 ____________________________________________________ From axel at rauschma.de Fri Aug 10 11:01:05 2007 From: axel at rauschma.de (Axel Rauschmayer) Date: Fri, 10 Aug 2007 11:01:05 +0200 Subject: [Rdf2go-devel] Multiple ModelSet users In-Reply-To: <1842430803.20070810104118@fzi.de> References: <03CA91D6-04C2-448B-8881-E16288765E6B@rauschma.de> <1842430803.20070810104118@fzi.de> Message-ID: <34814787-8DC8-47C7-BF5B-644EE5C0BA56@rauschma.de> > it's the goal of RDF2Go to be a portable API for both triple and > quad stores. > Therefore, at the API level, one should not assume that each > Model always > belongs to a ModelSet. Yes, I was wondering about that. Is a triple store implemented as a ModelSet that only has one Model? If there was no top-level ModelSet then it probably wouldn't be portable, because you would have to take quad vs. triple into consideration. AR -- Axel Rauschmayer http://www.pst.ifi.lmu.de/~rauschma/ From axel at rauschma.de Fri Aug 10 11:10:43 2007 From: axel at rauschma.de (Axel Rauschmayer) Date: Fri, 10 Aug 2007 11:10:43 +0200 Subject: [Rdf2go-devel] Multiple ModelSet users In-Reply-To: <46BC2780.7020709@dfki.de> References: <03CA91D6-04C2-448B-8881-E16288765E6B@rauschma.de> <1842430803.20070810104118@fzi.de> <46BC2780.7020709@dfki.de> Message-ID: <83C4EF7C-CC4B-4ADC-B4D6-CF0D5B05672C@rauschma.de> >> It is also planned to introduce commit() and have an autocommit- >> mode turned on >> by default. > at all means, avoid this hell. One use case I had, was: Sending RDF modifications over the network. The more you can do this in blocks of triples, the better for performance. Keeping it as simple as possible makes most sense: One could have an extension of ModelSet (CommittableModelSet?). If there is a default implementation (like the one Leo mentioned) then the repository adapter can choose to either provide direct access to the repository API or to use the default implementation. Or you could even extend the default implementation to notify you of commits and their statements. I do think that having a commit() method standardized somewhere does make sense. -- Axel Rauschmayer http://www.pst.ifi.lmu.de/~rauschma/ From voelkel at fzi.de Fri Aug 10 11:43:47 2007 From: voelkel at fzi.de (Max Voelkel) Date: Fri, 10 Aug 2007 11:43:47 +0200 Subject: [Rdf2go-devel] Multiple ModelSet users In-Reply-To: <46BC2780.7020709@dfki.de> References: <03CA91D6-04C2-448B-8881-E16288765E6B@rauschma.de> <1842430803.20070810104118@fzi.de> <46BC2780.7020709@dfki.de> Message-ID: <54642844.20070810114347@fzi.de> Hi Leo, >> So it's fine to remove open/close from Model. L> I don't think so, there are non-quadstore implementations out there and L> when you generate models using L> ModelFactory.createModel(), you *must* close them. Explicit open & close is only needed for database-backed modelset or otherwise very time consuming operations for initialisation. I think its ok to assume that simple models have usally no time consuming initialisation operations. L> NO, don't remove open/close from Model - the APIs of Model and ModelSet L> should always be very similar. A good argument indeed. L> we had many problems because methods from Model where not in ModelSet L> and vice versa. Agree again. >> It is also planned to introduce commit() and have an autocommit-mode turned on >> by default. >> L> We should discuss this thouroghly before introducing it. Extending the API should cause no problems to anybody. http://java.sun.com/docs/books/jls/second_edition/html/binaryComp.doc.html L> I would really want to see clear example why it is needed, in what context, L> how to implement it in the adapters, and how to programm against it. The idea is simply that one can turn auto-commit off, and then perform a number of changes for which you don't have the gurantee that they are persisted already. If you call commit() then you have the guranteee. This allows implementations to optimize for speed. L> this is not simple and you may have noticed how incredibly complicated L> sesame2 went after they had commit. You suddenly stumble upon very ugly L> things: L> A ModelSet.openConnection(), B Model.commit->> does this imply ModelSet.commit() no L> C { Model.startTransaction(); model.add(s); assertTrue(model.contains(s)); } L> C is NOT solved in Sesame2 (at least in my knowledge)! L> at all means, avoid this hell. hmmm. Maybe this is only needed further down the API, not for the end-user. We have bulk-operations already. >> Currently, RDF2Go has no sessions and the decision whether to allow concurrent >> access is up to the implementation. Sesame doesn't. L> Sesame has sessions and allows concurrent access using a Read/Write L> locking strategy. all very complicated. I fall into a locking problem every time I do: iterator over models via getModels() while iterating: do something with the models this gives me a deadlock. L> And its a cause of ugly deadlocks and other things that waste time when L> coding, thats why we use RDF2Go and not sesame directly. hihi :-) Kind Regards, Max -- Max V?lkel office: +49 721 9654-854 http://Xam.de mobile: +49 171 8359678 FZI Forschungszentrum Informatik http://www.FZI.de an der Universit?t Karlsruhe telephone: +49-721-9654-0 Haid-und-Neu-Str. 10-14 fax: +49-721-9654-959 D-76131 Karlsruhe Stiftung des b?rgerlichen Rechts. Az: 14-0563.1 Regierungspr?sidium Karlsruhe. Vorstand: Prof. Dr.-Ing. R?diger Dillmann, Dipl. Wi.-Ing. Michael Flor, Prof. Dr. Dr.-Ing. Jivka Ovtcharova, Prof. Dr. rer. nat. Rudi Studer. Vorsitzender des Kuratoriums: Ministerialdirigent G?nther Le?nerkraus. From voelkel at fzi.de Fri Aug 10 11:45:33 2007 From: voelkel at fzi.de (Max Voelkel) Date: Fri, 10 Aug 2007 11:45:33 +0200 Subject: [Rdf2go-devel] Multiple ModelSet users In-Reply-To: <34814787-8DC8-47C7-BF5B-644EE5C0BA56@rauschma.de> References: <03CA91D6-04C2-448B-8881-E16288765E6B@rauschma.de> <1842430803.20070810104118@fzi.de> <34814787-8DC8-47C7-BF5B-644EE5C0BA56@rauschma.de> Message-ID: <1675908259.20070810114533@fzi.de> >> it's the goal of RDF2Go to be a portable API for both triple and >> quad stores. >> Therefore, at the API level, one should not assume that each >> Model always >> belongs to a ModelSet. A> Yes, I was wondering about that. Is a triple store implemented as a A> ModelSet that only has one Model? no. It simply implements the Model interface. A> If there was no top-level ModelSet A> then it probably wouldn't be portable, because you would have to take A> quad vs. triple into consideration. exactly. Kind Regards, Max -- Max V?lkel office: +49 721 9654-854 http://Xam.de mobile: +49 171 8359678 FZI Forschungszentrum Informatik http://www.FZI.de an der Universit?t Karlsruhe telephone: +49-721-9654-0 Haid-und-Neu-Str. 10-14 fax: +49-721-9654-959 D-76131 Karlsruhe Stiftung des b?rgerlichen Rechts. Az: 14-0563.1 Regierungspr?sidium Karlsruhe. Vorstand: Prof. Dr.-Ing. R?diger Dillmann, Dipl. Wi.-Ing. Michael Flor, Prof. Dr. Dr.-Ing. Jivka Ovtcharova, Prof. Dr. rer. nat. Rudi Studer. Vorsitzender des Kuratoriums: Ministerialdirigent G?nther Le?nerkraus. From leo.sauermann at dfki.de Fri Aug 10 13:40:16 2007 From: leo.sauermann at dfki.de (Leo Sauermann) Date: Fri, 10 Aug 2007 13:40:16 +0200 Subject: [Rdf2go-devel] Multiple ModelSet users In-Reply-To: <54642844.20070810114347@fzi.de> References: <03CA91D6-04C2-448B-8881-E16288765E6B@rauschma.de> <1842430803.20070810104118@fzi.de> <46BC2780.7020709@dfki.de> <54642844.20070810114347@fzi.de> Message-ID: <46BC4EA0.9020903@dfki.de> It was Max Voelkel who said at the right time 10.08.2007 11:43 the following words: > Hi Leo, > > >>> So it's fine to remove open/close from Model. >>> > L> I don't think so, there are non-quadstore implementations out there and > L> when you generate models using > L> ModelFactory.createModel(), you *must* close them. > > Explicit open & close is only needed for database-backed modelset or otherwise > very time consuming operations for initialisation. I think its ok to assume that > simple models have usally no time consuming initialisation operations. > > Actually, we had to change all JUnit tests and all impleemtnations of the Abstract classes to always open()/close() models. At the moment, when you use RDF2Go, every model HAS to be open/closed. as some frameworks require it (even for in-mem models!), it is mandatory for all of them. otherwise, if you don't enforce this, the code will break when moving to another RDF framework. code written against the rdf2go apis should be independent of the underlying framework, whether its database-backed or not. best Leo -- ____________________________________________________ DI Leo Sauermann http://www.dfki.de/~sauermann Deutsches Forschungszentrum fuer Kuenstliche Intelligenz DFKI GmbH Trippstadter Strasse 122 P.O. Box 2080 Fon: +49 631 20575-116 D-67663 Kaiserslautern Fax: +49 631 20575-102 Germany Mail: leo.sauermann at dfki.de Geschaeftsfuehrung: Prof.Dr.Dr.h.c.mult. Wolfgang Wahlster (Vorsitzender) Dr. Walter Olthoff Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes Amtsgericht Kaiserslautern, HRB 2313 ____________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://ontoware.org/pipermail/rdf2go-devel/attachments/20070810/ffd50897/attachment.html From Axel.Rauschmayer at ifi.lmu.de Fri Aug 10 15:20:08 2007 From: Axel.Rauschmayer at ifi.lmu.de (Axel Rauschmayer) Date: Fri, 10 Aug 2007 15:20:08 +0200 Subject: [Rdf2go-devel] RDF2Go 5.0 Message-ID: <46BC6608.3000000@ifi.lmu.de> I have lengthy collection of RDF2Go suggestions. I don't want to overwhelm this mailing list with them (the degree of pettiness varies... ;-), so is there a wiki page that I can post it to? Thanks, Axel -- Axel.Rauschmayer at ifi.lmu.de http://www.pst.ifi.lmu.de/~rauschma/ From antoni.mylka at dfki.uni-kl.de Fri Aug 10 20:15:05 2007 From: antoni.mylka at dfki.uni-kl.de (Antoni Mylka) Date: Fri, 10 Aug 2007 20:15:05 +0200 Subject: [Rdf2go-devel] Problems with RDFReactor. Message-ID: <46BCAB29.1020405@dfki.uni-kl.de> I couldn't find a mailing list for RDFReactor so I post this here I have been asked to prepare OSGI bundles of RDFReactor for Nepomuk. The results are available at: I have spotted some major problems with this. 1. Is it really necessary to include a dependency on Jena (10 MB of jars) only to have a simple utility class to convert between xsd:dateTime and java.util.Calendar. It is really not that difficult to chop that string and extract the data with simple .substring(...) methods. 2. The code generation facility is a makes errors when generating java identifiers. It should check if a property happens to have the same name as a java identifier (e.g. ncal:class). It also reserves certain names for some internal purposes (e.g. Thing.getDescription() makes it impossible to have a nie:description property and likewise, rdfs:range defined for the rdfschema class makes it impossible to have an ncal:range property). a. rdf properties with names like java identifiers b. rdf properties with the same names as properties of an upper class defined in another namespace (ncal:range, nie:description). Antoni Mylka antoni.mylka at dfki.de From axel at rauschma.de Fri Aug 10 20:42:30 2007 From: axel at rauschma.de (Axel Rauschmayer) Date: Fri, 10 Aug 2007 20:42:30 +0200 Subject: [Rdf2go-devel] Multiple ModelSet users References: <63B4DDCA-422F-4B7B-8C1B-E3521DE61E83@rauschma.de> Message-ID: <6BA23BA6-F050-4DE9-B1B5-9928C8B2B804@rauschma.de> Max Voelkel wrote: > Axel Rauschmayer wrote: > A> Isn't this contradictory? If the top-level class is a ModelSet > for a > A> quad store and a Model for a triple store that handling for RDF2Go > A> clients is different, right? Thus, the API is not really portable. > > Its protable from one store to another, not from quads to triples > or vice versa. OK, that makes sense. There probably is no use case where this kind of additional portability is needed. -- Axel Rauschmayer http://www.pst.ifi.lmu.de/~rauschma/ From antoni.mylka at dfki.uni-kl.de Fri Aug 10 23:49:32 2007 From: antoni.mylka at dfki.uni-kl.de (Antoni Mylka) Date: Fri, 10 Aug 2007 23:49:32 +0200 Subject: [Rdf2go-devel] RDFReactor and multiple inheritance Message-ID: <46BCDD6C.8020900@dfki.uni-kl.de> I've been trying to play with RDFReactor and I don't understand certain things. 1. How do you solve the problem of multiple inheritance. I've tried to generate an object model for NCAL [1]. Multiple inheritance is used extensively there. E.g. an ncal:Event class has a total of 15 superclasses. It inherits properties from almost all of them. The Event class generated by RDFReactor seems to have chosen an arbitrary single superclass and lots of properties are missing. I can't add an Attachment, Attendees etc. 2. How do you solve the problem of dependencies between ontologies. You have provided an object model for OWL and RDFS and all generated classes depend on them. I would like to generate an object model for a top-level ontology (such as NIE) and have and then an object model for a lower-level ontology (such as NCAL), and have the NCAL classes inherit properties from NIE classes. (such as nie:description, nie:title etc.) Antoni Mylka antoni.mylka at dfki.de [1] From voelkel at fzi.de Sun Aug 12 19:32:02 2007 From: voelkel at fzi.de (Max Voelkel) Date: Sun, 12 Aug 2007 19:32:02 +0200 Subject: [Rdf2go-devel] Sesame: ModelRuntimeException: Connection is null In-Reply-To: <46B9FDF3.7050605@dfki.de> References: <976E18F7-3FAA-4015-9959-E2237B70B27C@rauschma.de> <46B9FDF3.7050605@dfki.de> Message-ID: <1423605785.20070812193202@fzi.de> L> I fixed this by overriding the removeStatements method in the L> sesame-rdf2go driver, but the problem is rooted in the Abstract L> implementations, that do not care about opening/closing models and also L> handle context in the modelset a little weird. I have a student looking at this right now, but got no feedback on it yet. L> (AbstractModelSet has a find(c,s,p,o) methods, AbstractModelSet should L> never call getModel(c).find(s,p,o) during remove/exists calls) I think this comes still from the times when the default model had no agreed-upon uri - a while ago we agreed on "null". So now You are right. I fixed it. COmmit comes soon - I'm in a train. Kind Regards, Max -- Max V?lkel office: +49 721 9654-854 http://Xam.de mobile: +49 171 8359678 FZI Forschungszentrum Informatik http://www.FZI.de an der Universit?t Karlsruhe telephone: +49-721-9654-0 Haid-und-Neu-Str. 10-14 fax: +49-721-9654-959 D-76131 Karlsruhe Stiftung des b?rgerlichen Rechts. Az: 14-0563.1 Regierungspr?sidium Karlsruhe. Vorstand: Prof. Dr.-Ing. R?diger Dillmann, Dipl. Wi.-Ing. Michael Flor, Prof. Dr. Dr.-Ing. Jivka Ovtcharova, Prof. Dr. rer. nat. Rudi Studer. Vorsitzender des Kuratoriums: Ministerialdirigent G?nther Le?nerkraus. From voelkel at fzi.de Sun Aug 12 19:55:48 2007 From: voelkel at fzi.de (Max Voelkel) Date: Sun, 12 Aug 2007 19:55:48 +0200 Subject: [Rdf2go-devel] Problems with RDFReactor. In-Reply-To: <46BCAB29.1020405@dfki.uni-kl.de> References: <46BCAB29.1020405@dfki.uni-kl.de> Message-ID: <894312362.20070812195548@fzi.de> Hi Antoni, thanks for giving feedback. A> I couldn't find a mailing list for RDFReactor so I post this here Fine, interest in RDFReactor seems to increase, maybe we need a dedicated list soon. A> I have been asked to prepare OSGI bundles of RDFReactor for Nepomuk. Maybe you can explain what is need for an OSGi bundle, so that I can include the OSGI-generation process in the Maven build process. A> The A> results are available at: A> A> A> I have spotted some major problems with this. A> 1. Is it really necessary to include a dependency on Jena (10 MB of A> jars) only to have a simple utility class to convert between A> xsd:dateTime and java.util.Calendar. It is really not that difficult to A> chop that string and extract the data with simple .substring(...) methods. If someone can provide the correct function, I am happy to use it. I looked into Jenas code and found it quite confusiung, because there are really many ways how the dates and times are allowed to be written. A> 2. The code generation facility is a makes errors when generating java A> identifiers. It should check if a property happens to have the same name A> as a java identifier (e.g. ncal:class). It also reserves certain names A> for some internal purposes (e.g. Thing.getDescription() makes it A> impossible to have a nie:description property and likewise, rdfs:range A> defined for the rdfschema class makes it impossible to have an A> ncal:range property). A> a. rdf properties with names like java identifiers A> b. rdf properties with the same names as properties of an upper class A> defined in another namespace (ncal:range, nie:description). Yes, sure its possible to generate eronous code in RDFReactor. One could in theory inspect a desired superclass and transitively gather all existing methodnames by inspection. I haven't done that yet. Usually I do one of the following: - add a meaningfull rdf:label to the property in questions, as the label is used in preference to other things (eg the URI) in order to come up with a java name. - or i simply use a "prefix" in the CodeGenerator.generator(..) method, which is then added to all generated method names, i.e. "ncal", then you get methodnames such as "getNcalRange". In a way this is using the namespace-prefix solution used in n3 and rdf/xml also for java. Kind Regards, Max -- Max V?lkel office: +49 721 9654-854 http://Xam.de mobile: +49 171 8359678 FZI Forschungszentrum Informatik http://www.FZI.de an der Universit?t Karlsruhe telephone: +49-721-9654-0 Haid-und-Neu-Str. 10-14 fax: +49-721-9654-959 D-76131 Karlsruhe Stiftung des b?rgerlichen Rechts. Az: 14-0563.1 Regierungspr?sidium Karlsruhe. Vorstand: Prof. Dr.-Ing. R?diger Dillmann, Dipl. Wi.-Ing. Michael Flor, Prof. Dr. Dr.-Ing. Jivka Ovtcharova, Prof. Dr. rer. nat. Rudi Studer. Vorsitzender des Kuratoriums: Ministerialdirigent G?nther Le?nerkraus. From voelkel at fzi.de Sun Aug 12 20:00:28 2007 From: voelkel at fzi.de (Max Voelkel) Date: Sun, 12 Aug 2007 20:00:28 +0200 Subject: [Rdf2go-devel] RDFReactor and multiple inheritance In-Reply-To: <46BCDD6C.8020900@dfki.uni-kl.de> References: <46BCDD6C.8020900@dfki.uni-kl.de> Message-ID: <741752510.20070812200028@fzi.de> Hi Antoni, A> 1. How do you solve the problem of multiple inheritance. I've tried to A> generate an object model for NCAL [1]. Multiple inheritance is used A> extensively there. E.g. an ncal:Event class has a total of 15 A> superclasses. It inherits properties from almost all of them. The Event A> class generated by RDFReactor seems to have chosen an arbitrary single A> superclass and lots of properties are missing. I can't add an A> Attachment, Attendees etc. Hmm, it should choose (more or less randomly, using some heuristics) use one class as the superclass and add all properties not present in the superclass to the current class. This is redundant, but should work. This does not work, when the superclasses are not used in the generation process (e.g. when they are in RDF:, RDFS:, or OWL:). Maybe you can send me code + ontology for the problem you describe? A> 2. How do you solve the problem of dependencies between ontologies. Not at all. What I find in the schema to process is processes, everything else is considered to be unknown. A> You have provided an object model for OWL and RDFS and all generated classes A> depend on them. Yes, this is the only exception: those are built-in. A> I would like to generate an object model for a top-level A> ontology (such as NIE) and have and then an object model for a lower-level A> ontology (such as NCAL), and have the NCAL classes inherit properties from A> NIE classes. (such as nie:description, nie:title etc.) ok, interesting use case. But what would be your underlying semantic language? RDFS? NRL? If RDFS, you should merge NIE and NCAL before running RDFReactor on it. If you want NRL to be the representation language, then I guess one has to extends RDFReactor. Kind Regards, Max -- Max V?lkel office: +49 721 9654-854 http://Xam.de mobile: +49 171 8359678 FZI Forschungszentrum Informatik http://www.FZI.de an der Universit?t Karlsruhe telephone: +49-721-9654-0 Haid-und-Neu-Str. 10-14 fax: +49-721-9654-959 D-76131 Karlsruhe Stiftung des b?rgerlichen Rechts. Az: 14-0563.1 Regierungspr?sidium Karlsruhe. Vorstand: Prof. Dr.-Ing. R?diger Dillmann, Dipl. Wi.-Ing. Michael Flor, Prof. Dr. Dr.-Ing. Jivka Ovtcharova, Prof. Dr. rer. nat. Rudi Studer. Vorsitzender des Kuratoriums: Ministerialdirigent G?nther Le?nerkraus. From leo.sauermann at dfki.de Mon Aug 13 14:44:37 2007 From: leo.sauermann at dfki.de (Leo Sauermann) Date: Mon, 13 Aug 2007 14:44:37 +0200 Subject: [Rdf2go-devel] reactor has a dependency on Jena Message-ID: <46C05235.907@dfki.de> I don't believe that this is true, but it seems that RDF reactor includes the Jena jars to call one method: convert an XML datetime to string and back (which is also part of RDFTool, part of the core RDF2Go bundle) is Jena a dependency of rdf-reactor? if the answer is yes, please, anyone, remove it now. best Leo -- ____________________________________________________ DI Leo Sauermann http://www.dfki.de/~sauermann Deutsches Forschungszentrum fuer Kuenstliche Intelligenz DFKI GmbH Trippstadter Strasse 122 P.O. Box 2080 Fon: +49 631 20575-116 D-67663 Kaiserslautern Fax: +49 631 20575-102 Germany Mail: leo.sauermann at dfki.de Geschaeftsfuehrung: Prof.Dr.Dr.h.c.mult. Wolfgang Wahlster (Vorsitzender) Dr. Walter Olthoff Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes Amtsgericht Kaiserslautern, HRB 2313 ____________________________________________________ From arjohn.kampman at aduna-software.com Mon Aug 13 15:01:26 2007 From: arjohn.kampman at aduna-software.com (Arjohn Kampman) Date: Mon, 13 Aug 2007 15:01:26 +0200 Subject: [Rdf2go-devel] rdf2go/sesame + open/close In-Reply-To: <724900392.20070730170507@fzi.de> References: <46AA18D1.7090300@dfki.de> <46ADADA8.3040501@dfki.uni-kl.de> <46ADE3B4.10302@dfki.de> <724900392.20070730170507@fzi.de> Message-ID: <46C05626.6080801@aduna-software.com> Max Voelkel wrote: > L> more ideas? > > L> a wikipage where we could IBAW? > > L> best > L> Leo > > if we have to discuss and want to reach agreements, lets discuss in the RDF2Go > OntoWorld talk page [1]. > We can use the IBAW-methodology [2] as leo suggested, to see the different > arguments and alternatives clearer. > > I reformatted leos mail accordingly at [3]. > The analysis shows quite clearly hat Sesame 2 connection handling is an issue. > The open/close thing came in to hanlde Sesames open/close, Jena does not have > this notion. > > We should learn more about how it works and why it works the way it works. > > @Aduna: Why is there open/close and how should it be used? To get things straight: Sesame's Repository and Sail interfaces have initialize() and shutDown() methods. These two interfaces both represent (a proxy for) an RDF store. Store-initialization has been seperated from object instantiation to allow parameter values to be set prior to initialization. The shutDown() method is included in these interfaces to allow stores to shut down properly, which can mean things like syncing changes to disk. The connection-interfaces (RepositoryConnection and SailConnection) represent a connection to the RDF store and can be used to perform actual operations. These operations are not part of the main Repository and Sail interfaces to be able to do proper transaction isolation. These interfaces have been modelled after jdbc's Connection interface. They do not have an open() method, only close(). This method is included for the same reasons it is included in jdbc, see: http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Connection.html#close() Hope this clears things up, -- Arjohn Kampman, Senior Software Engineer Aduna - Guided Exploration www.aduna-software.com From voelkel at fzi.de Mon Aug 13 15:40:22 2007 From: voelkel at fzi.de (Max Voelkel) Date: Mon, 13 Aug 2007 15:40:22 +0200 Subject: [Rdf2go-devel] where to discuss RDFReactor? Message-ID: <1732822552.20070813154022@fzi.de> Hi, do you, dear reader, prefer to discuss RDFReactor also on this list or would you prefer to have it on its own list (rdfreactor-devel at ontoware.org)? I think, using a second list would make it easier to search the archives and have more control over who gets what. You are the community, You decide. ---- send this to me, not to the list ---- [ ] use this list [ ] use another list ------------------------------------------ Kind Regards, Max -- Max V?lkel office: +49 721 9654-854 http://Xam.de mobile: +49 171 8359678 FZI Forschungszentrum Informatik http://www.FZI.de an der Universit?t Karlsruhe telephone: +49-721-9654-0 Haid-und-Neu-Str. 10-14 fax: +49-721-9654-959 D-76131 Karlsruhe Stiftung des b?rgerlichen Rechts. Az: 14-0563.1 Regierungspr?sidium Karlsruhe. Vorstand: Prof. Dr.-Ing. R?diger Dillmann, Dipl. Wi.-Ing. Michael Flor, Prof. Dr. Dr.-Ing. Jivka Ovtcharova, Prof. Dr. rer. nat. Rudi Studer. Vorsitzender des Kuratoriums: Ministerialdirigent G?nther Le?nerkraus. From leo.sauermann at dfki.de Mon Aug 13 15:58:25 2007 From: leo.sauermann at dfki.de (Leo Sauermann) Date: Mon, 13 Aug 2007 15:58:25 +0200 Subject: [Rdf2go-devel] reactor has a dependency on Jena (invalid question) In-Reply-To: <46C05235.907@dfki.de> References: <46C05235.907@dfki.de> Message-ID: <46C06381.30707@dfki.de> whoops, that was discussed already. sorry, Leo It was Leo Sauermann who said at the right time 13.08.2007 14:44 the following words: > I don't believe that this is true, but it seems that RDF reactor > includes the Jena jars to call one method: convert an XML datetime to > string and back (which is also part of RDFTool, part of the core RDF2Go > bundle) > > is Jena a dependency of rdf-reactor? > > if the answer is yes, please, anyone, remove it now. > > best > Leo > > -- ____________________________________________________ DI Leo Sauermann http://www.dfki.de/~sauermann Deutsches Forschungszentrum fuer Kuenstliche Intelligenz DFKI GmbH Trippstadter Strasse 122 P.O. Box 2080 Fon: +49 631 20575-116 D-67663 Kaiserslautern Fax: +49 631 20575-102 Germany Mail: leo.sauermann at dfki.de Geschaeftsfuehrung: Prof.Dr.Dr.h.c.mult. Wolfgang Wahlster (Vorsitzender) Dr. Walter Olthoff Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes Amtsgericht Kaiserslautern, HRB 2313 ____________________________________________________ From leo.sauermann at dfki.de Mon Aug 20 17:46:04 2007 From: leo.sauermann at dfki.de (Leo Sauermann) Date: Mon, 20 Aug 2007 17:46:04 +0200 Subject: [Rdf2go-devel] rdf2go/sesame + open/close - please decide NOW In-Reply-To: References: <6867EA5B-DC72-4AC6-AB7D-9BA4E99625EB@rauschma.de> Message-ID: <46C9B73C.7000803@dfki.de> Ok, re-introducing this issue a week ago didnt bring consensus to the list, so I put it differently: Do you all agree on this best practice: http://ontoworld.org/wiki/Talk:RDF2Go#o.2Fc:_Models_Left_Open * code that creates a modelset|model has to open|close it * open modelsets return opened models, all models created this way will be closed on modelset.close, but can (and should) be closed before calling model.close() I think this is the easiest and best solution, compared to : http://ontoworld.org/wiki/Talk:RDF2Go#o.2Fc:_create_independent_ModelSet_instances http://ontoworld.org/wiki/Talk:RDF2Go#o.2Fc:_reference_counting As this will involve code changes for future versions - give feedback now or never. Please give feedback until next monday. best Leo It was Axel Rauschmayer who said at the right time 09.08.2007 19:53 the following words: >> 1) don't forget to discuss my first question >> namely, what is best practice for close/open - do we have an >> agreement? >> > > Concerning open() (close() is another issue): The cleanest solution > might be to eliminate it completely (just like in java.io's Streams > and Readers which also need to be closed). Is there any reason for > this two-step opening process? > > >> BUT when you handle individual models, the wrapping wrong. >> For example: >> Model m = RDF2Go.getModelFactory().createModel(); >> m.open(); >> m.read(....my foaf file....); >> > > Yes, stand-alone models make a lot of sense. The nice thing about > them (following the Model-wraps-ModelSet idea) is that they can be > completely implemented by RDF2Go and don't add complications to the > adapter layers for Sesame, Jena, etc. > > >> Axel, I think there is an argumentation error in this line: >> >>> I have use cases where I need Models to encapsulate *sets* of >>> contexts (and not just a single context). This change makes it >>> possible, because one would never list the models of a ModelSet, >>> just its context URIs and then instantiate a ModelSet with 1 or >>> more context URIs (varargs...). The Sesame quad API does this very >>> well: Contexts are always a vararg; zero context URIs mean "look >>> everywhere", 1 or more context URIs mean "look at all these >>> contexts". >>> >> I would think you mean Model instead of ModelSet >> ".... its context URIs and then instantiate a Model with 1 or more >> context URIs (varargs...) ..." >> > > Correct, that was a typo. > > -- > Axel Rauschmayer > http://www.pst.ifi.lmu.de/~rauschma/ > > > > > _______________________________________________ > Rdf2go-devel mailing list > Rdf2go-devel at ontoware.org > http://ontoware.org/mailman/listinfo/rdf2go-devel > -- ____________________________________________________ DI Leo Sauermann http://www.dfki.de/~sauermann Deutsches Forschungszentrum fuer Kuenstliche Intelligenz DFKI GmbH Trippstadter Strasse 122 P.O. Box 2080 Fon: +49 631 20575-116 D-67663 Kaiserslautern Fax: +49 631 20575-102 Germany Mail: leo.sauermann at dfki.de Geschaeftsfuehrung: Prof.Dr.Dr.h.c.mult. Wolfgang Wahlster (Vorsitzender) Dr. Walter Olthoff Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes Amtsgericht Kaiserslautern, HRB 2313 ____________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://ontoware.org/pipermail/rdf2go-devel/attachments/20070820/54c2f35e/attachment-0001.html From axel at rauschma.de Mon Aug 20 19:58:52 2007 From: axel at rauschma.de (Axel Rauschmayer) Date: Mon, 20 Aug 2007 19:58:52 +0200 Subject: [Rdf2go-devel] rdf2go/sesame + open/close - please decide NOW In-Reply-To: <46C9B73C.7000803@dfki.de> References: <6867EA5B-DC72-4AC6-AB7D-9BA4E99625EB@rauschma.de> <46C9B73C.7000803@dfki.de> Message-ID: <96635800-6328-4918-99A5-B50FCF98C0AD@rauschma.de> > * code that creates a modelset|model has to open|close it > * open modelsets return opened models, all models created this way > will be closed on modelset.close, but can (and should) be closed > before calling model.close() This sounds reasonable. I'm not sure I understand the last sentence: "all models [...] should be closed before calling model.close()". Assuming you mean "ModelSet.close()", I agree with the "can" part, but not with the "should" part. The main reason is that one should be able to use ModelSet as a quad API without ever having to worry about Models. Greetings, Axel -- Axel Rauschmayer http://www.pst.ifi.lmu.de/~rauschma/ From leo.sauermann at dfki.de Tue Aug 21 10:00:21 2007 From: leo.sauermann at dfki.de (Leo Sauermann) Date: Tue, 21 Aug 2007 10:00:21 +0200 Subject: [Rdf2go-devel] rdf2go/sesame + open/close - please decide NOW In-Reply-To: <96635800-6328-4918-99A5-B50FCF98C0AD@rauschma.de> References: <6867EA5B-DC72-4AC6-AB7D-9BA4E99625EB@rauschma.de> <46C9B73C.7000803@dfki.de> <96635800-6328-4918-99A5-B50FCF98C0AD@rauschma.de> Message-ID: <46CA9B95.3050205@dfki.de> It was Axel Rauschmayer who said at the right time 20.08.2007 19:58 the following words: >> * code that creates a modelset|model has to open|close it >> * open modelsets return opened models, all models created this way >> will be closed on modelset.close, but can (and should) be closed >> before calling model.close() > > This sounds reasonable. I'm not sure I understand the last sentence: > "all models [...] should be closed before calling model.close()". > Assuming you mean "ModelSet.close()", typo, yes. > I agree with the "can" part, but not with the "should" part. The main > reason is that one should be able to use ModelSet as a quad API > without ever having to worry about Models. agreed, it is "can". I just wanted to say this: ModelSet ms = ... ms.open(); Model m = ms.getModel("urn:blah"); m.findStatements() .... // should in future work without doing m.open before m.close(); // you "can" do this, but if you want to optimize memory usage, you "should" do this .... // do more stuff, possibly for hours // shutdown ms.close(); // now all opened models returned by this modelset will automatically be closed everyone agrees on this? best Leo > > Greetings, > > Axel > > -- > Axel Rauschmayer > http://www.pst.ifi.lmu.de/~rauschma/ > > > -- ____________________________________________________ DI Leo Sauermann http://www.dfki.de/~sauermann Deutsches Forschungszentrum fuer Kuenstliche Intelligenz DFKI GmbH Trippstadter Strasse 122 P.O. Box 2080 Fon: +49 631 20575-116 D-67663 Kaiserslautern Fax: +49 631 20575-102 Germany Mail: leo.sauermann at dfki.de Geschaeftsfuehrung: Prof.Dr.Dr.h.c.mult. Wolfgang Wahlster (Vorsitzender) Dr. Walter Olthoff Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes Amtsgericht Kaiserslautern, HRB 2313 ____________________________________________________ From voelkel at fzi.de Tue Aug 21 11:45:23 2007 From: voelkel at fzi.de (Max Voelkel) Date: Tue, 21 Aug 2007 11:45:23 +0200 Subject: [Rdf2go-devel] rdf2go/sesame + open/close - please decide NOW In-Reply-To: <46CA9B95.3050205@dfki.de> References: <6867EA5B-DC72-4AC6-AB7D-9BA4E99625EB@rauschma.de> <46C9B73C.7000803@dfki.de> <96635800-6328-4918-99A5-B50FCF98C0AD@rauschma.de> <46CA9B95.3050205@dfki.de> Message-ID: <2493022.20070821114523@fzi.de> L> It was Axel Rauschmayer [is already a list member] L> I just wanted to say this: L> ModelSet ms = ... L> ms.open(); L> Model m = ms.getModel("urn:blah"); L> m.findStatements() .... // should in future work without doing m.open before L> m.close(); // you "can" do this, but if you want to optimize memory L> usage, you "should" do this L> .... // do more stuff, possibly for hours L> // shutdown L> ms.close(); // now all opened models returned by this modelset will L> automatically be closed L> everyone agrees on this? Yes. This makes sense. Kind Regards, Max -- Max V?lkel office: +49 721 9654-854 http://Xam.de mobile: +49 171 8359678 FZI Forschungszentrum Informatik http://www.FZI.de an der Universit?t Karlsruhe telephone: +49-721-9654-0 Haid-und-Neu-Str. 10-14 fax: +49-721-9654-959 D-76131 Karlsruhe Stiftung des b?rgerlichen Rechts. Az: 14-0563.1 Regierungspr?sidium Karlsruhe. Vorstand: Prof. Dr.-Ing. R?diger Dillmann, Dipl. Wi.-Ing. Michael Flor, Prof. Dr. Dr.-Ing. Jivka Ovtcharova, Prof. Dr. rer. nat. Rudi Studer. Vorsitzender des Kuratoriums: Ministerialdirigent G?nther Le?nerkraus. From leo.sauermann at dfki.de Wed Aug 22 09:51:45 2007 From: leo.sauermann at dfki.de (Leo Sauermann) Date: Wed, 22 Aug 2007 09:51:45 +0200 Subject: [Rdf2go-devel] rdf2go/sesame + open/close - please decide NOW In-Reply-To: <2493022.20070821114523@fzi.de> References: <6867EA5B-DC72-4AC6-AB7D-9BA4E99625EB@rauschma.de> <46C9B73C.7000803@dfki.de> <96635800-6328-4918-99A5-B50FCF98C0AD@rauschma.de> <46CA9B95.3050205@dfki.de> <2493022.20070821114523@fzi.de> Message-ID: <46CBEB11.2020901@dfki.de> It was Max Voelkel who said at the right time 21.08.2007 11:45 the following words: > L> It was Axel Rauschmayer > [is already a list member] > > L> I just wanted to say this: > > L> ModelSet ms = ... > L> ms.open(); > L> Model m = ms.getModel("urn:blah"); > L> m.findStatements() .... // should in future work without doing m.open before > L> m.close(); // you "can" do this, but if you want to optimize memory > L> usage, you "should" do this > L> .... // do more stuff, possibly for hours > L> // shutdown > L> ms.close(); // now all opened models returned by this modelset will > L> automatically be closed > > L> everyone agrees on this? > > Yes. This makes sense. > ok, so we should somehow document this.... where is the page where the "best practices" are gathered? (or some tutorial) I prefer wikis :-) We should then also change the implementations of ModelSet to return only opened models and close all models on their close() call. I could do that for the OpenRDF adapter. best Leo > Kind Regards, > Max > > -- > Max V?lkel office: +49 721 9654-854 > http://Xam.de mobile: +49 171 8359678 > > FZI Forschungszentrum Informatik http://www.FZI.de > an der Universit?t Karlsruhe telephone: +49-721-9654-0 > Haid-und-Neu-Str. 10-14 fax: +49-721-9654-959 > D-76131 Karlsruhe > > Stiftung des b?rgerlichen Rechts. Az: 14-0563.1 Regierungspr?sidium Karlsruhe. > Vorstand: Prof. Dr.-Ing. R?diger Dillmann, Dipl. Wi.-Ing. Michael Flor, > Prof. Dr. Dr.-Ing. Jivka Ovtcharova, Prof. Dr. rer. nat. Rudi Studer. > Vorsitzender des Kuratoriums: Ministerialdirigent G?nther Le?nerkraus. > > > > > _______________________________________________ > Rdf2go-devel mailing list > Rdf2go-devel at ontoware.org > http://ontoware.org/mailman/listinfo/rdf2go-devel > > -- ____________________________________________________ DI Leo Sauermann http://www.dfki.de/~sauermann Deutsches Forschungszentrum fuer Kuenstliche Intelligenz DFKI GmbH Trippstadter Strasse 122 P.O. Box 2080 Fon: +49 631 20575-116 D-67663 Kaiserslautern Fax: +49 631 20575-102 Germany Mail: leo.sauermann at dfki.de Geschaeftsfuehrung: Prof.Dr.Dr.h.c.mult. Wolfgang Wahlster (Vorsitzender) Dr. Walter Olthoff Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes Amtsgericht Kaiserslautern, HRB 2313 ____________________________________________________