Re: [Owlim-discussion] Write operation and Serialization of results
Hi Laurent, couldn't reproduce your first exception - is it possible to isolate it to a small example code so to be able to fix it .. about your second issue related to serialization - I've fixed it and a distribution is available at http://www.ontotext.come/owlim the new version is SwiftOWLIM v3.0.11: http://www.ontotext.com/owlim/swiftowlim-3.0.beta11-sesame-2.0.zip apart from the above fix it also improves the directType, directSubClassOf and directSubPropertyOf handling so that these consider also the equivalent classes and subClass(Property)Of reflexivity correctly regards, Damyan - Original Message - From: Laurent PELLEGRINO laurent.pellegr...@sophia.inria.fr To: owlim-discussion@ontotext.com Sent: Monday, September 14, 2009 12:38 PM Subject: [Owlim-discussion] Write operation and Serialization of results Dear all, I have a problem with write operation on an OWLIM repository. I can perform a query operation but when I try to perform a write operation I get the following exception : [ERROR exceptions.one_way] java.lang.RuntimeException: Connection is closed java.lang.RuntimeException: Connection is closed at com.ontotext.trree.SailConnectionImpl.addStatement(Unknown Source) at org.openrdf.repository.sail.SailRepositoryConnection.addWithoutCommit (SailRepositoryConnection.java:228) at org.openrdf.repository.base.RepositoryConnectionBase.addWithoutCommit (RepositoryConnectionBase.java:549) at org.openrdf.repository.base.RepositoryConnectionBase.add (RepositoryConnectionBase.java:449) at eu.soa4all.dsb.space.proactive.datastorage.rdf.owlim.OWLIMStorage.write (OWLIMStorage.java:88) My write method is the following : public void write(Statement stmt) { RepositoryConnection conn = null; try { conn = this.repository.getConnection(); System.out.println(isOpen= + conn.isOpen()); conn.add(stmt, new URIImpl(spaceURI.toString())); } catch (RepositoryException e) { e.printStackTrace(); } finally { try { conn.close(); } catch (RepositoryException e) { e.printStackTrace(); } } } The sysout return isOpen=true. Does someone has an idea of the problem ? My second problem is about Serialization. I am retrieving Statements from an OWLIM repository. I put each Statement in a Set and i transmit this Set to another JVM on an another machine. Objects need to be Serializable and it seems that Statement are not Serializable. I am cheating by using this kind of method : for (Statement stmt : mySet) { newSet.add(new StatementImpl(new URIImpl(stmt.getSubject ().stringValue()), new URIImpl( stmt.getPredicate().stringValue()), new BNodeImpl (stmt.getObject() .stringValue(; } The problem is that I am not sure that new BNodeImpl(stmt.getObject ().stringValue())) will be the same that stmt.getObject. Is it right ? I will have the same problem with TupleQueryResult. How to Serialize these two kinds of results ? Thanks. Kind Regards Laurent PELLEGRINO ___ OWLIM-discussion mailing list OWLIM-discussion@ontotext.com http://ontotext.com/mailman/listinfo/owlim-discussion ___ OWLIM-discussion mailing list OWLIM-discussion@ontotext.com http://ontotext.com/mailman/listinfo/owlim-discussion
Re: [Owlim-discussion] Problem getting the direct type of an instance
Hi Stefan, it is very strange to observe such behavior - in swiftowlim we do not use external engine to evaluate queries and all triple pattern requests are handled through getStatements() so there is no reason to get different results from query evaluation and by simply invoking getStataments() - these are routed to one and the same piece of code - Could you check your code related to enumeration of query results - there is a possibility to somehow silently fetch and ignore the first result ... regards, Damyan - Original Message - From: Stefan Nesbigall stefan.nesbig...@dfki.de To: owlim-discussion@ontotext.com Sent: Tuesday, September 08, 2009 1:21 PM Subject: [Owlim-discussion] Problem getting the direct type of an instance Hi every one I have little problem since owlim does not find the direct type of instances. Somewhere in my ontology I have the following instance defined: messemodul:button rdf:about=#RedButton/ My OWLIM system does is able to load the ontology into the triple store. By this RepositoryResultStatement iter = repositoryConn.getStatements(http://134.96.184.229/isreal/messemodul_abox.owl#RedButton;, null, null, true); I get several triple including (http://134.96.184.229/isreal/messemodul_abox.owl#RedButton, http://www.w3.org/1999/02/22-rdf-syntax-ns#type, http://134.96.184.229/isreal/messemodul.owl#button) (http://134.96.184.229/isreal/messemodul_abox.owl#RedButton, http://www.w3.org/1999/02/22-rdf-syntax-ns#type, http://www.w3.org/2002/07/owl#Thing) But when I use this sparql query: SELECT ?pred ?obj WHERE { http://134.96.184.229/isreal/messemodul_abox.owl#RedButton?pred ?obj . } I do not get the first triple saying that RedButton is a button. I just get all the other triples. Using a ask query: ASK { http://134.96.184.229/isreal/messemodul_abox.owl#RedButton http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://134.96.184.229/isreal/messemodul.owl#button . } I get true. Can anyone help? Best regards Stefan ---required by german law Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH Trippstadter Strasse 122, D-67663 Kaiserslautern, Germany 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 - ___ OWLIM-discussion mailing list OWLIM-discussion@ontotext.com http://ontotext.com/mailman/listinfo/owlim-discussion ___ OWLIM-discussion mailing list OWLIM-discussion@ontotext.com http://ontotext.com/mailman/listinfo/owlim-discussion
Re: [Owlim-discussion] directsubclass bug?
Hi Armando, I've fixed the handling of directType/SubClassOf/SubPropertyOf predicates so to consider owl:equivalentClass and owl:equivalenProperty while performing the task (also the reflexivity of both is considered) so your queries should be much simpler and run just fine using only the system predicates let me k now if you experience eny issues with that feature the new distibution could be downloaded from our site: SwiftOWLIM v3.0.11: http://www.ontotext.com/owlim/swiftowlim-3.0.beta11-sesame-2.0.zip HTH, Damyan - Original Message - From: Armando Stellato To: owlim-discussion@ontotext.com Sent: Saturday, September 05, 2009 7:37 PM Subject: Re: [Owlim-discussion] directsubclass bug? .ops, I forgot to mention my configuration: Owlim 3 beta 10 This is the config in the owlim.ttl file: # # Sesame configuration template for a owlim repository # @prefix rdfs: http://www.w3.org/2000/01/rdf-schema#. @prefix rep: http://www.openrdf.org/config/repository#. @prefix sr: http://www.openrdf.org/config/repository/sail#. @prefix sail: http://www.openrdf.org/config/sail#. @prefix owlim: http://www.ontotext.com/trree/owlim#. [] a rep:Repository ; rep:repositoryID odnamarExample ; rdfs:label Odnamar Example ; rep:repositoryImpl [ rep:repositoryType openrdf:SailRepository ; sr:sailImpl [ sail:sailType swiftowlim:Sail ; owlim:ruleset owl-max ; owlim:partialRDFS true ; owlim:noPersist false ; owlim:storage-folder odnamar-storage ; owlim:base-URL http://www.fao.org/aims/aos/agrovoc#; ; owlim:new-triples-file new-triples-file.nt ; owlim:entity-index-size 20 ; owlim:jobsize 200 ; owlim:repository-type in-memory-repository ; owlim:imports ./src/main/resources/ontologies/owl.rdfs; ; owlim:defaultNS http://www.w3.org/2002/07/owl#;; ] ]. From: Armando Stellato [mailto:stell...@info.uniroma2.it] Sent: Saturday, September 05, 2009 6:35 PM To: 'owlim-discussion@ontotext.com' Subject: directsubclass bug? Hi all, Loaded an empty repository, asked for triples with predicate SESAME:DIRECTSUBCLASSOF and got a lot of triples like: X SESAME:DIRECTSUBCLASSOF X While direct sub class semantics (from its javadoc) clearly states: Class A is a direct subclass of B iff: 1. A is a subclass of B and; 2. A and B are not equa and; 3. there is no class C (unequal A and B) such that A is a subclass of C and C of B. So this seems to clash with condition 2. Is it a bug in owlim? Armando -- ___ OWLIM-discussion mailing list OWLIM-discussion@ontotext.com http://ontotext.com/mailman/listinfo/owlim-discussion ___ OWLIM-discussion mailing list OWLIM-discussion@ontotext.com http://ontotext.com/mailman/listinfo/owlim-discussion
Re: [Owlim-discussion] Write operation and Serialization of results
Hi Damyan, Thank you for your response. The Connection closed seems to be a problem on an another part of my application. Concerning the serialization problem, I am using BigOWLIM. Do you have a new version of BigOWLIM with this fixed issue ? Thanks. Kind Regards Laurent Le 16 sept. 2009 à 16:34, Damyan Ognyanoff a écrit : Hi Laurent, couldn't reproduce your first exception - is it possible to isolate it to a small example code so to be able to fix it .. about your second issue related to serialization - I've fixed it and a distribution is available at http://www.ontotext.come/owlim the new version is SwiftOWLIM v3.0.11: http://www.ontotext.com/owlim/swiftowlim-3.0.beta11-sesame-2.0.zip apart from the above fix it also improves the directType, directSubClassOf and directSubPropertyOf handling so that these consider also the equivalent classes and subClass(Property)Of reflexivity correctly regards, Damyan - Original Message - From: Laurent PELLEGRINO laurent.pellegr...@sophia.inria.fr To: owlim-discussion@ontotext.com Sent: Monday, September 14, 2009 12:38 PM Subject: [Owlim-discussion] Write operation and Serialization of results Dear all, I have a problem with write operation on an OWLIM repository. I can perform a query operation but when I try to perform a write operation I get the following exception : [ERROR exceptions.one_way] java.lang.RuntimeException: Connection is closed java.lang.RuntimeException: Connection is closed at com.ontotext.trree.SailConnectionImpl.addStatement(Unknown Source) at org.openrdf.repository.sail.SailRepositoryConnection.addWithoutCommit (SailRepositoryConnection.java:228) at org.openrdf.repository.base.RepositoryConnectionBase.addWithoutCommit (RepositoryConnectionBase.java:549) at org.openrdf.repository.base.RepositoryConnectionBase.add (RepositoryConnectionBase.java:449) at eu.soa4all.dsb.space.proactive.datastorage.rdf.owlim.OWLIMStorage.write (OWLIMStorage.java:88) My write method is the following : public void write(Statement stmt) { RepositoryConnection conn = null; try { conn = this.repository.getConnection(); System.out.println(isOpen= + conn.isOpen()); conn.add(stmt, new URIImpl(spaceURI.toString())); } catch (RepositoryException e) { e.printStackTrace(); } finally { try { conn.close(); } catch (RepositoryException e) { e.printStackTrace(); } } } The sysout return isOpen=true. Does someone has an idea of the problem ? My second problem is about Serialization. I am retrieving Statements from an OWLIM repository. I put each Statement in a Set and i transmit this Set to another JVM on an another machine. Objects need to be Serializable and it seems that Statement are not Serializable. I am cheating by using this kind of method : for (Statement stmt : mySet) { newSet.add(new StatementImpl(new URIImpl(stmt.getSubject ().stringValue()), new URIImpl( stmt.getPredicate().stringValue()), new BNodeImpl (stmt.getObject() .stringValue(; } The problem is that I am not sure that new BNodeImpl(stmt.getObject ().stringValue())) will be the same that stmt.getObject. Is it right ? I will have the same problem with TupleQueryResult. How to Serialize these two kinds of results ? Thanks. Kind Regards Laurent PELLEGRINO ___ OWLIM-discussion mailing list OWLIM-discussion@ontotext.com http://ontotext.com/mailman/listinfo/owlim-discussion ___ OWLIM-discussion mailing list OWLIM-discussion@ontotext.com http://ontotext.com/mailman/listinfo/owlim-discussion
Re: [Owlim-discussion] OWLIM-discussion Digest, Vol 8, Issue 5
, Damyan - Original Message - From: Armando Stellato To: owlim-discussion@ontotext.com Sent: Saturday, September 05, 2009 7:37 PM Subject: Re: [Owlim-discussion] directsubclass bug? .ops, I forgot to mention my configuration: Owlim 3 beta 10 This is the config in the owlim.ttl file: # # Sesame configuration template for a owlim repository # @prefix rdfs: http://www.w3.org/2000/01/rdf-schema#. @prefix rep: http://www.openrdf.org/config/repository#. @prefix sr: http://www.openrdf.org/config/repository/sail#. @prefix sail: http://www.openrdf.org/config/sail#. @prefix owlim: http://www.ontotext.com/trree/owlim#. [] a rep:Repository ; rep:repositoryID odnamarExample ; rdfs:label Odnamar Example ; rep:repositoryImpl [ rep:repositoryType openrdf:SailRepository ; sr:sailImpl [ sail:sailType swiftowlim:Sail ; owlim:ruleset owl-max ; owlim:partialRDFS true ; owlim:noPersist false ; owlim:storage-folder odnamar-storage ; owlim:base-URL http://www.fao.org/aims/aos/agrovoc#; ; owlim:new-triples-file new-triples-file.nt ; owlim:entity-index-size 20 ; owlim:jobsize 200 ; owlim:repository-type in-memory-repository ; owlim:imports ./src/main/resources/ontologies/ owl.rdfs; ; owlim:defaultNS http://www.w3.org/2002/07/owl#;; ] ]. From: Armando Stellato [mailto:stell...@info.uniroma2.it] Sent: Saturday, September 05, 2009 6:35 PM To: 'owlim-discussion@ontotext.com' Subject: directsubclass bug? Hi all, Loaded an empty repository, asked for triples with predicate SESAME:DIRECTSUBCLASSOF and got a lot of triples like: X SESAME:DIRECTSUBCLASSOF X While direct sub class semantics (from its javadoc) clearly states: Class A is a direct subclass of B iff: 1. A is a subclass of B and; 2. A and B are not equa and; 3. there is no class C (unequal A and B) such that A is a subclass of C and C of B. So this seems to clash with condition 2. Is it a bug in owlim? Armando -- ___ OWLIM-discussion mailing list OWLIM-discussion@ontotext.com http://ontotext.com/mailman/listinfo/owlim-discussion -- next part -- An HTML attachment was scrubbed... URL: http://ontotext.com/mailman/private/owlim-discussion/attachments/20090916/b14a46cd/attachment.html -- ___ OWLIM-discussion mailing list OWLIM-discussion@ontotext.com http://ontotext.com/mailman/listinfo/owlim-discussion End of OWLIM-discussion Digest, Vol 8, Issue 5 ** ___ OWLIM-discussion mailing list OWLIM-discussion@ontotext.com http://ontotext.com/mailman/listinfo/owlim-discussion