REST和RDF,表示策略是什么?

发布于 2024-08-14 03:14:56 字数 276 浏览 3 评论 0原文

您的 Triplestore 包含许多节点,您必须通过 REST 接口访问该数据库。

现在,我的解决方案是将每个命名(非匿名)节点导出为资源,其表示形式为:

  1. 以该节点作为主题的所有三元组
  2. 以该节点作为对象的所有三元组
  3. 所有连接的匿名节点。

我对第二点有点不情愿:这基本上会给出传入和传出的三元组。

您对纯粹面向 RDF 的数据存储的 REST 风格表示有何看法? 您是否同意我的观点?如果不同意,您对此有何看法?

Your triplestore contains a lot of nodes, and you have to make accessible this database via a REST interface.

Now, my solution would be that every named (not-anonymous) node is exported as a resource, whose representation is:

  1. all the triples having the node as a subject
  2. all the triples having the node as an object
  3. all the connected anonymous nodes.

I am a little reluctant on point number 2: this would basically give both incoming and outgoing triples.

What is your take on a REST sytle representation of a purely RDF-oriented data store ?
Do you share my point of view or not, and if not, what is your take on it ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

薯片软お妹 2024-08-21 03:14:56

取决于数据是什么以及界面用户想要用它做什么。此问题与 SPARQL DESCRIBE 查询表单应返回的问题类似。 (它是由实现决定的。)

对于我使用 RDF 数据的用例,我会使用 1 和 3,生成资源的空白节点闭包。此外,对于情况 2,您可以有一个单独的接口,返回资源的传入弧。

Depends on what the the data is and what the interface users want to do with it. This question is similar to what the SPARQL DESCRIBE query form should return. (It's determined by the implementation.)

For the use cases I've had with RDF data, I'd go with 1 and 3, producing a blank node closure of the resource. Additionally, you could have a separate interface for case 2, returning the incoming arcs of the resource.

作死小能手 2024-08-21 03:14:56

使 RDF 数据集 REST 可遍历的一种简单方法是对所有可遍历元素使用 URL。

当 URL 被访问时,例如通过 HTTP GET,结果会显示连接的节点(作为属性和/或反向属性连接)。

更正式地说,返回的表示可以是资源的简洁有界描述

One easy way to make an RDF dataset REST traversible is to use URLs for all traversible elements.

When the URL is accessed, for example via HTTP GET, then result shows the connected nodes (connected as properties and/or inverse properties).

More formally the returned representation could be a Concise Bounded Description of the resource.

伴梦长久 2024-08-21 03:14:56

(免责声明:这可能与您问题的内容不完全对应,但它对应于标题)

我认为关于RDF数据的Rest表示的主题是一个颠倒概念顺序的普遍问题。对我来说,正常情况是拥有包含 RDF 数据的 Rest 文档集合,并使用 RDF 数据库进行索引和进行全局查询。

在这种情况下,您可以按照您喜欢的方式组织资源。

另外(如果您假装使用节点的 URI 作为导出的资源),您的方法将会对资源的含义产生微妙的问题:您在此处建议的其余资源是“信息资源" 那么它们就不能是抽象资源。信息和元信息之间会存在冲突。

我在此处发表了一篇文章解释了这一观点更多细节。

(disclaimer: this may not correspond exactly to the content of your question, but it corresponds to the title)

I think that about the topic of Rest representation of RDF data is a general problem of inverting the order of concepts. For me the normal would be to have a collection of Rest documents with RDF data and use a RDF database for indexing and making global querys.

In this situation you can organize your resources in the way you prefer.

Also (if you pretend to use the URI of the node as the exported resource) your approach will have subtle problems about what is the meaning of your resources: the Rest resources you propose here are "information resources" and then they cannot be abstract resources. There will be a conflict between information and meta-information.

I published an article here explaining this view in more detail.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文