owl

Reflexive property in protege

為{幸葍}努か 提交于 2019-12-24 00:35:37
问题 This is my ontology created with protege 5 . If i make cl1 and cl2 disjoint, then the ontology is being inconsistent , but if i uncheck is_friend_of reflexive , the ontology is not inconsistent any more . whats wrong with my ontology ? I want only cl1 class individuals have is_friend_of property. 回答1: Reflexivity of :is_friend_of is essential for inconsistency. Take a look at Reasoner > Inconsistent ontology explanation : I'll try to translate this explanation into (poor) English: Since :is

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

Jena Rule for Validation af a Ontology

人走茶凉 提交于 2019-12-23 20:07:05
问题 I want to validate an ontology and throw an error if anything is incorrect. The most validation I have to do looks like this: I have a class like this: <owl:Class rdf:about="&schema;ExampleClass"> <rdfs:subClassOf rdf:resource="&schema;SuperClass"/> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="&schema;myProperty"/> <owl:onClass rdf:resource="&schema;OtherClass"/> <owl:qualifiedCardinality rdf:datatype="&xsd;nonNegativeInteger">1</owl:qualifiedCardinality> </owl

Using owl:Class prefix with rdflib and xml serialization

穿精又带淫゛_ 提交于 2019-12-23 18:15:43
问题 I would like to use the owl: prefix in the XML serialization of my RDF ontology (using rdflib version 4.1.1); unfortunately I'm still getting the serialization as rdf:Description tags. I have looked at the answer about binding the namespace to the graph at RDFLib: Namespace prefixes in XML serialization but this seems to only work when serializing using the ns format rather than xml format. Let's be more concrete. I'm attempting to get the following ontology (as taken from Introducing RDFS

Can't write large owl file with Jena

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-23 12:19:59
问题 I'm trying to convert data contained in a database table in a set of triples so I'm writing an owl file using Jena java library. I have successfully done it with a small number of table records (100) which corresponds to nearly 20.000 rows in the .owl file and I'm happy with it. To write the owl file I have used the following code ( m is an OntModel object): BufferedWriter out = null; try { out = new BufferedWriter (new FileWriter(FILENAME)); m.write(out); out.close(); }catch(IOException e) {

merge equivalent classes using owl API

余生长醉 提交于 2019-12-23 04:52:53
问题 I used OWL API to merge 2 owl files correctly. However I discovered that classes/entities withe the same name(Joshua helped to define it this way: prefixes defined such that the suffix of the classes' IRIs equal under a case insensitive string comparison) are repeated. I need to output these classes with the same names as one. any help will be appreciated. thank you in advance. 来源: https://stackoverflow.com/questions/19515464/merge-equivalent-classes-using-owl-api

Meaning of owl:hasValue?

自作多情 提交于 2019-12-23 03:33:10
问题 What is the meaning of an owl:hasValue restriction, and how is it different from owl:allValuesFrom and owl:someValuesFrom ? In an ontology, I want to write an axiom that says, “Every body that has a diploma is literate.” How can I write this? 回答1: Different types of restriction classes Consider an individual x, a class C, a property P, and another individual y. Then there are a few class expressions that it sounds like you're concerned with: someValuesFrom An individual x is an element of the

get base namespace from an OWL ontology

混江龙づ霸主 提交于 2019-12-23 02:38:08
问题 Is there a way to get the base namespace from a OWL ontology file, without using DOM or similar, but just using Jena's API? E.g., from an OWL file: <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:protege="http://protege.stanford.edu/plugins/owl/protege#" xmlns="http://www.owl-ontologies.com/Ontology1254827934.owl#" xmlns:xsp="http://www.owl-ontologies.com/2005/08/07/xsp.owl#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns

OWL instance participation logic

时间秒杀一切 提交于 2019-12-23 00:52:32
问题 In OWL: There is a class X and the properties P1, P2, and P3, each of which has domain X. I want to say: Every instance of X must at least participate in a relation with one of the properties P1 or P3. Every instance of X which participates in a relation with P2 must also participate in a relation with P1. But every instance of X may only participate in relations with P1 and P2 or in relations with P3. Maybe it is easier to understand with some syntax and labels: :Chronology a owl:Class ;

How save the result of reasoner FaCT++ or HermiT in Protege

喜欢而已 提交于 2019-12-22 17:56:21
问题 I'm using Protégé 4.3 and I want to save the results of the reasoner to the ontology file. When I stopped the reasoner, all results disappeared. How can I save results? 回答1: In Protégé, use File &rightarrow; Export inferred axioms as ontology… That should do what you're looking for. 来源: https://stackoverflow.com/questions/23079459/how-save-the-result-of-reasoner-fact-or-hermit-in-protege