Hi,

I want to OWLIM and Sesame to store and query power network models where I 
neither control the ontology/OWL (industry standard) or the RDF/XML documents 
(output from a off-the-shelf industry software product).

Since the ontology and models I am working with are quite complex, I have 
created a very simple setup to explain the problem I am facing: 

A simple dummy ontology (equivalent-ontology.owl):
<rdf:RDF
        xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
        xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#";
        xmlns:owl="http://www.w3.org/2002/07/owl#";
        xmlns:equivalent="http://example.org/equivalent#";
        xml:base="http://example.org/equivalent";>

    <rdf:Description rdf:about="#A">
        <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
    </rdf:Description>
    <rdf:Description rdf:about="#A.integerProperty">
        <rdfs:domain rdf:resource="#A"/>
        <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/>
        <rdf:type 
rdf:resource="http://www.w3.org/2002/07/owl#FunctionalProperty"/>
        <rdf:type 
rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
        <rdf:type 
rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/>
    </rdf:Description>
</rdf:RDF>

And a simple dummy data file (rdf-data.xml):
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; 
xmlns:e="http://example.org/equivalent#";>
         <e:A rdf:ID="_842CF986386E46E3E040E9E4E38A6337">
                  <e:A.integerProperty>21</e:A.integerProperty>
         </e:A>
</rdf:RDF>

The problem I am facing is that OWLIM does not seem to infer the xsd:integer 
type on the plain literal of "21", which results in a plain literal being 
returned when querying for data. After searching for previous posts on the 
mailing lists, I understand that the support for datatype reasoning in OWLIM is 
limited, but I would expect simple things like this to work. Please excuse me 
if I have too much expectations. :-)

I have attached a simple TestNG based test to provide more details to what I 
expect (DatatypeReasoningTest.java). This test currently fails:
java.lang.AssertionError: expected object to not be null
        at org.testng.Assert.fail(Assert.java:94)
        at org.testng.Assert.assertNotNull(Assert.java:404)
        at org.testng.Assert.assertNotNull(Assert.java:389)
        at 
no.statnett.cim.model.DatatypeReasoningTest.testIntegerProperty(DatatypeReasoningTest.java:47)
as the literal returned is a plain literal (datatype is null).


With a file based repository I found a workaround by adding the datatype to the 
plain literal on insert to the repository (using the ontology information 
[rdfs:range]) - making it into a typed literal. But I do not see a way to apply 
the same workaround with a http repository (that also will apply when adding 
data though the Sesame Workbench). Is there any "hook" available for performing 
tasks like this - if (simple) datatype reasoning is not supported by OWLIM?

Any comments or suggestions are welcomed.

Best regards,
Erik

Attachment: equivalent-ontology.owl
Description: equivalent-ontology.owl

<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"; xmlns:e="http://example.org/equivalent#";>
         <e:A rdf:ID="_842CF986386E46E3E040E9E4E38A6337">
                  <e:A.integerProperty>21</e:A.integerProperty>
         </e:A>
</rdf:RDF>

Attachment: DatatypeReasoningTest.java
Description: DatatypeReasoningTest.java

_______________________________________________
Owlim-discussion mailing list
Owlim-discussion@ontotext.com
http://ontomail.semdata.org/cgi-bin/mailman/listinfo/owlim-discussion

Reply via email to