sparql - 在 fuseki 中编辑示例查询
问题描述
有没有办法更改 jena fuseki 中的默认示例查询?
我想包含一组示例查询,供人们在演示期间运行,而无需弹出另一个窗口来复制查询。
解决方案
在 Windows 上%FUSEKI_HOME%\webapp\js\app\qonsole-config.js
:
/** Standalone configuration for qonsole on index page */
define( [], function() {
return {
prefixes: {
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"owl": "http://www.w3.org/2002/07/owl#",
"xsd": "http://www.w3.org/2001/XMLSchema#"
},
queries: [
{ "name": "Selection of triples",
"query": "SELECT ?subject ?predicate ?object\nWHERE {\n" +
" ?subject ?predicate ?object\n}\n" +
"LIMIT 25"
},
{ "name": "Selection of classes",
"query": "SELECT DISTINCT ?class ?label ?description\nWHERE {\n" +
" ?class a owl:Class.\n" +
" OPTIONAL { ?class rdfs:label ?label}\n" +
" OPTIONAL { ?class rdfs:comment ?description}\n}\n" +
"LIMIT 25",
"prefixes": ["owl", "rdfs"]
}
]
};
} );
推荐阅读
- javascript - 更改日期范围以在 FullCalendar 中显示事件
- javascript - 点击事件刷新我的页面
- html - 角材料模板垫菜单为空
- youtube-api - 来自 Youtube Data API 的结果不一致,使用 Iframe api 播放视频时出现 150 错误代码
- nao-robot - NAOqi:端口 NAO 代码从 2.1 到 2.8
- python - 如何在不指定扩展名的情况下删除文件?
- windows - 在部分已知的文件夹路径下查找文件
- swift - 每次创建新对象时迭代 NSManagedObject 的属性
- javascript - 遍历对象的键,然后遍历值(因为它们是数组)
- macos - 在 NSView 中绘制线条集合的最佳方法是什么?