owl-api

Check ontology consistency & satisifiability with OWL API 4

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-08 11:18:26
问题 I'm trying to check an ontology for its consistency. The ontology includes only descriptions of individuals, the class and semantic rules are described by an imported ontology. I thougt using the isConsistenct method would be the right choice. OWLReasonerFactory reasonerFactory = new StructuralReasonerFactory(); OWLReasoner reasoner = reasonerFactory.createNonBufferingReasoner(mergedOntology); if(reasoner.isConsistent()){ return "Merged ontology PASSED the consistency test"; }else{ return

How to get the object property values for the specified individual?

眉间皱痕 提交于 2020-01-17 05:38:50
问题 I have an ontology, created using Protegé 4.3.0, and I would use the OWL-API in order to get the object property values (ie. a set of OWLNamedIndividual objects) for the specified individual and object property expression. Set<OWLNamedIndividual> values = reasoner.getObjectPropertyValues(individual, hasPart).getFlattened(); Unfortunately the above instruction return no items, since in my ontology the association between individuals is via some sub object properties of hasPart object property.

How to get the object property values for the specified individual?

∥☆過路亽.° 提交于 2020-01-17 05:38:10
问题 I have an ontology, created using Protegé 4.3.0, and I would use the OWL-API in order to get the object property values (ie. a set of OWLNamedIndividual objects) for the specified individual and object property expression. Set<OWLNamedIndividual> values = reasoner.getObjectPropertyValues(individual, hasPart).getFlattened(); Unfortunately the above instruction return no items, since in my ontology the association between individuals is via some sub object properties of hasPart object property.

Howto get Dataproperty inherited from superclass

你说的曾经没有我的故事 提交于 2020-01-17 03:24:39
问题 I am working on my ontology using owlapi and java, but I cant find a solution in such a case: Here I have a class structure such as: Electronics Radio Handy I created individuals to these classes having the same name as their class. As Electronics class has an individual named electronics. Class: Electronics Equivalent to: keyword some {"electronics"} . Class: Handy Dataproperty: keyword Data property value: "handy" , type:string I use Hermit to search for individuals as keyword some {

Retrieve OWL Individuals with same Object Properties using OWL API 4.0

自作多情 提交于 2020-01-10 20:10:42
问题 I am using OWL Api 4.0 in eclipse 3.4 with a simple ontology in Protege 4. I have two classes "Ward" and "Gaurdian". Individuals of these classes are related by object property isWardOf. How can i retrieve the individuals of class Ward that are related to same individual of Class Gaurdian. consider the following figure:- I want to retrieve the Fact that Peter and Allice are related or siblings as they both are connected to Jack. Any rough clue as to how to achieve this using OWL API 4.0. My

Spring Bean implemented by a 3rd party library that uses @Inject conflicting with Spring's injection mechanism

馋奶兔 提交于 2020-01-06 05:25:46
问题 I am trying to have a @Bean implemented by a class from a 3rd party library (OWL API). This implementation uses an @Inject annotation. Spring tries to interpret it, interfering with the injection mechanism of the 3rd party library and avoiding it to work as intended. Is there a way to instruct Spring to ignore the @Inject annotations of the bean implementation, when instantiating the bean? I found few questions about this subject but none of them provided a solution usable in my context. I

How to check if OWLObjectPropertyExpression between classes exists?

眉间皱痕 提交于 2020-01-03 04:50:50
问题 Assuming two types of classes, one (A) "isManagedBy" by the other (B). The following owl snipped illustrates this scenario. There are multiple classes of type A (which are "managed by" other classes) and multiple classes of B. In fact, there is also a hierarchy between between classes bot of type A and B. <owl:ObjectProperty rdf:about="#isManagedBy"/> <owl:Class rdf:about="#FunctionManagement"> <rdfs:subClassOf rdf:resource="..."/> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf

OWL Api, move class from parent A to B

前提是你 提交于 2020-01-03 02:25:33
问题 I'm having a quick question regarding the usage of the owl api. Say I have a class called Species, which has a Subclass mammal, which has a Subclass Primate, which has a subclass Human. species -> mammal -> primate -> human For some reason, I would like to reclassify this in our software and say that Primates are not longer considered Mammals, instead they should be a direct subclass of a Species. Meaning our graph should look like this now species -> primate -> human can anybody please point

Loading YAGO Ontology with OWL API

試著忘記壹切 提交于 2019-12-24 05:53:07
问题 I’m using the OWL API (3.4.8 for compatibility reasons) for the first time, and I’m trying to load an ontology that is provided as part of the YAGO knowledge base (http://resources.mpi-inf.mpg.de/yago-naga/yago3.1/yagoSimpleTaxonomy.ttl.7z). However I keep getting the following warning: [main] WARN org.obolibrary.oboformat.parser.OBOFormatParser - LINE: 629693 Expected white space at pos: 44 LINE: <wikicat_Gardens_in_Aomori_Prefecture> rdfs:subClassOf <yagoGeoEntity> . (I just copied one

Define mutiple domains/ranges in a same propery in OWL

孤街醉人 提交于 2019-12-23 20:54:07
问题 What's the correct way to set domains/ranges of data/object properties in OWL? If I have two classes A , B and a data property hasName : <Declaration><Class IRI="#A"/></Declaration> <Declaration><Class IRI="#B"/></Declaration> <Declaration><DataProperty IRI="#hasName"/></Declaration> <FunctionalDataProperty> <DataProperty IRI="#hasName"/> </FunctionalDataProperty> <DataPropertyRange> <DataProperty IRI="#hasName"/> <Datatype abbreviatedIRI="xsd:string"/> </DataPropertyRange> I want to set