djangonic的方式处理rdf? [英] djangonic way to deal with rdf?

查看:139
本文介绍了djangonic的方式处理rdf?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个django的RDF项目,我找不到任何活动。

I was looking for an RDF project for django and I cant find any active.

这似乎是一个很好的一个 http://code.google.com/p/django-rdf ,但最后一次提交是在2008年(4年前) )。 Google群组似乎被放弃了。最后一个垃圾邮件是在2008年。
因此它不支持新的django版本。

This seems to be a good one http://code.google.com/p/django-rdf, but the last commit was in 2008, (4 years ago). The group in google-groups seems to be abandoned. Last no-spam post was in 2008. Therefore it has no support for new django versions.

是否有任何图书馆或一些预建的开源应用程序轻松公开rdf数据?

Is there any library or some prebuilt open source app to easily expose rdf data?

也许很容易解决,就像编写一个视图,并使用 https://github.com/RDFLib/rdflib 在一行或两行代码中,但我无法确定如何做...

Maybe is easy to solve, like writing a view and returning something using https://github.com/RDFLib/rdflib in one or two lines of code, but I can't figure it out how to do it...

使用RDFlib的想法是使用django对象或对象集合,以某种方式将其转换为rdf,也许使用rdf解析器。

The idea using RDFlib would be to take a django object or collection of objects and transform it to rdf in some way, maybe using an rdf parser.

我以为如果客户端请求accept:text / html和RDF,如果用户使用rdf + xml或rdf + turtle的html accept标头请求同一页面,我可以给出html响应(并且它可能存在一个处理我的应用程序)

I thought I could give html responses if the client request "accept:text/html", and RDF if the user requested the same page using a html accept header with rdf+xml or rdf+turtle (and it could exist an app that handles that for me)

推荐答案

从我读过的RDF的一小部分,你可能要做手工工作g和Django模型中有意义的RDF语句,因为它不是像JSON这样的简单的数据表示格式,它正在尝试对语义进行编码。

From what little I've read of RDF you are probably going to have to do manual work to get meaningful RDF statements from Django models since it's not a simple data representation format like JSON, it is trying to encode semantic meaning.

那就是说,看看django- rdflib:

https://github.com/odeoncg/django-rdflib

That said, have a look at django-rdflib:
https://github.com/odeoncg/django-rdflib

似乎没有任何文档(似乎是为特定的应用程序构建的),但作者已经在这里发布了一个 manage.py syncvb 命令从现有的Django模型生成RDF图:

https://groups.google.com/d/msg/django-rdf/14WVK7t88PE/ktAKJo-aCfUJ

There doesn't seem to be any documentation (and it seems to have been built for a specific app) but the author has posted here about a manage.py syncvb command that generates an RDF graph from existing Django models:
https://groups.google.com/d/msg/django-rdf/14WVK7t88PE/ktAKJo-aCfUJ

不知道django-rdflib提供了什么视图,但是如果可以为您创建一个RDFlib图形,那么您可以使用RDFlib提供的序列化插件来输出rdf + xml或从您自己的视图。

Not sure exactly what views django-rdflib provides, but if it can make an RDFlib graph for you then you can probably use the serialization plugins provided by RDFlib to output rdf+xml or whatever from your own view.

这篇关于djangonic的方式处理rdf?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆