rdf

Difference Between OWL-LIST and RDF-LIST

纵饮孤独 提交于 2019-12-30 11:51:20
问题 I cannot understand the difference between OWL-LIST and RDF-LIST. Secondly why OWL-DL do not support RDF-LIST due to OWL serialisation why? and how i can create OWL-LIST in OWL-DL 回答1: As mentioned in the comments, I don't think that there is any standard thing called OWL-LIST. There is a CO-ODE List Ontology that might be of interest to you if you need to represent lists in OWL: Description A set of entities used to describe the OWL list pattern. (see http://owl-workshop.man.ac.uk

Difference Between OWL-LIST and RDF-LIST

百般思念 提交于 2019-12-30 11:51:15
问题 I cannot understand the difference between OWL-LIST and RDF-LIST. Secondly why OWL-DL do not support RDF-LIST due to OWL serialisation why? and how i can create OWL-LIST in OWL-DL 回答1: As mentioned in the comments, I don't think that there is any standard thing called OWL-LIST. There is a CO-ODE List Ontology that might be of interest to you if you need to represent lists in OWL: Description A set of entities used to describe the OWL list pattern. (see http://owl-workshop.man.ac.uk

Why is this DL-Query not returning any individuals?

一世执手 提交于 2019-12-30 09:51:12
问题 This DL-Query is not returning any individuals: Query (Protégé syntax) : hasPet exactly 1 DomesticAnimal Here's part of the ontology: :hasPet a owl:ObjectProperty; rdfs:domain :Human; rdfs:range :DomesticAnimal; owl:inverseOf : petOf; :Joe a :Human; hasPet :Lassy. :Bob a :Human; hasPet :Sparkey, Lucky. Queries: petOf value Bob returns Sparkey and Lucky petOf value Joe returns Lassy hasPet exactly 1 returns nothing. Why isn't the last query returning Joe ? I have tried it with in Protégé with

How to retrieve XML/RDF data from a dbpedia link or URL?

旧巷老猫 提交于 2019-12-30 07:14:32
问题 Recently I have been trying to learn Semantic Web. For a project I need to retrieve data from a given dbPedia link. e.g http://dbpedia.org/page/Berlin . But when retrieve data using java.net.URLConnection I get the html data. How can I get the xml from the same link ? I know that there is link in every dbpedia page to download the XML but that is not what I want to do. Thanks in advance. 回答1: Note that the URI of the resource is actually http://dbpedia.org/resource/Berlin (with resource , not

How to retrieve XML/RDF data from a dbpedia link or URL?

血红的双手。 提交于 2019-12-30 07:13:01
问题 Recently I have been trying to learn Semantic Web. For a project I need to retrieve data from a given dbPedia link. e.g http://dbpedia.org/page/Berlin . But when retrieve data using java.net.URLConnection I get the html data. How can I get the xml from the same link ? I know that there is link in every dbpedia page to download the XML but that is not what I want to do. Thanks in advance. 回答1: Note that the URI of the resource is actually http://dbpedia.org/resource/Berlin (with resource , not

RDF Graph Entailment

狂风中的少年 提交于 2019-12-30 06:20:29
问题 I just read about the concept of entailment for RDF (Resource Description Framework).Can anyone tell me an example of entailment for two RDF graphs and explain them a bit. Thanks 回答1: Suppose you have the following : ex:book1 rdf:type ex:Publication . ex:book2 rdf:type ex:Article . So a Sparql query like SELECT ?s { ?s rdf:type ex:Publication } will return only ex:book1 If you add the fact (or a graph in your data set with the fact) that states : ex:Article rdfs:subClassOf ex:Publication If

exploratory SPARQL queries?

不打扰是莪最后的温柔 提交于 2019-12-28 01:42:13
问题 whenever i start using sql i tend to throw a couple of exploratory statements at the database in order to understand what is avaliable, and what form the data takes. eg. show tables describe table select * from table could anyone help me understand the way to complete a similar exploration of an rdf datastore using a SPARQL endpoint? Thanks :) 回答1: Well, the obvious first start is to look at the classes and properties present in the data. Here is how to see what classes are being used: SELECT

Query DBpedia with Sparql using VALUES

邮差的信 提交于 2019-12-25 18:43:27
问题 When I run this code in java I am getting error, I think the error occurred because of "String values". I am not sure about adding it but I got this idea from my previous question's answer which I asked in this site Query DBpedia to get abstract for different inputs public static void DbpediaResultSparql() { String values = "New York"; String service = "http://dbpedia.org/sparql"; String sparqlQueryString2 = "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>"+ "PREFIX dbpedia-owl: <http:/

SPARQL: Choose one triple from multiple match?

左心房为你撑大大i 提交于 2019-12-25 18:25:28
问题 I have a kind of interesting problem with SPARQL query. I am querying for a triple and I have multiple match - maybe 2. But I need the code to choose only one. It absolutely doesn't matter which one. For example: I am querying for a book for 5-years old and it founds 2 books in the database but I need to have only one saved in variable (doesn't matter which one). Is this even possible in SPARQL? Please let me know if you need any other information. Thank you all in advance for your time! The

empty ResultSet on second query (despite valid results with first)

岁酱吖の 提交于 2019-12-25 18:13:12
问题 public class MainClass { public static void main(String[] args) { MainClass c = new MainClass(); c.getType("m.012x34"); System.out.println("---------------"); MainClass c1 = new MainClass(); c1.getType("m.012x34"); } public String getType(String mid){ String Type = null; try{ InputStream inputStream = null; Resource resource = null; File automake_triples = new File(".\\automake_triples.ttl"); ArrayList<String> products = new ArrayList<String>(); InputStream in = new FileInputStream(automake