简体   繁体   English

如何使用D2R将RDF数据直接存储到芝麻中?

[英]How to store RDF data direct to sesame using D2R?

I am looking for any solution, to store my RDFized data direct to sesame through Java program. 我正在寻找任何解决方案,以通过Java程序将我的RDF化数据直接存储到芝麻中。 I have a database of 1.7 M records, i used D2R to transform it into RDF. 我有一个170万条记录的数据库,我使用D2R将其转换为RDF。 Now i want to store RDFized data into sesame triple store. 现在我想将RDFized数据存储到芝麻三重存储中。 I did not generate RDF dump because data was huge. 我没有生成RDF转储,因为数据很大。 Is there any way code/solution through which i can shift my RDFized data into my triple store. 有什么办法可以通过代码/解决方案将RDF化的数据转移到三元组存储中。 Thanks 谢谢

I believe what you're really trying to say is: you have a large RDBMS over which you've created an RDF wrapper view using D2RQ. 我相信您真正想说的是:您拥有一个大型RDBMS,并使用D2RQ在其上创建了RDF包装视图。 Now you want to extract that data using SNORQL (D2RQ's SPARQL endpoint) and push it to a native RDF triple store using Sesame. 现在,您要使用SNORQL(D2RQ的SPARQL端点)提取数据,然后使用Sesame将其推送到本地RDF三元存储。

I tried to edit your question to reflect that but unfortunately it got voted down. 我试图编辑您的问题以反映该问题,但是很遗憾,该问题被否决了。

Anyway, in Sesame, you can do this through Java code by: 无论如何,在Sesame中,您可以通过Java代码执行以下操作:

  1. firing a Graph Query that will return you a GraphQueryResult 触发图形查询,该查询将返回GraphQueryResult

     GraphQueryResult graphResult = con.prepareGraphQuery( QueryLanguage.SPARQL, "CONSTRUCT <...your SPARQL QUERY here ...>".evaluate(); 
  2. use the QueryResults utility class to return the Statements as a Model: 使用QueryResults实用工具类将Statements作为模型返回:

     Model resultModel = QueryResults.asModel(graphQueryResult); 
  3. use one of the overloaded RepositoryConnection.add methods to add this data to a native Sesame store. 使用重载的RepositoryConnection.add方法之一将此数据添加到本地芝麻存储中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM