W3C home > Mailing lists > Public > public-owl-dev@w3.org > July to September 2010

Problem with deleting a value from an infGraph

From: Shamir Nazaraly <nazaralyshamir@gmail.com>
Date: Thu, 19 Aug 2010 15:09:09 +0200
Message-ID: <AANLkTi=mHZ0HXryFToo6ArNhGuYXo+48wkOBbrdR-eGo@mail.gmail.com>
To: public-owl-dev@w3.org

I builded the ontology from the software Protégé. I developped a method with
Jena API  to delete a value inside the ontology:

public void delete(Node measurement, OWLDatatypeProperty property, String
value) {

        Node propertyNode = Node.createURI(property.getURI());
        Node valueNode = Node.createLiteral(value);

        infGraph.delete(new Triple(measurement, propertyNode , valueNode ));

This method works correctly.
For example there is an instance which has a dataType property "hasValue"
and it contains the value "France":

*http://www.cmf.com/Ontology.owl#PCountryMeasurement @
http://www.cmf.com/Ontology.owl#hasValue "France"*

After executing the method above, the value is correctly deleted.

But when I launch Protégé, and I save after rewriting the same value
deleting "France" , I execute this same method but this value is still here..

Actually, when I change something in the ontology graphically with Protégé,
I can't delete it with the method above.

I printed the statement to see what is the problem and I saw this statement
after rewriting the same value graphically.

*http://www.cmf.com/Ontology.owl#PCountryMeasurement @
http://www.cmf.com/Ontology.owl#hasValue "France"^^
There is something added to the second statement compared to the first
statement: *^^http://www.w3.org/2001/XMLSchema#string*
Is there anyone who can help me please?

Received on Thursday, 19 August 2010 13:11:19 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:58:19 UTC