owl

How to define a class that does not have two equivalent predicate objects?

血红的双手。 提交于 2019-12-08 01:20:19
问题 I'm trying to define class of intervals. Each interval object may have (optionally) at most two boundary points. One of them - lower boundary, and another - upper boundary. How can I restrict my class of intervals, so that lower and upper individual boundary points must be different (if provided)? 回答1: You can declare that the hasLowerBound and hasUpperBound properties are disjoint. This means that an individual with values for both cannot have the same value for both. Here's an example. I've

Retrieve the collection of unionOf and intersectionOf for each OWL

不打扰是莪最后的温柔 提交于 2019-12-07 17:40:26
I'm trying to extract intersectionOf and unionOf in an OWL file, where interesctionOf and unionOf consist of collection of classes, someValuesFrom or/and onProperty . I have created a SPARQL query which extracts the "collection" for the intersectionOf , but the problem is that some of the retrieved data are not related to the class. For example, I have class called man . This class has an equivalent class which is intersectionOf of three classes, namely, adult , person , and male .My SPARQL query returns some incorrect result: it returns that the classes adult , person , and male are

Defining DataRange Expression in Protege for a Data Type Property

此生再无相见时 提交于 2019-12-07 07:36:01
问题 I am adding few new DataType in the OWL using Protege. The DataType is like percentage and I want to specify it's range with the double value ranging from 0 to 100. Similarly a DataType named Quality and I want to specify it's range with the double value ranging from 0 to 1. How can we specify these things in the Data range Expression ? I tried to find out but I found two links but not useful in my context. How to Define My Own Ranges for OWL DataProperties This is useful if we are manually

How do owl and rdfs property domain range work?

ε祈祈猫儿з 提交于 2019-12-07 02:34:26
I am trying to understand the semantics of rdfs domain and range. Because I am from an object oriented background, I am struggling to understand the semantics and how to validate data against the rdfs statements. Here is a sample file in turtle format: PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix tmpl: <http://template.example.com/> prefix data: <http://data.example.com/> tmpl:Thing a owl:Class. tmpl:Employment rdfs:subClassOf tmpl:TemporalThing. tmpl:Party rdfs:subClassOf tmpl

Why does my SPARQL query duplicate results?

吃可爱长大的小学妹 提交于 2019-12-07 02:28:27
I am doing some searching, and learning more about SPARQL, but it is not easy like SQL. I just want to know why my query duplicates result and how to fix it. This is my SPARQL Query: PREFIX OQ:<http://www.owl-ontologies.com/Ontology1364995044.owl#> SELECT ?x ?ys ?z ?Souhaite WHERE { ?y OQ:hasnameactivite ?x. ?y OQ:AttenduActivite ?Souhaite. ?y OQ:SavoirDeActivite ?z. ?y OQ:hasnamephase ?ys. ?y OQ:Activitepour ?v. ?ro OQ:hasnamerole ?nr. ?y OQ:avoirrole ?ro. FILTER regex (?nr ,"Concepteur"). FILTER regex (?v,"Voiture"). } This gives me these results: Expected result is: While first reading your

Programatically generating assemblies from OWL files with ROWLEX

做~自己de王妃 提交于 2019-12-06 13:32:03
问题 I have been using the ROWLEX library to handle RDF-s. It is shipped with a designtime GUI tool called OwlGrinder.exe that can generate C# helper classes (.NET assemblies to be exact) from my OWL ontologies. I wonder if anyone knows if I could do the same programatically in runtime. 回答1: ROWLEX just became open source, so now you have the chance to actually look inside the code of OwlGrinder.exe and copy the code from there. However, here is a short example: private NC3A.SI.Rowlex

SPARQL Get all the properties from a Class or an Individual

徘徊边缘 提交于 2019-12-06 11:45:29
问题 What I want to do is to get the property list from the Individual1 or from a class, Get all properties from "something" The result should be something like this (for Secret_Data): | Asset_has_Confidentiality_Importance | High | | Asset_has_Availability_Importance....| Moderate | | Asset_has_Integrity_Importance.......| Moderate | | Asset_threatenedBy_ThreatEvent.......| Compromise_sensitive_information | | Asset_threatenedBy_ThreatEvent.......| Disclosure_of_sensitive_information | | Asset

How to get data and object properties of an OWL class by using SPARQL? [duplicate]

这一生的挚爱 提交于 2019-12-06 11:24:32
问题 This question already has answers here : Get all properties for a DBpedia class (2 answers) Closed 5 years ago . I have a complex OWL ontology with many classes. What SPARQL query do I need to use to obtain data and object properties of one OWL class (e.g., Person class)? 回答1: In addition to Jukka Matilainen's answer, there are a few points that should be taken into consideration. OWL is not an object oriented programming language, and the concept of classes and properties are not the same as

swrl rules to infer dataProperty values

非 Y 不嫁゛ 提交于 2019-12-06 11:13:55
问题 I'm trying to test a simple SWRL rule. There are three Classes in my ontology: LivingPlace which has two sub-classes RuralArea and City. LivingPlace is the domain of the dataProperty hasHospital which has the range boolean. When I test the following rule with Pellet reasoner, the individual I created as a member of LivingPlace is also inferred as a member of RuralArea. LivingPlace(?lp), hasHospital(?lp, false) → RuralArea(?lp) However, what I really want to do is the reverse of this reasoning

OWL how to force all the instances of a specific class to have a specific relationship

不问归期 提交于 2019-12-06 08:55:26
I am building an Ontology. I have a Class called Vehicle I have an Object Property called hasType I have a Class called VehicleTypes How can I force all the instances from Vehicle class to have one and just one instance of VehicleTypes What I have tried I am working on Protege. I made the hasType as a functional property. I added an Equivalent To which is like this: hasType exactly 1 VehicleTypes Is that enough please? Making hasType functional is the right move since every Vehicle can only have one VehicleType . However, you need to describe Vehicle hasType exactly 1 VehicleType as a