当前位置:网站首页>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;
.边栏推荐
- Application of IT service management (ITSM) in Higher Education
- HW(OD)岗面试题
- Understand esp32 sleep mode and its power consumption
- Software engineering review
- Docker 安装部署Redis
- [unity shader stroke effect _ case sharing first]
- What are the functions of LAN monitoring software
- C语言课设职工信息管理系统(大作业)
- Record MySQL troubleshooting caused by disk sector damage
- 在支付宝上买基金安全吗?哪里可以买基金
猜你喜欢

清除过期缓存条目后可用空间仍不足 - 请考虑增加缓存的最大空间

SQL learning notes nine connections 2

Promise

K8S搭建Redis集群

【微信小程序低代码开发】二,在实操中化解小程序的代码组成
![[ManageEngine Zhuohao] helps Julia college, the world's top Conservatory of music, improve terminal security](/img/fb/0a9f0ea72efc4785cc21fd0d4830c2.png)
[ManageEngine Zhuohao] helps Julia college, the world's top Conservatory of music, improve terminal security

Notes on probability theory

ESP32 ESP-IDF GPIO按键中断响应
![[ManageEngine] how to realize network automatic operation and maintenance](/img/8a/75332d3180f92c6a6482d881032bbf.png)
[ManageEngine] how to realize network automatic operation and maintenance

脏读、幻读和不可重复读
随机推荐
C language course set up property fee management system (big work)
网络爬虫
C语言课设销售管理系统设计(大作业)
Storage function learning notes
HW(OD)岗面试题
SQL中DML语句(数据操作语言)
【Unity Shader 描边效果_案例分享第一篇】
async 与 await
Router 6/ 以及和Router5 的区别
Detailed steps for installing redis on Windows system
问题:OfficeException: failed to start and connect(二)
了解ESP32睡眠模式及其功耗
C语言课设图书信息管理系统(大作业)
Internet worm
TCL statements in SQL (transaction control statements)
解决The code generator has deoptimised the styling of xxxx.js as it exceeds the max of 500kb
[ManageEngine] how to realize network automatic operation and maintenance
MySQL data type learning notes
8 张图 | 剖析 Eureka 的首次同步注册表
NOC 设计的一些坑