REST和RDF,表示策略是什么?
您的 Triplestore 包含许多节点,您必须通过 REST 接口访问该数据库。
现在,我的解决方案是将每个命名(非匿名)节点导出为资源,其表示形式为:
- 以该节点作为主题的所有三元组
- 以该节点作为对象的所有三元组
- 所有连接的匿名节点。
我对第二点有点不情愿:这基本上会给出传入和传出的三元组。
您对纯粹面向 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:
- all the triples having the node as a subject
- all the triples having the node as an object
- 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
取决于数据是什么以及界面用户想要用它做什么。此问题与 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.
使 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.
(免责声明:这可能与您问题的内容不完全对应,但它对应于标题)
我认为关于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.