MarkLogic sem:MarkLogic Java API中的功能组 [英] MarkLogic sem: function group in MarkLogic Java API

查看:40
本文介绍了MarkLogic sem:MarkLogic Java API中的功能组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找有关MarkLogic Java API的信息,正是我试图找到与sem: xquery功能组等效的Java.我无法在文档中找到任何内容,因此我认为你们可能有一个更好的主意.我需要做的就是将rdf/turtle转换为ML triples,我知道 XQuery 是最理想的选择,但由于要求我不能使用它,我再次知道它不是很聪明,但是我不能改变它.任何帮助将不胜感激.我在文档中发现的所有内容都是关于加载三元组的三种方式( https://docs.marklogic .com/guide/semantics/loading#id_81259 ):

I am looking for information around the MarkLogic Java API, precisely I tried to find Java equivalent to the sem: xquery function group. I was not able to find anything in the docs so I thought you guys might have a better idea. What I need to do exactly is transform rdf/turtle to the ML triples, I understand that XQuery would be ideal for that but I can't use it because of the requirements, and once again I know it's not too clever but I can't change that. Any help would be greatly appreciated. All I found in the documentation was around three ways of loading triples (https://docs.marklogic.com/guide/semantics/loading#id_81259):

  1. 使用mlcp加载三元组,
  2. 使用XQuery加载三元组,
  3. 使用REST API加载三元组.

推荐答案

另一个建议.某些REST API端点支持图形存储协议和SPARQL协议.您可以使用任何HTTP客户端将turtle发送到图存储协议...这是它的特点:

One more suggestion. Some of the REST API's endpoints support the Graph Store Protocol and the SPARQL Protocol. You can send turtle to the graph store protocol with any HTTP client... here's the curl for it:

curl -Hcontent-type:text/turtle \ -d@'nameofturtlefile.ttl'\ -X PUT URLFORHOST/v1/graphs?graph = nameofgraph.

curl -Hcontent-type:text/turtle \ -d@'nameofturtlefile.ttl' \ -X PUT URLFORHOST/v1/graphs?graph=nameofgraph.

该端点负责翻译成sem:triple元素;您永远都不必看到三元组的XML表示形式.

That endpoint takes care of the translation to sem:triple elements; you should never have to see that XML representation of triples.

将curl调用转换为Apache HTTP Client,您便可以采用乌龟的方式.我还使用了Jena API(查找暴动)将乌龟保存到MarkLogic.

Translate the curl call to Apache HTTP Client and you have a way to ingest turtle. I've also used the Jena API (look up riot) to save turtle to MarkLogic.

这篇关于MarkLogic sem:MarkLogic Java API中的功能组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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