FAQ Database Discussion Community


Define extra properties for an existing class in RDFS?

semantic-web,ontology,schema.org,rdfs
I want to create a RDFS schema about venue info which contains for example: address info and xxx info. I find another schema about it:https://schema.org/Place. It contains more properties about address info but no info about xxx. So Should I make my schema venue as a subclass of https://schema.org/Place and...

Error while querying DBPedia using Apache Jena

java,sparql,semantic-web,dbpedia,apache-jena
import java.sql.ResultSet; import java.sql.SQLException; import com.hp.hpl.jena.query.QueryExecution; import com.hp.hpl.jena.query.QueryExecutionFactory; import com.hp.hpl.jena.query.QueryFactory; import com.hp.hpl.jena.query.QuerySolution; import com.hp.hpl.jena.query.ResultSetFormatter; public class sparq { public static void main (String[] args) throws SQLException { String queryString= "PREFIX dbpedia: <http://dbpedia.org/resource/>"+ "PREFIX category: <http://dbpedia.org/resource/Category:>"+ "PREFIX skos:...

SPARQL - Max() isn't working

sparql,semantic-web,protege
I'm trying to execute this SPARQL query in PROTEGE 2000, but the MAX function isn't working. it's like Max() isn't accepting the type of ?cpt. SELECT ?searcher (COUNT(?publication) AS ?cpt) WHERE {ont:GradeP ont:isFor ?searcher. ?publication ont:isPublishedBy ?searcher.} GROUP BY ?searcher HAVING (MAX(?cpt)) here's the exception : SparqlReasonerException: org.openrdf.query.QueryEvaluationException: Unsupported value...

How to create a dynamic JSONObject?

java,semantic-web,jsonobject
I have a little problem I've write a code that create an object from JSONObject and add some data on it like this: JSONObject outerObject = new JSONObject(); JSONArray outerArray = new JSONArray(); JSONObject innerObject1 = new JSONObject(); innerObject1.put("id", "semantic web"); innerObject1.put("url", "www.semanticweb.com"); innerObject1.put("definition", "this is the denfition of semantic...

Describe a film (entity and attribute) using the first order logic

logic,semantics,semantic-web,first-order-logic
Good morning, I want to understand how can I describe something using the first order logic. For example I want to describe what is a film (an entity) and what is an attribute (for example actor: Clooney) for the film. How can I describe that using the first order logic?...

verify an example about how the rdf and rdfs related?

rdf,semantic-web,rdfs
There are similar questions and answers. However, none of previous gave examples. Here is rdfs code. <?xml version="1.0"?> <rdf:RDF xmlns:rdf= "http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xml:base= "localhost:3000/animal#"> <rdfs:Class rdf:ID="animal" /> <rdfs:Class rdf:ID="horse"> <rdfs:subClassOf rdf:resource="#animal"/> </rdfs:Class> </rdf:RDF> It was hosted on localhost:3000/animal. Here is rdf code. <?xml version="1.0"?> <rdf:RDF...

year() function in SPARQL

rdf,sparql,jena,semantic-web
I want to make a query in SPARQL that returns items of the year 2007. I tried this : String requete7String = "PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> " + "PREFIX dc: <http://purl.org/dc/elements/1.1/> " + "PREFIX rss: <http://purl.org/rss/1.0/> " + "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> " + "SELECT ?item " + "FROM <http://www.w3.org/2001/sw/SW-FAQ-feed.rdf> " +...

Storing separately individuals and ontology in sesame store

sparql,semantic-web,sesame
I have an ontology that I imported in a sesame repository. I want to add individuals for the classes that are defined in my ontology. Is it possible to add the individuals into another repository and not in the one that has stored the ontology? If this is possible how...

Child properties of Schema.org property

seo,semantic-web,schema.org,microdata,google-rich-snippets
I've been trying to figure out this riddle from a day now. Lets say that we have a TV Episode as following, <main itemscope itemtype="https://schema.org/TVEpisode"> <h1> <a itemprop="url" href="self.html"> Pokemon - <span itemprop="episodeNumber">88</span> </a> </h1> <h2 itemprop="name">In the Pink</h2> <p>Source: <span itemprop="partOfSeries">Pokemon</span> <span itemprop="partOfSeason">Orange Islands</span> </p> </main> Now the problem...

OWL-API 4.0.1 compatiable pellet reasoner?

jena,semantic-web,owl-api,pellet
I was using OWL-API version 4.0.1 together with Pellet reasoner version 2.3.6 as can be seen in the extracted from pom file maven dependency section below <dependency> <groupId>net.sourceforge.owlapi</groupId> <artifactId>owlapi-api</artifactId> <version>4.0.1</version> </dependency> <dependency> <groupId>net.sourceforge.owlapi</groupId> <artifactId>owlapi-apibinding</artifactId> <version>4.0.1</version> </dependency> <dependency>...

Why do we need Fuseki Server?

sparql,jena,semantic-web,fuseki,tdb
I am developing an application, which is using triple store (Jena TDB). It is clealy mentioned that TDB Supports SPARQL update and Query. Also, I understood that Fuseki is SPARQL server, that supports Update and Query as well. I do not find answer do the following questions: If TDB supports...

Sparql query on DbPedia return not repeated objects

python,sparql,semantic-web,dbpedia,sparqlwrapper
I'm trying to execute this Sparql query on the DBPedia but it seems to ignore the DISTINCT: SELECT DISTINCT ?source ?title ?content ?topic WHERE { ?source rdfs:label ?title ; <http://dbpedia.org/ontology/abstract> ?content ; foaf:isPrimaryTopicOf ?topic . ?title bif:contains "php" . } In fact if you try to run the query the...

Add RDFa using my own RDF Schema

rdf,semantic-web,rdfs,rdfa
I want to create an RDFS ontology describing some specific classes and properties. Then I want to add RDFa into HTML with the vocabulary I defined in RDFS. I know that we need to provide a URL to the vocabulary in RDFa, but I am not sure where to put...

Can I mix skos properties with rdfs properties to define a class?

syntax,rdf,semantic-web,rdfs,skos
To specify a rdfs:Class and organize an ontology, I want to use SKOS. Curently I define my classes using RDFS properties : :MyClass a rdfs:Class; rdfs:label "my label"; rdfs:comment "this is a comment"; . Can I define :MyClass as a skos:Concept with SKOS properties and RDFS porperties ? I would...

How do I use a database that I have in my backup on Cubicweb?

python,postgresql,semantic-web
I have my backup in the following path: /etc/cubicweb.d/myblog/backup And I want to work with it in local, How can I use it when creating my database?...

dotNetRDF Http Error when querying DBPedia

c#,semantic-web,dbpedia,dotnetrdf
I am new to dotNetRDF and SPARQL and I'm trying to retrieve some person data from DBPedia. I have wrote this query and tested it successfully on the online editor at http://dbpedia.org/sparql : The problem is that when I try to launch the query using the code below, I get...

Represent class and properties with RDFS

xml,rdf,semantic-web,rdfs
I want to represent this with RDFS: - A book has a title and an author - An author has a name I tried this: <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" > <rdf:Description rdf:ID="Book"> <rdf:type rdf:resource="http://www.w3.org/…/rdf-schema#Class"/> </rdf:Description> <rdf:Property rdf:ID="titleBook"> <rdfs:domain rdf:resource="#Book"/> <rdfs:range rdf:resource="xmlns:rdfsLiteral"/> </rdf:Property> <rdf:Property...

Apache Jena save ontology file then opening it in Protégé2000

java,jena,semantic-web,ontology,protege
I opened my ontology .owl (already created in protégé2000 v5) in Protégé2000 v5. Then using java Apache Jena Framework, i save the same ontology on the same file (without any modifications done). I go back to Protégé2000 Which asks me to reload the ontology because it was modified by another...

sparql - use of curly braces

rdf,sparql,semantic-web
Hello I have a simple question regarding sparql queries. does the curly braces have any effect in where clause ? For ex: Is there a difference between { ?s1 ab:wasBornIn "Berlin". ?s1 ?p1 ?o1 } { ?s2 ab:someProperty "SomeLiteral". ?s2 ?p2 ?o2 } AND { ?s1 ab:wasBornIn "Berlin". ?s1 ?p1...

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...

semantic web rule use “all”

jena,semantic-web,jena-rules
Assume that I have the following statements: A p B, A p C, B p C ( p is a symmetric property, i.e. B p A, C p A and C p B) A v 2, B v 1, C v 1, I want to use a rule to do...

By using protege can we store & retrieve data's like we doing it on relational database?

semantic-web,ontology,protege
Hi I very new to semantic web and Protege. Can we store and retrieve data in Protege like we do in relational database? Or can we manipulate only models? if yes, do we need RDBMS for storing data and use Protege to manage the relationship?. Can we use protege as...

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...

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...

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...

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...

converting freebase MQL to SPARQL

rdf,sparql,semantic-web,freebase,mql
following freebase MQL finds 5 artists and 50 albums for each artists. [{ "type" : "/music/artist", "name":null, "album" : [{ "name" : null, "count":null, "limit":50 }], "limit":5 }] first try - without a subquery I can write SPARQL like this: SELECT ?artist ?album WHERE { ?artist :type :/music/artist . ?artist...

Sparql Construct on a service

rdf,sparql,semantic-web
Is it possible to perform a sparql construct out of a Where clause on a remote enpoint ? CONSTRUCT { ?idbcountry skos:definition ?def . } WHERE { ?idbcountry a skos:Concept . ?idbcountry rdfs:label ?label . FILTER(lang(?label) = "en") Service <http://dbpedia.org/sparql> { ?s a <http://dbpedia.org/ontology/Country> . ?s rdfs:label ?label . ?s...

Protege Equivalent to query

sparql,semantics,semantic-web,protege4
Please help to list all Mealcourse from the wine Ontology or happy to receive useful links like this one :Sparql query on restriction list (Equivalent To) in protégé MealCourse and (hasFood value Pizza) and(hasDrink value Wine) Thank you...

Performing semantic analysis in text

nlp,semantic-web
I want to perform semantic analysis on some text similar to YAGO[1]. But I have no structure in the text to identify entities and relationships. One way is I use POS tagging and then identify subject and predicates in the sentences[2]. But still I cannot establish what relationships exist between...

SPARQL algebra: Excluding nodes based on triples they have

sparql,semantic-web,linked-data,turtle,triples
Take this graph: :thing1 a :Foo ; :has :A ; :has :B . :thing2 a :Foo ; :has :B ; :has :A . :thing3 a :Foo ; :has :A ; :has :B ; :has :C . I want to select :thing1 and :thing2, but NOT :thing3. Here is the SPARQL...

When to use the subclass in RDFS?

semantic-web,schema.org,rdfs
I want to create a RDFS schema about venue info which contains for example: only photo and address info. I find another schema about it: https://schema.org/Place. It contains more properties than I need. So, should I make my schema venue as a subclass of https://schema.org/Place? Or I just make a...

What is Semantic Wiki?

php,semantics,wiki,semantic-web,semantic-mediawiki
I am a PHP Developer and completely new about the terms like Semantic Web, Semantic Wiki, Semantic MediaWiki etc. Got the work requirement about Semantic Wiki couple of days before and then I explored lot about it but didn't get exact idea about it. Still confused..!!! and I've some doubt...

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...

How can I restrict a data property to an exact value in Protege OWL 2?

semantic-web,protege4
I'm taking a course in Semantic Web and I'm finding myself a little confused. I've defined a base class named A and specified that (hasType exactly 1 integer). I want to declare different subclasses that each have a different type. For instance B is subclass of A and hasType equal...

Virtuoso 37000 Error SP030

sparql,semantics,semantic-web,virtuoso
why is showing this error, i see in the sparql query is correct, i don't see any mistake in prefix. PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> PREFIX type: <http://dbpedia.org/class/yago/> PREFIX prop: <http://dbpedia.org/property/> SELECT ?country_name ?population WHERE { ?country rdf:type dbpedia-owl:Country; rdfs:label ?country_name ; prop:populationEstimate ?population . FILTER (?population > 2334456) . FILTER ( lang(?country_name)...

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 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...

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é?

redefine and declare property in RDFS

semantic-web,schema.org,rdfs
I want to create a RDFS schema about venue info which contains for example: address info. I find another schema about it:https://schema.org/Place which has the property address info. The first question is can I declare the Venue also has the property of address? I already know that I can use...

SPARQL - Order By “duplicates”/“rename” property, why?

order,rdf,sparql,semantic-web,virtuoso
In my Virtuoso (07.00.3203) SPARQL endpoint: http://opendata.caceres.es/sparql If I make this simple query: select ?uri ?label ?itineraPaso where { ?uri a om:Procesion. ?uri rdfs:label "Amor el jueves santo."@es . ?uri om:itineraPaso ?itineraPaso. ?itineraPaso rdfs:label ?label. } order by (?label) I get this output: It is like the labels of the...

How to access parent properties of a child class in rdf with sparql?

inheritance,rdf,sparql,semantic-web,rdfs
I'm trying to access to the property inherited of a parent class in RDF. I define an instance of my child class using the rdfs property subClassOf. With a turtle syntax : ex:myClass1 a owl:class; rdfs:range xsd:integer. ex:myClass2 rdfs:subClassOf ex:myClass1. # defining instance of my class ex:instance1 ex:myClass1 1 ....

Way to dump the relations from Freebase?

nlp,semantic-web,freebase,dbpedia,wikidata
I have ran through the Google API for Freebase, but still confusing. Is there simple way to dump the relations from Freebase? I want to dump all entity-name-pair with a specific relation (e.g. marry_with, ...), and also want the chinese entity names. Should I write MQL to query all entity...

Get value from a SPARQL query

rdf,sparql,semantic-web,rdfa
The following query is sufficient for me to get the name of a recipe and the amount of ingredients in it. I would like to get the ingredients in the recipe as well. How can I modify my query to do this? PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX rdfs:...