You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Jos Lehmann <Jo...@bauhaus-luftfahrt.net> on 2019/07/23 10:29:24 UTC
Removing OWL class trees and all their individuals in jena
Hi there
how is a class, all its subclasses and all its individuals removed from an OWL ontology in jena?
I am after the jena-equivalent of selecting a class and pressing the "Delete Selected Classes" button in protege.
Thanks, Jos
Re: Removing OWL class trees and all their individuals in jena
Posted by fl...@austria.fm.
I don't know if there is a less verbose way of doing that, but I think it would work just to evaluate a SPARQL property path
rdfs:subClassOf*/^rdf:type?
starting with your class, and delete all the resources that you find.
Am 23. Juli 2019 12:29:24 MESZ schrieb Jos Lehmann <Jo...@bauhaus-luftfahrt.net>:
>Hi there
>
>how is a class, all its subclasses and all its individuals removed from
>an OWL ontology in jena?
>
>I am after the jena-equivalent of selecting a class and pressing the
>"Delete Selected Classes" button in protege.
>
>Thanks, Jos