[
https://issues.apache.org/jira/browse/JENA-1938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17162749#comment-17162749
]
Amir Hooshmand commented on JENA-1938:
--------------------------------------
Well, we are talking about the basics of OWL1/OWL2 and RDF, according to OWL1
documentation ([https://www.w3.org/TR/owl-ref/#ClassDescription]):
* NOTE: *In OWL Lite and OWL DL, {{owl:Class}}* (or {{owl:Restriction}}, see
further) *must be used for all class descriptions.*
* NOTE: *{{owl:Class}} is defined as a subclass of {{rdfs:Class}}.* The
rationale for having a separate OWL class construct lies in the restrictions on
OWL DL (and thus also on OWL Lite), which imply that not all RDFS classes are
legal OWL DL classes. In OWL Full these restrictions do not exist and therefore
*{{owl:Class}} and {{rdfs:Class}} are equivalent in OWL Full.*
Agree, it is strange that no one has spotted this issue (imho), maybe they have
used the model API or other workarounds. In my use case, i am working with
ontologies modelled mainly in RDF/RDFS and some in OWL, hence needing very much
to work with classes represented as RDFS:Class. For now i can figure out a
workaround easily, but imho we need to double check the code and perhaps fix
this easy bug.
BTW, thanks for the tips, try to follow the good practice.
> OntClass query does not return classes that are of type RDFS.Class
> ------------------------------------------------------------------
>
> Key: JENA-1938
> URL: https://issues.apache.org/jira/browse/JENA-1938
> Project: Apache Jena
> Issue Type: Bug
> Components: Ontology API
> Affects Versions: Jena 3.16.0
> Reporter: Amir Hooshmand
> Priority: Major
> Labels: easyfix, ready-to-commit
>
> Team,
> There is a bug in the Ontology API; the OntClass query does not return
> classes that are RDFS.Class. You receive only OWL.Class and OWL.Restriction
> classes
> There are two functions affected due to this bug (to my best knowledge);
> * ontClass.listNamedClasses();
> * ontClass.listClasses();
> The Bug is in "org.apache.jena.ontology.impl" in
> * OWLProfile Class,
> * method getClassDescriptionTypes()
> * in Line 218
> My suggestion to fix the bug:
> * add <<< RDFS.Class >>> to the ArrayList.
>
> Thanks
> Amir
--
This message was sent by Atlassian Jira
(v8.3.4#803005)