简体   繁体   中英

Use OWL API to extract RDFS classes from ontology

I have an ontology that contains classes both of type owl:Class and rdfs:Class. I am using OWL API to parse the ontology.

I know that OWL API calls such as ontology.getClassesInSignature() can parse OWL classes from the ontology into OWLClass objects.

Is it also possible to parse the rdfs:Class objects from the ontology also using OWL API - or will OWL API only see the owl:Classes in my ontology?

In short, yes. rdfs:Class and owl:Class are both parsed as OWLClass (or OWLClassExpression if they do not have IRIs but are complex expressions.

Beware of the results of modifying and saving these ontologies, though. Currently the OWL API won't preserve the original namespace declaration, and all classes will be saved as owl:Class .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM