[ 
https://issues.apache.org/jira/browse/JENA-1938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17163540#comment-17163540
 ] 

Amir Hooshmand edited comment on JENA-1938 at 7/23/20, 12:58 PM:
-----------------------------------------------------------------

That works, however in future if we want to introduce a new API hopefully for 
OWL2, we may consider differentiating between OWL2 Full and other restricted 
versions, in which we are not allowed to use RDFS:Class as an OWL:Class. 

For now, all good, I could solve the problem (if we can call it so) with the 
following code-snippet. So, I am going to close the issue.

Thanks for the clarifications. 
{code:java}
ResIterator resIterator = baseModel.listResourcesWithProperty(RDF.type, 
RDFS.Class);
while (resIterator.hasNext()) {
    Resource resource = resIterator.nextResource();
    resource.addProperty(RDF.type, OWL.Class);
}{code}
 


was (Author: ahoo):
That works, however in future if we want to introduce a new API hopefully for 
OWL2, we may consider differentiating between OWL2 Full and other restricted 
versions, in which we are not allowed to use RDFS:Class as an OWL:Class. 

For now, all good, I could solve the problem (if we can call it so) with the 
following code-snippet. So, I am going to close the issue.

Thanks for the clarifications. 

 
{code:java}
ResIterator resIterator = baseModel.listResourcesWithProperty(RDF.type, 
RDFS.Class);
while (resIterator.hasNext()) {
    Resource resource = resIterator.nextResource();
    resource.addProperty(RDF.type, OWL.Class);
}{code}
 

> 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)

Reply via email to