将多个RDF文档合并为一个 [英] Merging multiple RDF documents into one

查看:147
本文介绍了将多个RDF文档合并为一个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个RDF文档:

  1. http://dublincore.org/2012/06/14/dcterms.rdf
  2. http://xmlns.com/foaf/spec/index.rdf
  1. http://dublincore.org/2012/06/14/dcterms.rdf
  2. http://xmlns.com/foaf/spec/index.rdf

我想将它们合并到一个文件中,例如purl_foaf.rdf.我正在用Java工作;我该如何用耶拿(Jena)?

I would like to merge them into one file, e.g., purl_foaf.rdf. I am working in Java; how can I do this with Jena?

推荐答案

Jena具有内置的命令行实用程序来执行此操作:

Jena has a built-in command line utility to do this: rdfcat. So, to join those two RDF files together and write the results as Turtle in the file purl_foaf.rdf, do the following from your command line. It should be on one line, but I've split it up for readability:

rdfcat -out Turtle "http://dublincore.org/2012/06/14/dcterms.rdf" \
   "http://xmlns.com/foaf/spec/index.rdf" > purl_foaf.rdf

这篇关于将多个RDF文档合并为一个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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