SAIL对象的Sparql端点 [英] Sparql endpoint for SAIL object
问题描述
我已经使用tinkerpop蓝图创建了一个SAIL对象,以将RDF数据加载到Graph数据库中. Ive成功地成功加载了数据.有问题的Graph数据库没有sparql端点来运行我的查询混合测试驱动程序.有谁知道是否可能,如果可以,如何使sparql端点可通过HTTP服务器供我的测试驱动程序Java代码访问?我知道4store,BigData和其他一些商店都有自己的内置sparql服务器进行查询.我想知道如果基础图数据库不提供自己的服务器实现,是否有可能使sparql服务器可用于我的Sail对象存储.
I have created a SAIL object using tinkerpop blueprints to load RDF data into a Graph database. Ive successfully managed to load the data. The Graph database in question does not have a sparql endpoint to run my query mix test driver. Does anyone know if it possible and if so then how to make a sparql endpoint accessible to my test driver java code over an HTTP server? I am aware 4store, BigData and some other stores have their own built in sparql servers for querying. I am wondering if it is possible to make a sparql server like that available for my Sail object store if the underlying graph database does not provide its own implementation of the server.
谢谢.
这是我取得的进步:
我已经通过tomcat部署了open-rdf芝麻战争来访问服务器,这就是准备存储库(数据已加载)的距离
I have deployed open-rdf sesame war via tomcat to get access to the server and this is how far I got with preparing the repository (the data is already loaded)
OrientGraph g = new OrientGraph("remote:host/Test", "admin", "admin");
Sail sail = new GraphSail<KeyIndexableGraph>(g);
Repository rep = new SailRepository(sail);
rep.initialize();
RepositoryConnection conn = rep.getConnection();
我不确定如何处理查询,在一个单独的文件中,我使用以下方法进行了一些基本查询:
I am not sure how to handle the querying, in a separate file I did some basic querying using: https://github.com/tinkerpop/blueprints/wiki/Sail-Ouplementation.
但是,我注意到使用此方法进行的查询非常有限,因为只能与边缘进行基本的模式匹配.
However, I noticed that the querying done using this is very limited in the sense that only basic patttern matching with edges was possible.
例如,一个带有谓词的基本查询: 选择不同的?var1?var2,其中{?var2谓词?var1.}
For example, a basic query with predicate like: select distinct ?var1 ?var2 where { ?var2 predicate ?var1 .}
如果我也提供主题, 选择不同的?var1,其中{主语谓词?var1.}
Whereas if I also provide the subject, select distinct ?var1 where { subject predicate ?var1 .}
即使我在文件中看到相应的结果,也不会返回任何结果.
returns no results even when I can see a corresponding result in the file.
我的问题是如何运行完整的sparql查询?端点会帮忙吗?
My question here is how can I run full sparql queries? Will the endpoint help?
推荐答案
如果您的图形已启用蓝图,则可以通过
If your graph is in Blueprints-enabled then you can expose the Graph
instance via Rexster and use the SPARQL extension:
https://github.com/tinkerpop/rexster/树/大师/rexster-kibbles/sparql-kibble
这篇关于SAIL对象的Sparql端点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!