owl

Strange query behaviour in OWL!

血红的双手。 提交于 2020-03-16 06:07:02
问题 In OWL this query works fine "person and hasChild min 3" it works fine and it gives me all persons who have more than 3 children but this one does not work "person and hasChild max 3" it should give me all persons who have less than 3 children however it does not work does any one have an idea about this?? why "min" works while "max" does not give any results!?? Thanks 回答1: The reason why the 2nd query "does not work" is Open World Assumption , and possibly also (the lack of) Unique Name

OWL RDF/TTL Make an instance member of class based on property

人走茶凉 提交于 2020-02-03 01:58:21
问题 I am trying to design an ontology that will categorise products based on the products components. In the example below I have a class Ingredient with an instance eggs . I want to add apple_tart to all classes of products that do not contain eggs . So in this case apple_tart will be added to the class GlutenFriendly and NOT VeganFriendly . bakery:VeganFriendly rdf:type owl:Class ; rdfs:subClassOf [ rdf:type owl:Restriction ; owl:onProperty :hasIngredient ; owl:hasValue :eggs ] owl:disjointWith

SPARQL select optional with language

末鹿安然 提交于 2020-01-31 04:13:47
问题 I have some triples that look like this: test:thing rdfs:label "Non-Language Label" test:thing rdfs:label "English Label"@en test:thing rdfs:label "French Label"@fr I'd like to form a sparql query that gives me the "Non-Language Label" AND the "French Label", if any exists. I tried this and it's not working: PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?label ?preferredLabel WHERE { test:thing rdfs:label ?label OPTIONAL { test:thing rdfs:label ?preferredLabel . FILTER (regex

Defining Protege class with expression of numerical data

£可爱£侵袭症+ 提交于 2020-01-28 10:58:24
问题 I am building a smart home ontology. I now have a class hierarchy like that: I want to give definitions to the subclass of 'RoomStatus'. For example, I want to define that when room temperature is in range of 18-22 Centigrade and Humidity is in range of 40-50%, then the room has a mild status. I tried to use Class Expression Editor in Protege but it doesn't work. How can I realize this definition? Thanks in advance! 回答1: Hatim's answer may work for you, but I think it might be better not to

OWL Parsing From EFO

£可爱£侵袭症+ 提交于 2020-01-24 22:09:04
问题 I have been trying endlessly to parse the Experimental Factor Ontology (EFO) file, but I am not able to parse it. The file I have opens fine in Protege, but I cannot seem to get it to load in Java. I have looked at a few sets of example code, and I am copying them seemingly exactly, but I do not understand why parsing fails. Here is my code: System.setProperty("entityExpansionLimit","100000000"); OWLOntologyManager manager = OWLManager.createOWLOntologyManager(); URI uri = URI.create("file:~

Can OWL punning help in defining data properties on object property?

两盒软妹~` 提交于 2020-01-24 15:34:07
问题 Punning (which was introduced in OWL 2 DL) allows one to give the same name (IRI) to a Class and an Object Property (see Association Example). Can I use this way of meta-modelling to attach attributes on a relation? For instance, the relation drives connects Person and Vehicle . I want to specify the velocity with which the Vehicle is driven, and this property belongs on drives . Punning allows me to model drives as an association class by specifying both a class and an object property named

Retrieve the collection of unionOf and intersectionOf for each OWL

♀尐吖头ヾ 提交于 2020-01-23 22:03:30
问题 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

Adding more complicated subclass axiom

邮差的信 提交于 2020-01-21 15:19:33
问题 I have stumbled upon another problem... I want to achieve something similar to this: I wanted to do so using RDFList, adding the necessary properties in to the list and then call method createUnionClass (or createIntersectionClass) and combine it together. Then, the result of this method would be added to particular ontClass with addSuperClass(). Is this wrong? I have started with something really simple, like: RDFList rdfList = ontModel.createList(); rdfList.addProperty(ExampleResource1);

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.