I played around with the insertion and deletion of statements in owlim.

For my tests I used the following fake URI triple:

subj = http://www.w3.org/1999/02/22-rdf-syntax-ns#a
pred = http://www.w3.org/1999/02/22-rdf-syntax-ns#b
obj = http://www.w3.org/1999/02/22-rdf-syntax-ns#c

inserting the triple:
repositoryConn.add(subj, pred, obj);
repositoryConn.commit();

seems to work. I can find the triple with

RepositoryResult<Statement> iter = repositoryConn.getStatements(subj,
null, null, true);

with the SPARQL ask query:
SPARQL ASK: ASK { <http://www.w3.org/1999/02/22-rdf-syntax-ns#a>
   <http://www.w3.org/1999/02/22-rdf-syntax-ns#b>
   <http://www.w3.org/1999/02/22-rdf-syntax-ns#c> . }

but not via
SELECT ?pred ?obj WHERE { <http://www.w3.org/1999/02/22-rdf-syntax-ns#a>
?pred ?obj . }

which is a little bit weird, since the ask query works.
Removing this triple via
repositoryConn.remove(subj, pred, obj);
repositoryConn.commit();

works fine, but for any preexisting triple:

subj = http://www.w3.org/2002/07/owl#Nothing
pred = http://www.w3.org/2002/07/owl#complementOf
obj = http://www.w3.org/2002/07/owl#Thing

removing does not work at all. The triple is still in the store.

Is it not possible to delete statements that are parsed into the triple
store as part of an ontology file? Have I missed something? Do I have to
synchronize my repositoryConn with the repository or the
repositoryManager somehow?

Thanks for helping and 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
[email protected]
http://ontotext.com/mailman/listinfo/owlim-discussion

Reply via email to