问题标签 [blank-nodes]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
325 浏览

sparql - Jena SPARQL 查询结果中没有空白节点

如何创建只返回断言的个人的查询,而不是空白节点(匿名个人)(如果它们存在)?

这是我的 SPARQL 查询:

以下是一些结果(解决方案):

我希望查询只返回前两个结果,而不是最后四个(_:b0、_:b1 等)。这些在我的输入 OWL 文件中不存在。我意识到空白节点可能是因为本体的定义方式,但是有没有办法从查询结果集中消除它们?

我尝试添加:

...但这仍然需要在过滤掉之前计算所有空白节点。不幸的是,似乎有数千个空白节点并且查询永远不会完成。

有没有办法说明

不要费心计算空白节点

?

0 投票
0 回答
180 浏览

sparql - what is the reason for blank nodes in Ontology model that was designed in protege tool

I build an ontology in protege tool which resulting good knowledge representation when seen in webOwl software. But when I listed all triplets using SPARQL query, i was finding huge number of blank nodes. Can any one say the reason. Is there any problem in model or blank nodes are common.

0 投票
1 回答
372 浏览

sparql - 如何删除空白节点及其关联的三元组一个 sparql 查询?

样本数据:

在上述数据中,我想删除classification空白节点及其关联数据,即p0:literature, p0:timePeriod, p0:language

下面的 sparql 查询正在删除与三元组相关的空白节点,这是预期的行为。

我的意思是这个数据

但我也想删除带有主要 IRI 的分类三元组。这些三元组:

我必须删除单个 sparql 中的三元组。

0 投票
0 回答
101 浏览

rdf - 序列化后如何为空白节点保留相同的名称?

我有一个包含空白节点的 RDF 图。什么是最好的库,它在序列化后为空白节点保留与 RDF 文件中给出的名称相同的名称。

0 投票
1 回答
128 浏览

dataset - 具有空白节点的 SPARQL 多数据集

我最近一直在学习 sparql,对空白节点感到困惑。空白节点是否可用于链接来自多个数据集的数据?还是仅用于一个数据集?那么这个空白节点的具体用途是什么?

上面的查询是否已经使用不同的数据集或多个数据集?

0 投票
1 回答
715 浏览

filter - 如何按 BlankNode id 过滤

我正在尝试在GraphDB上的 SPARQL 操场上运行此查询。

?value是 BNode

我正在尝试过滤 BNode ID 为的所有值:_:x1697BD364N0abcdd866d54

我尝试了几种不同的方法来按 ID 过滤:

  1. FILTER REGEX(str(?value), "#bnode-id")
  2. FILTER (?value), "#bnode-id")

但没有一个是成功的。

问题:

  1. 您将如何根据 bnode id 进行过滤?
  2. 可以STR(bnode)吗?
0 投票
2 回答
269 浏览

rdf - 如何知道 RDF 图是否精益?

我刚刚发现了精益图的定义,但我并不总是知道如何定义它,以及是否有人可以向我解释这些图是否精益。

我觉得这很瘦!

G2不瘦!

我不知道XD

而且我不知道XD

提前致谢。

0 投票
1 回答
127 浏览

sparql - 插入数据时,Amazon Neptune 会覆盖空白节点值

将带有空白节点的三元组插入 Amazon Neptune 实例时:

…空白节点的值被替换为b<SOME NUMBER>. 运行这样的查询:

…将返回如下内容:

将数据加载到 Neptune 时,有没有办法保留原始的空白节点名称?

0 投票
1 回答
219 浏览

rdf - How are blank nodes used in the context of understanding RDF triple statements?

I understand that a named node in RDF is a node that has a name (i.e. can be identified by an IRI), and that a blank node is a node that is not named (i.e. not described via an IRI).

Is it correct to say that a node represents a resource in RDF? In this case, both named and blank nodes would be considered resources.

Looking at an RDF schema I see a number of XML tags that seem to represent nodes (both blank and named). For example:

and

(and because this node references another blank node)

It would seem to me that the resources available at this particular API endpoint include these three nodes, one of which is named http://www.w3.org/2001/XMLSchema#float and two of which are blank (node1e2d5tndrx60, node1e2d5tndrx61)

This link - https://lists.w3.org/Archives/Public/public-esw-thes/2004Nov/0061.html - seemingly an old w3.org on the subject of rdf:about vs rdf:ID vs rdf:nodeID mentions that blank nodes are indicated via the rdf:nodeID attribute.

If both these nodes are 'resources' at this particular API endpoint (I assume they are - please let me know if that is incorrect), so far as I know I could never query for a blank node directly, but that in this particular RDF document the blank nodes are being used to constrain what objects are allowed (via the rdf:range property) for a triple that specifies the hasObjectClass property/predicate:

My understanding is that triples using the :hasSomeObjectClass predicate (<subj> <pred> <obj>) will:

  1. Include/can only include subjects that are of rdf:type "SomeObject"
  2. Include/can only include objects that are 'subtyped' of the blank node node1e2d5tndrx60

Lastly, in blank node node1e2d5tndrx60 I see that there is an owl constraint - any allowable object can be considered as part of a list. Presumably a list of objects that share a particular class?

Question

Looking at the domain property of the hasSomeObjectClass resource, I am able to find:

  1. A node that represents the SomeObject class
  2. Many nodes that have the rdfs:subClassOf property and that reference SomeObject as the resource

So in terms of how a triple specification is resolved in which the predicate specifies a domain of this type, I understand conceptually how that can be enforced/resolved.

However I can't see a link between the blank node and how the range constraint could be enforced/resolved. Is it easy to explain on a conceptual level how blank nodes are used in terms of resolving specified triples?

I'm very, very new to the world of Linked Data. Please let me know how this question could be improved on!

0 投票
1 回答
89 浏览

graphdb - 为什么空白节点不作为链接显示在资源页面上?也不显示在可视图表上?

Ontotext GraphDB 9.1.1,免费版 Centos7 3.10.0-1062.9.1.el7.x86_64

我的一个图表包含这样的空白节点:

当我在Explore/Graphs Overview中搜索 John 以获取默认图时,会显示三元组,并且主题 :John 有一个名为 _:node3 的对象。

但是,该对象显示为文本,而不是像 :John 这样的资源链接。

然后我单击:John 的Visual Graph,没有显示任何内容。我尝试了Advanced Graph Configuration,也失败了。

我找到了一些使用CONCAT合并对象的解决方案,但这还不够优雅。

我期望的是空白节点可以显示在OverviewVisual Graph上。

无论什么版本的graphDB都有可能吗?

谢谢!