如何访问OntoRefine的API? [英] How can I access the API of OntoRefine?

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

问题描述

在我们当前的项目中,我们有很多表格形式的数据要转换为RDF. OpenRefine提供了通过API创建项目或更新数据的可能性(请参阅: https://github.com/OpenRefine/OpenRefine/wiki/OpenRefine-API ).

In our current project we have a lot of data in table form that we want to transform to RDF. OpenRefine offers the possibility to create projects or update data via an API (see: https://github.com/OpenRefine/OpenRefine/wiki/OpenRefine-API).

是否可以将此API与OntoRefine一起使用,如果可以,该怎么办?还是我们最好使用OpenRefine?

Is it possible to use this API with OntoRefine and if so, how do I do it? Or are we better advised to use OpenRefine?

一年多以前类似地问了这个问题,但没有得到答案. (如何将表格数据自动集成到GraphDB中?)

This question was similarly asked a little over a year ago but had not received an answer. (How to integrate tabular data into GraphDB automatically?)

推荐答案

OntoRefine是对OpenRefine的扩展和改进. OpenRefine提供的功能(包括API)应全部存在于GraphDB版本中.在实现方面,您只需要一个简单的HTTP客户端即可.

OntoRefine is an extension and improvement on top of OpenRefine. The functionality offered by OpenRefine, including the API, should all be present in the GraphDB version. In terms of implementation, you shouldn't need much more than a simple HTTP client.

以下是使用先前创建的OntoRefine项目的示例.

Here's a sample using a previously created OntoRefine project.

public static void main(String[] args) throws URISyntaxException, IOException {
    CloseableHttpClient client = HttpClientBuilder.create().build();
    HttpGet post = new HttpGet(new URI("http://localhost:7200/orefine/command/core/get-models?project=1987845723285"));
    HttpEntity entity = client.execute(post).getEntity();
    System.out.println(EntityUtils.toString(entity));
}

当然,您也可以使用OpenRefine库,例如 refine-java ,例如.

Of course, you can also use the OpenRefine libraries, such as refine-java, for example.

这篇关于如何访问OntoRefine的API?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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