rdf

Ensure that multiple subjects point to same list of blank nodes

自作多情 提交于 2019-12-23 12:19:35
问题 Consider the following instance of SomeClass : instances:some_thing1 a semapi:SomeClass ; semapi:hasChainTo ( [ ... ] [ ... ] [ ... ] ) . I need every instance ( some_thing2 , some_thing3 , etc.) to have its hasChainTo property point at the same list of blank nodes (as in there is only one copy of it). I need to maintain the list of blank nodes syntax because the chains get very deep and this syntax is very fluid for writing out each chain (for SomeClass2 , SomeClass3 , etc.). If I simply

How to get a concise bounded description of a resource with Sesame?

左心房为你撑大大i 提交于 2019-12-23 09:01:54
问题 I've been testing Sesame 2.7.2 and I got a big surprise when faced to the fact that DESCRIBE queries do not include blank nodes closure [ EDIT: the right term for this is CBD for concise bounded description ] If I correctly understand, the SPARQL spec is quite loose on that and says that what is returned is actually up to the provider, but I'm still surprised at the choice, since bnodes (in the results of the describe query) cannot be used in subsequent SPARQL queries. So the question is: how

The difference between blank nodes and variables in SPARQL queries

狂风中的少年 提交于 2019-12-23 06:59:04
问题 I've studied SPARQL specification on the topic and also found this answer rather interesting. However definitions are complicated enough, so I still don't see the answer for my question. I can't find any example of query with blank nodes that returns different results than the same query with variables in place of blank nodes. For example is there any case when the following queries return different results: SELECT ?a ?b WHERE { ?a :predicate _:blankNode . _:blankNode :otherPredicate ?b . }

jena.query.ResultSet and jena.query.QuerySolution: hasNext() returns alway false after SPARQL request

最后都变了- 提交于 2019-12-23 06:12:22
问题 I have a problem with receiving SPARQL response. The problem is .... when I use the following source code, rs.hasNext() always return false even though the response shouldn't be empty. SPARQL Query: PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?s ?sl <http://dbpedia.org/property/name> ?o ?ol FROM <http://en.dbpedia.org/20120601/> WHERE { ?s rdfs:label ?sl . ?s <http://dbpedia.org/property/name> ?o . ?o rdfs:label ?ol .

Adding age (integer literals) to Jena RDF triples, and querying on them with SPARQL

前提是你 提交于 2019-12-23 05:29:19
问题 I'm trying to learn the basics of working with Jena and RDF Triples. Also working with an Oracle database, so following their guide I have some sample programs running, such as Example7-18 SPARQL OPTIONAL Query. The example works fine as written. It allows for matching queries such as where {?s <u:parentOf> ?o} where {<u:John> <u:parentOf> <u:Mary>} What I'd like to do is give John, Mary and Jill an age each, so that I can query and filter on age as described in SPARQL By Example: The Cheat

Sparql Select Query works on Sesame-Workbench but not on Java

泪湿孤枕 提交于 2019-12-23 05:20:04
问题 I'm trying to create a Sparql-Query to get all messages, that are related to a lecture. I'm new at the whole 'semantic web'-story so be patient if the usage namespace is completely wrong. The query I try to execute is: PREFIX siocNS: <http://rdfs.org/sioc/ns#> PREFIX rdfPred: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX purlPred: <http://purl.org/dc/terms/> PREFIX purlPredLecture: <http://purl.org/<CENSORED>/lecture/> select ?post ?title ?content ?time ?creator where { ?post rdfPred

How to integrate tabular data into GraphDB automatically?

↘锁芯ラ 提交于 2019-12-23 03:36:26
问题 I want to import tabular (xls) data automatically into GraphDB. OntoRefine suits my case very will with the power of OpenRefine and SPARQL. Now, i am thinking about the following approach New tabular data is available as XLS file OntoRefine updates a project or creates a new project automatically SPARQL queries against RDFbridge to create new triples SPARQL Insert to add this triple Is there an alternative approach to automate it? If this is the best, how can i update or create a new

get base namespace from an OWL ontology

混江龙づ霸主 提交于 2019-12-23 02:38:08
问题 Is there a way to get the base namespace from a OWL ontology file, without using DOM or similar, but just using Jena's API? E.g., from an OWL file: <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:protege="http://protege.stanford.edu/plugins/owl/protege#" xmlns="http://www.owl-ontologies.com/Ontology1254827934.owl#" xmlns:xsp="http://www.owl-ontologies.com/2005/08/07/xsp.owl#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns

Problems with inference examples from Apache Jena framework

孤者浪人 提交于 2019-12-23 02:36:10
问题 I have a serious problem to get any reasoner up and running. Also the examples from the documentation: https://jena.apache.org/documentation/inference/ does not work here. I transferred the example into a unit test, so that the problem might be easier reproduced. Is reasoning limited to certain environment like a spatial JDK or so on, or am i getting something wrong? Thanks Here the example code (as java unit test): import static org.junit.Assert.assertNotNull; import java.io.PrintWriter;

is it correct that a class can be an instance?

烂漫一生 提交于 2019-12-23 02:16:10
问题 In this document https://www.w3.org/TR/rdf-schema/#ch_introduction it is written: rdfs:Resource is an instance of rdfs:Class. however it is also written: This is the class of everything is this a typo? can a class be an instance ? 回答1: That's actually an interesting question. I just want to add to your comment in CaptSolo's answer: but can I define my custom classes as instances of an instance? ( i highly doubt that ) It's not so much a question of whether you "can" do something or not (at