当前位置:网站首页>TDB中多个model情况下使用fuseki查询
TDB中多个model情况下使用fuseki查询
2022-07-01 06:33:00 【凉茶冰】
目录
问题描述
一个TDB中可以存储多个图谱,前面通过API方式创建图谱的时候,可以通过如下代码创建图谱:
Model model = dataset.getNamedModel("kgMovie");
dataset.addNamedModel("kgMovie",model);
也就是说一个TDB可以有一个defalut的默认图谱数据集,也可以有很多已经命名的数据集。
通过Fuseki进行查询的时候,默认情况下只能查询default下的数据集,如何查询其他的呢?
解决方法
解决方法参考这篇文章 ,他提到有两种方法,只有第一张方法我试了是可行的,第二种方法不知道graphName应该怎么配置,试了几种写法都不行,如果有路过的大佬,还请不吝指教。

贴一个我使用可行的conf,如下:
@prefix : <http://base/#> .
@prefix tdb: <http://jena.hpl.hp.com/2008/tdb#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix fuseki: <http://jena.apache.org/fuseki#> .
:service1 a fuseki:Service ;
fuseki:dataset <#dataset> ;
fuseki:name "kgMovie" ;
fuseki:serviceQuery "query" , "sparql" ;
fuseki:serviceReadGraphStore "get" ;
fuseki:serviceReadWriteGraphStore "data" ;
fuseki:serviceUpdate "update" ;
fuseki:serviceUpload "upload" .
<#dataset> rdf:type tdb:DatasetTDB;
tdb:location "D:/jena/test";
tdb:unionDefaultGraph true;
.边栏推荐
- [wechat applet] view container and basic content components
- 产品学习(二)——竞品分析
- DML statement in SQL (data operation language)
- [ITSM] what is ITSM and why does it department need ITSM
- K8S搭建Redis集群
- node中引入模块的原理
- Docker 安装部署Redis
- Methods of downloading Foreign Periodicals
- PAT (Advanced Level) Practice 1057 Stack
- mysql数据类型学习笔记
猜你喜欢

C语言课设学生考勤系统(大作业)

【Unity Shader 消融效果_案例分享】

图解事件坐标screenX、clientX、pageX, offsetX的区别

产品学习(三)——需求列表

产品学习(二)——竞品分析

Free trial of self-developed software noisecreater1.1

Embedded system

问题:OfficeException: failed to start and connect(三)

SQL语句

2022 Jiangsu Vocational College skills competition (secondary vocational school) network construction and application open competition volume
随机推荐
Promise
数据库笔记
解决The code generator has deoptimised the styling of xxxx.js as it exceeds the max of 500kb
C语言课设学生选修课程系统(大作业)
[ManageEngine] how to realize network automatic operation and maintenance
Terminology description in the field of software engineering
What is a port scanning tool? What is the use of port scanning tools
软件工程复习
Detailed steps for installing redis on Windows system
了解ESP32睡眠模式及其功耗
Mongodb: I. what is mongodb? Advantages and disadvantages of mongodb
Which securities company does qiniu school cooperate with? Is it safe to open an account?
MySQL learning
常用快捷键
Stored procedure learning notes
2022 年江苏省职业院校技能大赛(中职) 网络搭建与应用赛项公开赛卷
8 张图 | 剖析 Eureka 的首次同步注册表
C#如何打印輸出原版數組
Free trial of self-developed software noisecreater1.1
@Propagation property of transactional requires_ New in-depth understanding