From: Ignazio P. <ipa...@gm...> - 2011-05-19 18:26:10
|
2011/5/19 Wartik, Steven P "Steve" <sw...@id...>: > The OWL API’s behavior regarding datatype declarations puzzles me. I have an > ontology that declares a datatype as follows: > > > > <rdfs:Datatype rdf:about="#MyDatatype"> > > <rdfs:label xml:lang="en">Datatype label</rdfs:label> > > <rdfs:comment xml:lang="en">Datatype comment</rdfs:comment> > > <owl:oneOf rdf:parseType="Resource"> > > <rdf:first rdf:datatype="&xsd;string">E1</rdf:first> > > <rdf:rest rdf:parseType="Resource"> > > <rdf:first rdf:datatype="&xsd;string">E2</rdf:first> > > <rdf:rest rdf:resource="&rdf;nil"/> > > </rdf:rest> > > </owl:oneOf> > > </rdfs:Datatype> > > > > When I load this ontology using > OWLOntologyManager.loadOntologyFromOntologyDocument(), I get two messages: > > > > INFO: Cannot translate list item to individual, because rdf:first triple is > a literal triple > > > > I do not get these messages when I use the following (differences are in > italic): > > > > <rdfs:Datatype rdf:about="#MyDatatype"> > > <rdfs:label xml:lang="en">Datatype label</rdfs:label> > > <rdfs:comment xml:lang="en">Datatype comment</rdfs:comment> > <owl:equivalentClass> > <rdfs:Datatype> > > <owl:oneOf rdf:parseType="Resource"> > > <rdf:first rdf:datatype="&xsd;string">E1</rdf:first> > > <rdf:rest rdf:parseType="Resource"> > > <rdf:first > rdf:datatype="&xsd;string">E2</rdf:first> > > <rdf:rest rdf:resource="&rdf;nil"/> > > </rdf:rest> > > </owl:oneOf> > </rdfs:Datatype> > </owl:equivalentClass> > > </rdfs:Datatype> > > > > Can someone explain what is going on here? Is there some obscure (to me) > portion of the OWL specification that requires this equivalence assertion? The only difference between the datatype declared in the first fragment and the datatype nested in the second fragment is that the first is not an anonymous class (and its annotations, but that should not be an issue). From the specs [1] I understand that a datatype declaration is supposed not to have a IRI, hence the need for some equivalent/subclassof relation; on the other hand, this should be enforced on strict parsing mode and not in the default lax mode (at least I believe the default is lax - it was last time I checked). In short, while the first form is not entirely following the specs, it should reasonably be understood anyway. I'll add an item in the bug tracker. HTH, I. [1] http://www.w3.org/TR/owl2-mapping-to-rdf/ > > > > The attachment is a complete ontology illustrating the problem. Comment out > the owl:equivalentClass lines to see it reject the literal triples. > > > > Thanks for any and all help, > > > > Steve Wartik > > Institute for Defense Analyses > > Alexandria, Virginia > > ------------------------------------------------------------------------------ > What Every C/C++ and Fortran developer Should Know! > Read this article and learn how Intel has extended the reach of its > next-generation tools to help Windows* and Linux* C/C++ and Fortran > developers boost performance applications - including clusters. > http://p.sf.net/sfu/intel-dev2devmay > _______________________________________________ > Owlapi-developer mailing list > Owl...@li... > https://lists.sourceforge.net/lists/listinfo/owlapi-developer > > |