FAQ Database Discussion Community


Fuseki indexed (Lucene) text search returns no results

rdf,sparql,jena,owl,fuseki
I have a very large ontology RDF file (almost 4M instances) that I'm currently streaming via Fuseki v2.0.0. My assembler file looks like this: @prefix : <#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix tdb: <http://jena.hpl.hp.com/2008/tdb#> . @prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> . @prefix text: <http://jena.apache.org/text#> . @prefix myprefix:...

OWL-?? to OWL-RL for GraphDB (OWLIM)

owl,ontology,inference,owlim
I am trying to use GraphDB-SE triplestore to store Einstein Riddle and use ruleset to infer the answers. GraphDB has build in support for OWL2-RL and OWL2-QL. According to w3.org OWL 2 RL supports all axioms of OWL 2 apart from disjoint unions of classes (DisjointUnion) and reflexive object property...

How to check if OWLObjectPropertyExpression between classes exists?

rdf,semantic-web,owl,owl-api,reasoning
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...

Loading owl file with Jena

java,jena,owl,ontology
I load several OWL files (RDF/XML serialization) with Jena as OntModel. For some files I get an error when reading them with ontoModel.read(): Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/HttpMessage. I have org.apache.httpcore-sources.jar in the classpath. The file which currently poses problem is: ontologydesignpatterns.org/cp/owl/timeindexedpersonrole.owl I saved it with Protege as RDF/XML,...

How to reason or make inferences using hermit reasoner in command line

semantic-web,owl,owl-api
I am totally new to the idea of Semantic web and Reasoner so sorry for being naive. I downloaded the HermiT.zip package from http://www.hermit-reasoner.com Then I added a Demo.Java file to the project and ran this in the command prompt using the commands given on the the same website. The...

OWL. How to express that siblings has common parent?

rdf,semantics,semantic-web,owl
I wrote simple file in turtle notation where Dave is father of Mary and Mary sister of Jack. I want reason that Dave have two childs Jack and Mary. :Human a rdfs:Class . :Man rdfs:subClassOf :Human ; owl:disjointWith :Woman . :Woman rdfs:subClassOf :Human ; owl:disjointWith :Man . :hasChild a rdf:Property...

How to model a class that is a collection of individuals of another class in Protege

rdf,owl,ontology,protege,swrl
I need to model following example in Protege: Suppose I have a class, Pride, which represents a collection of instances of another class, Lion. Is there any other way to do this without use of user defined object property with minimum cardinality? Furthermore, if a lion has color "Yellow" and...

Inference in protége

semantic-web,owl,ontology,inference
I'm building an ontology to find peoples' skills. I want to infer that when a person A passed a course B and course B provides skill C, then person A has skill C. Is there a way to do this in Protégé?

Avoiding count explosion in querying with SPARQL ontologies containing owl:sameAs triples

sparql,owl
I am trying to build a (local) ontology that describes a finite number of objects, and that links these objects to external resources via the owl:sameAs predicate. However, when I simply query for the number of objects of that kind, I obtain twice as much as the object described. It...

Multiple domain and range in objectProperty?

rdf,semantic-web,owl,ontology,rdfs
I want to create an ontology with Protege that contains two classes, Animal and FatherAnimal, and the object property hasFather, with domain Animal and range FatherAnimal. Also, I create two other classes: Son and Father which are linked with the same object property, hasFather. The problem here is that I'm...

Refining my SPARQL query-ing

sparql,owl,protege
I am working on an Ontology about Tolkien Elves' family branches. Here is the OWL file. Now I have added the prefixes for the SPARQL tab in Protégé like this: PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX gene: <http://www.semanticweb.org/kayurin/ontologies/2015/1/casata_di_finwe#> And then started to work...

In OWL 1; are min 1 Thing and some Thing equivalent?

owl,ontology
In OWL 1; What is the difference between: Parent subclassOf hasChildren min 1 Thing and Parent subclassOf hasChildren some Thing Are they equivalent as both of them assert that each Parent instance must has at least one value from any class through hasChildren? as we don't specify a particular range...

Getting started with OWL API

java,owl,owl-api
Post-Answer Edit: This was an issue that arose primarily due to IDE issues. This is more likely to be useful if you are new to eclipse, or java programming in general while also learning about OWL. I am very new to OWL in general, and need to familiarize myself with...

Sparql query to get all classes that are subclass of a “property class”

sparql,semantic-web,owl,protege
I need to "annotate" some classes by adding a property to them. I need to do that in order to let the view layer of my application extract the correct classes. What I have done is: create an object property called uiProperty and edit these classes to make them subclass...

How to define the type of elements in an rdf:Seq?

syntax,rdf,owl,rdfs,turtle
I want to create a property defining a rdf:Seq as a rdfs:range of an object : eg:myProperty a rdf:Property; rdfs:range rdf:Seq; . I'm looking for a way to define the type of the elements stored in the rdf:Seq. For example, I don't want this : eg:typeOfElement a rdf:Class; . eg:somethingElse...

Owl Carousel implementation

jquery,twitter-bootstrap,carousel,owl
I can't use the Owl Carousel 2 I would like to use. I think it has something to do witht the files I have connected to my html but there might be a another problem. Do I even have the right files? This is my HTML so far. I already...

How to get a single name for multiple name properties in DBPedia with SPARQL?

sparql,owl,dbpedia
I need to get persons' names from DBPedia, but the problem is that not every person has the dbpprop:fullname property, sometimes it only has the dbpprop:name or the rdfs:label property. To clarify: I want to query for the name with a preference for the first property, if that doesn't exist...

Convert OWL/XML in RDF/XML with a simple command line in shell

java,shell,rdf,owl,owl-api
I'm asking your help to create a converter to transform OWL/XML into RDF/XML. My purpose is to use OWLapi 2 through a simple shell command with bash. My files are in OWL/XML but I have to transform them into RDF/XML to send them in my fuseki database. I could transform...

Consequence of restrictions in ontology on SPARQL end results

rdf,sparql,semantics,owl,ontology
I am concerned about two classes (SensingDevice and Property) of my ontology (dgo.owl) as shown in the below figure. These two classes are connected by observes property: and the related ontology portion is as: <owl:Class rdf:about="http://www.iiitd.edu.in/~haroonr/ontologies/DGO#TemperatureSensor_Livingroom"> <rdfs:subClassOf rdf:resource="http://purl.oclc.org/NET/ssnx/ssn#SensingDevice"/> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="http://purl.oclc.org/NET/ssnx/ssn#observes"/>...

Aligning two ontologies with an “adapter”

owl,ontology,sesame,owlim
Simplifying a little, I have a domain ontology (D) expressed in OWL, which describes devices, their capabilities, configurations. Also, for each vendor I would like to have vendor-specific ontology (V), which would be connected to the domain one. The question is, how to align D and V? Is it feasible...

Specifying class equivalence in Jena rules

jena,owl,ontology,apache-jena
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, ie. it is not stating Class B equivalentClass Class A Furthermore, I have an object A...

What is the alternative to using domains and ranges within ontologies?

owl,ontology,protege
I'm playing with Protégé 5 to build ontologies. After googling around on the topic of domains and ranges, I'm seeing that domains and ranges are not necessarily the right way to relate two things. [protege-owl] Specifying domain and range in object properties: The important thing to remember is that OWL...

Count a specific relationship in OWL File using sparql query

sparql,jena,owl,ontology
I want to count assertions of a specific relationship in OWL file. if following is my whole Ontology:- <owl:NamedIndividual rdf:about="file:/C:/myOnt.owl#comfort"> <SynonymOf rdf:resource="file:/C:/myOnt.owl#impunity"/> <SynonymOf rdf:resource="file:/C:/myOnt.owl#sooth"/> <SynonymOf rdf:resource="file:/C:/myOnt.owl#ease"/> </owl:NamedIndividual> <owl:NamedIndividual rdf:about="file:/C:/myOnt.owl#population"> <SynonymOf rdf:resource="file:/C:/myOnt.owl#habitation"/>...

SPARQL query not displaying results

sparql,owl,virtuoso
I'm very new to Semantic Web programming. I have an OWL file that I've loaded into Virtuoso server at the URI http://myexample.com . Now when I open the Virtuoso SPARQL query editor (http://localhost:8890/sparql), and run the following query, I get no results: SELECT ?class FROM <myexample.com> WHERE{?class a owl:class} Order...

Is it possible to make property assertions on class level in OWL 2?

inheritance,semantic-web,owl,description-logic
I have an OWL 2 ontology containing several named individuals belonging to a class that need to have the same object property with the same value. I would like to make this property assertion "on the class" in such a way that a reasoner could infer the property to be...

Reasoning and datatypes of Literals

rdf,owl,reasoning,turtle,stardog
In Turtle-RDF it is convenient to omit the datatype extension ^^xsd:string for string literals. But when i try to do reasoning with StarDog, http://www.stardog.com/, only the individual :YYY with the extension "green"^^xsd:string is found to be a :GreenButton @prefix : <http://stackoverflow.com/q/29075078/1281433#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix owl: <http://www.w3.org/2002/07/owl#> ....

Protege owl ontology

owl,protege4
I have two properties hasWon hasQualifiedTo The range of both is Competition and the domain is not restricted to any class. I want to restrict the model as follows: To win (hasWon) a competition one must qualify to (hasQualifiedTo) a competition. How to do it in Protege and how to...

Date modelling using ontology concepts

rdf,semantics,owl,ontology,protege
Problem: I need to create an ontology (say www.example.com/ontology/ont# , with ONT prefix). This ontology consists of some other ontologies with prefixes as SSN, TIME, GEO, etc. Now, the confusion is that when I use ONT ontology for data modelling, should I use original prefix’s such as SSN,TIME and GEO...

dbpedia fetch entitites in language other than english

sparql,owl,wikipedia,dbpedia,foaf
I'm trying to extract entity dictionary contains person name etc. from dbpedia using sparql. PREFIX owl: <http://dbpedia.org/ontology/> PREFIX dbpprop: <http://dbpedia.org/property/> SELECT ?name WHERE { ?person a owl:Person . ?person dbpprop:name ?name . FILTER(lang(?name) = "en") } The query above did succeed, but when I change the language name to fr,...

How to define an rdfs:range target in a list of possibilities?

syntax,rdf,owl,protege,rdfs
I'm trying to declare a property phs:hasTheValue to add a boolean or an integer to an object. Currently, I've wrote this code to define the property. phs:hasTheValue a rdf:Property; rdfs:range [ a owl:DataRange; owl:oneOf (xsd:boolean xsd:integer); ]; . My problem is that I can't open my file with Protégé 5.0...

Reasoner does not check cardinalities and/or restrictions?

semantic-web,owl,restrictions
I tried to create the perhaps simplest ontology, consisting of two classes (A, B) and a relation (R) between the two classes. I also want to state that every individual of A must have a relation R with some other individual. :R rdf:type owl:ObjectProperty ; rdfs:domain :A ; rdfs:range :B...

Sparql query not showing results

rdf,sparql,jena,owl,ontology
I have an ontology (dgo.owl) and a simple program (SparqlQuery.java) to query the same ontology. On running the query I do not get any results. After debugging for a long time I thought it would be good to put it in the community. The query script is as: OntModel ontmodque...

Cyclic or Acyclic TBox

semantic-web,owl,description-logic
Is the following TBox cyclic or acyclic? If it is a cyclic TBox, how could it be converted to an acyclic one? A ⊑ ¬E E ⊑ ¬A ...

How to write a SPARQL query for retrieving data from OWL file

java,sparql,jena,owl,protege
I have generated an owl file using Protege. Now I wish to access all the stationCode property values of all instances of a class RailwayStation from it. My OWL file contains the following format <?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:swrlb="http://www.w3.org/2003/11/swrlb#" xmlns:xsp="http://www.owl-ontologies.com/2005/08/07/xsp.owl#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:protege="http://protege.stanford.edu/plugins/owl/protege#"...

SPARQL query to return matches on satisfied restrictions

rdf,sparql,owl
I am trying to write a query on a class with a restriction defined on it, that will determine whether the restriction has been satisfied and, if it has, return it. An example class is defined as follows: :ThingB a owl:Class ; rdfs:subClassOf :ThingA ; rdfs:subClassOf [ a owl:Restriction ;...

Difference between reasoners in Protege 5.0.0

owl,ontology,protege
I have build a small ontology in Protege 5.0.0. When I run Hermit 1.3.8.3 reasoner, it outputs status as: Initializing the reasoner by performing the following steps: class hierarchy object property hierarchy data property hierarchy class assertions object property assertions same individuals HermiT 1.3.8.3 classified in 97ms On the other...

How to create a SPARQL endpoint using Virtuoso?

sparql,owl,endpoint,virtuoso
I have just setup Virtuoso and I have loaded an OWL file (created with Protege software) present on my local machine in to Virtuoso using the following code: SQL> DB.DBA.RDF_LOAD_RDFXML_MT (file_to_string_output ('antibiotics.owl'), '', 'http://myexample.com'); Now, my question is how do I access the URI myexample.com ? How do I create...

Retrieve owl:restrictions using the OWL API

java,api,owl,protege,owl-api
Good morning, I am working with the OWL API and I am trying to retrieve the data inside of an owl:Restriction. For instance, I am using the pizza ontology and I want to get the data for onProperty and someValuesFrom which is a part of <owl:Class rdf:about="#American"> <rdfs:label xml:lang="pt">Americana</rdfs:label> <rdfs:subClassOf>...

How to read all object properties from Ontology in Java using Jena library?

java,rdf,owl,apache-jena
I want to read all the Object Properties present in the OWL file. I have created that OWL file using Protege tool. I have loaded the model also but I am not able to fetch the object properties. For Example: if I have a class in Ontology named as Car...

Closure axiom for instances so that reasoner can correctly classify instances in ontology

instance,classification,owl,ontology,reasoning
I am a geographer and a new comer in the field of ontology trying to make sense out of these two. Therefore, I have created a simple ontology, as follows: Thing Feature Lane Segment(equivalent to Arc) Geometry Arc (equivalent to Segment) Node Dangling_Node Intersection_node you can find the .owl file...