如何将RDFS转换为RDFS?
我有两个 RDF 模式,我需要将一个模式转换为另一个模式。
是否有任何类似于 XSLT 的转换语言仅适用于 RDFS?
我正在寻找 .NET 中的可能实现,但也欢迎其他平台。
I have two RDF schemas and I need to convert one to another.
Is there any transformation language analogue to XSLT just for RDFS?
I'm looking for a possible implementation in .NET, but other platforms are welcomed as well.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我会将 RDF 加载到支持 SPARQL 1.1 的三元组存储中,然后使用 SPARQL CONSTRUCT 查询生成与目标 RDF 模式匹配的 RDF。
如果数据结构比较复杂,则可能需要多个 CONSTRUCT 查询。
I would load the RDF into a triple store with SPARQL 1.1 support, and then use SPARQL CONSTRUCT queries to generate RDF that matches the target RDF schema.
Probably it takes more than one CONSTRUCT query if the structure of your data is on the complex side.
就如何实施转型而言,我会采纳 cygri 的建议。尽管可以完全在 API 级别完成此操作,具体取决于转换的复杂性。
如果您想要一个 .Net API 来执行此操作,请尝试 dotNetRDF(免责声明 - 我开发了这个)。它有一个内置的 SPARQL 1.1 引擎和一个相当全面的 API,用于直接操作 RDF
AFAIK,没有与 RDF 的 XSLT 通用的类似物,已经有一些设计这样的东西的尝试,但我不知道有任何真正的尝试。特别流行或广泛使用。
In terms of how you implement the transformation I'd go with cygri's suggestion. Though it may be possible to do it entirely at the API level depending on the complexity of your transformation.
Try out dotNetRDF if you want a .Net API for doing this (disclaimer - I develop this). It has a SPARQL 1.1 engine built in and a fairly comprehensive API for manipulating RDF directly
AFAIK there is no general analogue to XSLT for RDF, there have been a few attempts at designing such a thing but I don't know of any that have actually been particularly popular or widely used.