blank-nodes

How to filter by BlankNode id

家住魔仙堡 提交于 2020-06-27 17:07:50
问题 I'm trying to run this query in the SPARQL playground on GraphDB . select * where { ?s content:value ?value . FILTER REGEX(str(?value), "_:x1697BD364N0abcdd866d54") } ?value are BNodes I'm trying to filter all values where the BNode ID is: _:x1697BD364N0abcdd866d54 I've tried a few different ways to filter by the ID: FILTER REGEX(str(?value), "#bnode-id") FILTER (?value), "#bnode-id") but none was a success. Questions: How would you filter based on a bnode id? Is it possible to STR(bnode) ?

How to filter by BlankNode id

血红的双手。 提交于 2020-06-27 17:07:20
问题 I'm trying to run this query in the SPARQL playground on GraphDB . select * where { ?s content:value ?value . FILTER REGEX(str(?value), "_:x1697BD364N0abcdd866d54") } ?value are BNodes I'm trying to filter all values where the BNode ID is: _:x1697BD364N0abcdd866d54 I've tried a few different ways to filter by the ID: FILTER REGEX(str(?value), "#bnode-id") FILTER (?value), "#bnode-id") but none was a success. Questions: How would you filter based on a bnode id? Is it possible to STR(bnode) ?

How to filter by BlankNode id

安稳与你 提交于 2020-06-27 17:07:12
问题 I'm trying to run this query in the SPARQL playground on GraphDB . select * where { ?s content:value ?value . FILTER REGEX(str(?value), "_:x1697BD364N0abcdd866d54") } ?value are BNodes I'm trying to filter all values where the BNode ID is: _:x1697BD364N0abcdd866d54 I've tried a few different ways to filter by the ID: FILTER REGEX(str(?value), "#bnode-id") FILTER (?value), "#bnode-id") but none was a success. Questions: How would you filter based on a bnode id? Is it possible to STR(bnode) ?

How to filter by BlankNode id

眉间皱痕 提交于 2020-06-27 17:07:07
问题 I'm trying to run this query in the SPARQL playground on GraphDB . select * where { ?s content:value ?value . FILTER REGEX(str(?value), "_:x1697BD364N0abcdd866d54") } ?value are BNodes I'm trying to filter all values where the BNode ID is: _:x1697BD364N0abcdd866d54 I've tried a few different ways to filter by the ID: FILTER REGEX(str(?value), "#bnode-id") FILTER (?value), "#bnode-id") but none was a success. Questions: How would you filter based on a bnode id? Is it possible to STR(bnode) ?

Grouping by blank nodes

拥有回忆 提交于 2020-03-03 05:41:21
问题 I have the following data: @prefix f: <http://example.org#> . _:a f:trait "Rude"@en . _:a f:name "John" . _:a f:surname "Roy" . _:b f:trait "Crude"@en . _:b f:name "Mary" . _:b f:surname "Lestern" . However, if I execute the following query in Blazegraph : PREFIX f: <http://example.org#> SELECT ?s ?o WHERE { ?s f:trait ?o . } I get six results: s o t32 Crude t37 Crude t39 Crude t31 Rude t36 Rude t38 Rude If blank nodes _:a and _:b are distinct nodes, how should I write a SPARQL query to

SPARQL Query to delete all blank nodes with in a Resource

筅森魡賤 提交于 2020-01-06 06:31:27
问题 I am writing a SPARQL query that should delete all triples within in this resource. prefix oslc: <http://open-services.net/ns/core#> prefix example: <http://rdf.company.com/ns/something/net#> prefix xsd: <http://www.w3.org/2001/XMLSchema#> prefix dcterms: <http://purl.org/dc/terms/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> example:Resource2 a oslc:ResourceShape ; oslc:describes example:Resource2 ; oslc:property [ a oslc:Property ; oslc:isMemberProperty true ; oslc:name "pgn"

RDFLib Blank Node Printing

早过忘川 提交于 2019-12-24 09:39:37
问题 I have an RDF dataset where triples are stored in N-Triples format like follows: <http://ebola.ndssl.bi.vt.edu/country/1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://ebola.ndssl.bi.vt.edu/vocab/country> . _:AmapX3aXcountryX5fXcountryX5fXnameX5fXclassMapX40XX40X1 <http://ebola.ndssl.bi.vt.edu/vocab/hasValue> "Guinea" . I want to do some processing with the blank nodes. I am writing a program to reading this file in Python. I am using Python RDFLib library. After reading the file,

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