ontology

Generating Jena Bnode IDs

喜夏-厌秋 提交于 2019-12-11 15:13:31
问题 Is there a way to override Jena's default method for generating anonymous node IDs? Ideally, I'd like to pass Jena a functor that would generate IDs so that I can make them globally unique (rather than just unique to the machine). The functor should be used whenever an AnonId is constructed. public interface IdGenerator { public String createId() { // create a globally unique ID ... return uid; } } This is somewhat related to my previous question. Edit : I realize that AnonId has a

Retrieve Data Properties of An Individual using OWL API in eclipse

若如初见. 提交于 2019-12-11 14:25:43
问题 I want to retrieve all data properties set for an individual of any class using owl api. The code i have used is OWLNamedIndividual inputNoun = df.getOWLNamedIndividual(IRI.create(prefix + "Cow")); for (OWLDataProperty prop: inputNoun.getDataPropertiesInSignature()) { System.out.println("the properties for Cow are " + prop); //line 1 } This code compiles with success but line 1 print nothing at all. What should be the correct syntax. Have thoroughly googled and couldnt find any thing worth it

Specifying class equivalence in Jena rules

时光毁灭记忆、已成空白 提交于 2019-12-11 13:14:41
问题 Given an ontology with Class A and Class B I am stating a rule: [-> (ns:Class_A owl:equivalentClass ns:Class_B)] However the Jena generic rule reasoner is only applying the tag equivalentClass to Class A , i. e. it is not stating Class B equivalentClass Class A . Furthermore, I have an object A that is an individual of Class A , the reasoner is not applying Class B as a type of object A . Is there another way to specify class equivalence through Jena rules? And is it better to use the generic

Ontology and the Web

≡放荡痞女 提交于 2019-12-11 12:46:47
问题 I've been having trouble accessing an ontology that we built here via the web. I've been trying to understand sparql and as far as I can tell there's no real PHP support for ontologies yet. I was wondering if I'm going about this right trying to build a java server app that queries the ontology for me that I just access? Or is there an easier better way? Can anyone help with their own knowledge or good references to read? I've been searching and reading for awhile now and can't find much of

SPARQL if an instance has a property, others must as well

↘锁芯ラ 提交于 2019-12-11 11:45:46
问题 I have a specific instance and a SPARQL query that retrieves other instances similar to that one. By similar, I mean that the other instances have at least one common property and value in common with the specific instance, or have a class in common with the specific instance. Now, I'd like to extend the query such that if the specific instance has a value for a "critical" property, then the only instances that are considered similar are those that also have that critical property (as opposed

How to read ontology file with owl:imports in JENA?

我的梦境 提交于 2019-12-11 10:57:26
问题 I have an owl file that import some other ontologies from other owl files. I tried to follow JENA API Documentation to deal with it, but could not succeed. What am I missing? The codes I used are above: e-GovSecAOnto.owl imports: <owl:Ontology rdf:about=""> <owl:imports rdf:resource="http://www.ida.liu.se/~iislab/projects/secont/Security.owl"/> <owl:imports rdf:resource="http://www.unifiedcloud.org/2009/2/26/uci.owl"/> <owl:imports rdf:resource="http://wwwsemanticweb.org/ontologies

SPARQL - how to get individual data property from linked individual

早过忘川 提交于 2019-12-11 10:53:32
问题 I build this ontology in protege. I have this individual ev001 that has these types Room , hasRoom only {rm001} and rm001 has data property roomName "room 1"^^xsd:string . Right now I have a SPARQL query that returns Event Room RoomName ev001 {rm001} My question is, how to get the room name from there, here is my query so far SELECT ?event ?room ?roomname WHERE { ?x owl:onProperty base:hasRoom . ?event a base:FilmScreening ; a ?x . ?x owl:allValuesFrom ?room . } Any advice is appreciated,

How to infer individual with more than 2 property in owl

蹲街弑〆低调 提交于 2019-12-11 10:46:20
问题 I have an ontology with Person and Animal_Lover classes. People are Animal_Lover if they have more than 2 pet. How can I do this in my ontology? <?xml version="1.0"?> <rdf:RDF xmlns="http://www.example.com/test" xml:base="http://www.example.com/test" xmlns:test="http://www.example.com/test#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:rdfs

How to import geosparql to your ontology?

守給你的承諾、 提交于 2019-12-11 10:43:16
问题 Based on this: How to extend ontology with other standard ontologies in Protégé?, I am really worried on how to import geosparql in an ontology I just created. I think that importing geosparql means to import this to my ontology in Protege: http://schemas.opengis.net/geosparql/1.0/geosparql_vocab_all.rdf My ontology is Saved As RDF/XML syntax and the file that contains it has a .owl extension. How to safely import geosparql in my ontology (Protege 5.0.0 beta)? 回答1: Both .rdf and .owl are

Qualified cardinality restriction definition in Protege

本秂侑毒 提交于 2019-12-11 09:56:34
问题 I was following this tutorial -> LINK At page 75, it explains how to define a FourCheesePizza using a qualified cardinality restriction. Under the instructions it says "With this description a FourCheesePizza can still also have other relationships to other kinds of toppings. In order for us to say that we just want it to have four cheese toppings and no other toppings we must add the keyword 'only' (the universal quantifier)". Now, my definition of FourCheesePizza is: Pizza and hasTopping