owl

How to query Classes with Object Property in Sparql

安稳与你 提交于 2019-11-29 18:23:15
问题 Does any one know how to query Classes with Object Property in Sparql? Assume we have an OWL file which contains follows Human ----(hasPizza)---> Pizzas Human and Pizzas are classes (or concepts). In SPARQL, this query returns nothing: select ?x ?y where { ?x hasPizza ?y } But if I add two individuals (or entities) under those concepts like Human:Jim ----(hasPizza)---> Pizzas:cheesePizza that query will return ?x=Jim and ?y=cheesePizza How can I get ?x=Human and ?y=Pizza using SPARQL? 回答1:

Check if an underlying representation is OWL or RDFS

旧时模样 提交于 2019-11-29 16:21:28
Imagine you are querying a data source via an SPARQL endpoint and you want to know if the underlying representation of this data source is OWL or RDF/XML. Is there anyway that you would be able to do that via a SPARQL query? My personal line of thought was to write a query that uses one of the OWL properties and see if that returns any result, however the disadvantage of using such approach is that if you use an OWL property that doesn't appear in the data source even if the underlying representation is OWL you would not get a response. The assumption here is that your don't have access to the

How do I find where Sesame stores repositories?

試著忘記壹切 提交于 2019-11-29 12:59:17
I'm using booth Sesame .wars in Tomcat 7 on OS X 10.8, but now it doesn't work any more. I set up a new Tomcat with two new Sesame .war but now it uses the old repository. Where are these stored? (Couldn't add a new Repo or delete the old one). Sesame Server by default stores its configuration data and database files in %APPDATA%\Aduna on Windows, $HOME/.aduna on Linux, and $HOME/Library/Application Support/Aduna on Mac OS X. If you want a completely new install, simply delete this directory. See the Sesame manual for more info. Update you can check where your Sesame server installation stores

Getting error in executing OWL API

天涯浪子 提交于 2019-11-29 12:44:34
I am trying to execute following code. import java.io.File; import org.semanticweb.owlapi.apibinding.OWLManager; import org.semanticweb.owlapi.model.AddAxiom; import org.semanticweb.owlapi.model.IRI; import org.semanticweb.owlapi.model.OWLAxiom; import org.semanticweb.owlapi.model.OWLClass; import org.semanticweb.owlapi.model.OWLDataFactory; import org.semanticweb.owlapi.model.OWLOntology; import org.semanticweb.owlapi.model.OWLOntologyCreationException; import org.semanticweb.owlapi.model.OWLOntologyManager; public class Snippet { public static void main(String[] args) throws

Fuseki how to add Pellet reasoner

主宰稳场 提交于 2019-11-29 12:41:47
I want to use pellet reasoner with my Fuseki 2.3.1 First: I added Pellet reasoner to my config.ttl as this: ja:reasoner [ ja:reasonerClass "org.mindswap.pellet.jena.PelletReasonerFactory";] So now I have to add the jar for Pellet to fuseki This page explains how to add jars (not specificaly pellete) to fuseki https://jena.apache.org/documentation/permissions/example.html So I commet this line exec $JAVA $JVM_ARGS -jar "$JAR" "$@" and I uncommet this line java $JVM_ARGS -cp "$JAR:$APPJAR" org.apache.jena.fuseki.cmd.FusekiCmd "$@" and uncomment the line that starts with APPJAR= now I still need

Sparql query on restriction list (Equivalent To) in protégé

喜欢而已 提交于 2019-11-29 12:05:22
My ontology is about Cocktail. This is a cocktail named "AfterGlow" <owl:Class rdf:about="&cocktails;AfterGlow"> <owl:equivalentClass> <owl:Class> <owl:intersectionOf rdf:parseType="Collection"> <owl:Restriction> <owl:onProperty rdf:resource="&cocktails;aPourIngredient"/> <owl:someValuesFrom rdf:resource="&cocktails;JusAnanas"/> </owl:Restriction> <owl:Restriction> <owl:onProperty rdf:resource="&cocktails;aPourIngredient"/> <owl:someValuesFrom rdf:resource="&cocktails;JusOrange"/> </owl:Restriction> <owl:Restriction> <owl:onProperty rdf:resource="&cocktails;aPourIngredient"/> <owl

How to Define My Own Ranges for OWL DataProperties

十年热恋 提交于 2019-11-29 08:03:10
I have recently started learning Web Ontology Language (OWL). I want to define a DataProperty with my own defined range of value. Consider the following property: <owl:DatatypeProperty rdf:ID="myProperty"> <rdfs:domain rdf:resource="#MyDomain"/> <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#double"/> </owl:DatatypeProperty> The property has the range of double value but I want to restrict the range in order to make my property to accept only double values between 0 and 1. I would be very grateful if you guide me how to define my own ranges for data properties. Here you go (in

setTimeout does not work

社会主义新天地 提交于 2019-11-29 07:42:52
I want to load an OWL file before executing other (visualisation-)scripts. To do this I tried everything from $(document).ready to function visualize (file) { if (!file) {setTimeout(visualize(file), 2000)} else {jQuery(function($){visFeaturePool.init(file)})}} I think it has to be possible with the setTimeout but that isn't working. I throws the error: Uncaught RangeError: Maximum call stack size exceeded, so it doesn't wait, it just recalls the visualize function untill the stack is full. Does anybody know what I am doing wrong? Thanks! Instead of // #1 setTimeout(visualize(file), 2000); you

How to import specific classes and object properties from an ontology in Protege?

依然范特西╮ 提交于 2019-11-29 05:12:16
I want to import some classes in Protege from different ontologies to my ontology. For example, I need the classes foaf:Person , org:Site , vcard:Organization , and many more. I don't want to create them by myself (and modifying their IRI). When I did import the whole ontology (Schema.org, vCard, FOAF, …), I had many elements that I don't need. Is there any way to do it? — Have you looked at this thread: protege-project.136.n4.nabble.com/… — I tried to use it, but it didn't work. There are subtle moments, especially on step 5. Open your target ontology. Open the source ontology in the same

OWL's EquivalentClass vs. SubClassOf

谁说我不能喝 提交于 2019-11-28 21:39:21
What is the difference between EquivalentClass and SubClass of? While reading through OWL primer, i find the tutorial uses SubClassOf a lot to declare a new class, as follows SubClassOf( :Teenager DataSomeValuesFrom( :hasAge DatatypeRestriction( xsd:integer xsd:minExclusive "12"^^xsd:integer xsd:maxInclusive "19"^^xsd:integer ) ) ) Can I write EquivalentClass( :Teenager DataSomeValuesFrom( :hasAge DatatypeRestriction( xsd:integer xsd:minExclusive "12"^^xsd:integer xsd:maxInclusive "19"^^xsd:integer ) ) ) instead? When stating that A is a subclass of B , this restricts A to necessarily inherit