Open yy20716 opened 6 years ago
This sounds like a bug
I am sorry but I realized that I put a wrong tag in the above example. I made a copy-and-paste error, i.e.
<owl:Class rdf:resource="http://purl.obolibrary.org/obo/MONDO_0005017">
but this should be
<owl:Class rdf:about="http://purl.obolibrary.org/obo/MONDO_0005017">
In other words, because of this resource tag, owlapi does not consider MONDO_0005017
as a class, so obograph does not basically execute the codes that parse OWLDeclarationAxiom and convert them as nodes.
Nonetheless, it would be more intelligent if we could add codes that treat subjects and objects as classes when we encounter rdfs:subClassOf
property. The current codes only does this for subject; can I add codes that treat the object as class as well? Thank you.
I don't think it's valid RDF/XML to use rdf:resource
here. If it is used to indicate the object of a predicate, the predicate is the element name. But owl:Class
is not a predicate. At least that's my reading of https://www.w3.org/TR/rdf-syntax-grammar/#section-Syntax-empty-property-elements
Thanks for your clarification. Yes, in other words, owlapi's behavior and interpretation is correct, i.e. rdf:resource should not be used there.
Suppose that we have the following owl snippet.
When I parse the above snippet using obograph and request the list of nodes from the obograph object, the list I got contains Subject node only, i.e. in this case
MONDO_0007648
only withoutMONDO_0005017
. I would like to know whether this is an intended behavior or I misunderstood something. Is this because of subClassOf? I am using the following codes to retrive node objects.Any suggestions or tips would be appreciated.