Jena TDB assembler syntax
1 introduction
Assembler is a DSL of Jena to specify something to build, models and dataset, for example.
2 examples
Jena Assembler's syntax seems like turtle, here is commonly used prefixes:
@prefix tdb: <http://jena.hpl.hp.com/2008/tdb#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
2.1 dataset
// trigger TDB initialization
[] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
tdb:DatasetTDB rdfs:subClassOf ja:RDFDataset .
tdb:GraphTDB rdfs:subClassOf ja:Model .
// specification of the TDB dataset
<#dataset> rdf:type tdb:DatasetTDB ;
tdb:location "DB" ;// location, relative to CWD
.
<#dataset> rdf:type tdb:DatasetTDB ;
tdb:location "DB" ;
// set the default graph for query is the union of named graphs
tdb:unionDefaultGraph true ;
.
2.2 graph
It's for the purpose of working with a single graph in TDB's RDF dataset.
the default graph
[] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
<#dataset> rdf:type tdb:DatasetTDB ;
tdb:location "DB" ;
<#graph> rdf:type tdb:GraphTDB ;
tdb:dataset <#dataset> .
the named graph
<#graphNamed> rdf:type tdb:GraphTDB ;
tdb:dataset <#dataset> .
tdb:graphName <http://example/graph1> ;
.
2.3 mixed datasets
It's for the purpose of a dataset may be composed of different sourced graphs.
[] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
tdb:DatasetTDB rdfs:subClassOf ja:RDFDataset .
tdb:GraphTDB rdfs:subClassOf ja:Model .
<#dataset> rdf:type ja:RDFDataset ;
ja:defaultGraph <#graph> ;// the default graph
ja:namedGraph // the named graph
[ ja:graphName <http://example.org/name1> ;
ja:graph <#graph2> ] ;
.
<#graph> rdf:type tdb:GraphTDB ;
tdb:location "DB" ;
.
// a graph using external sources
<#graph2> rdf:type ja:MemoryModel ;
ja:content [ja:externalContent <file:Data/books.n3> ] ;
.
Note ja:RDFDataset and ja:Model support more settings of datasets and models.
3 related namespaces
ja
com.hp.hpl.jena.assembler.JA(jena-core-2.11.1-sources.jar)
tdb
com.hp.hpl.jena.tdb.assembler.VocabTDB(jena-tdb-1.0.1-sources.jar)
Jena TDB assembler syntax的更多相关文章
- Jena TDB Assembler
TDB Assembler Assemblers (装配器) 是Jena中用于描述将要构建的对象(通常是模型和数据集 models & datasets)的一种通用机制.例如, Fuseki ...
- Jena TDB 102
1 Introduction TDB is a RDF storage of Jena. official guarantees and limitations TDB support full ra ...
- Jena TDB 101 Java API without Assembler
Update on 2015/05/12 ongoing tutorials site on https://github.com/zhoujiagen/semanticWebTutorialUsin ...
- 【转载】Apache Jena TDB CRUD operations
Apache Jena TDB CRUD operations June 11, 2015 by maltesander http://tutorial-academy.com/apache-jena ...
- 导入本体到Jena TDB数据库
本体的存储方法或称本体持久化,大致分为基于内存的方式.基于文件的方式.基于数据库的方式和专门的管理工具方式4种(傅柱等, 2013).其中,基于数据库的方式又有基于关系数据库.基于面向对象数据库.基于 ...
- Outline of Apache Jena Notes
1 description 这篇是语义网应用框架Apache Jena学习记录的索引. 初始动机见Apache Jena - A Bootstrap 2 Content 内容组织基本上遵循Jena首页 ...
- Jena Fuseki 101
前言 正如其承诺的那样 Expose your triples as a SPARQL end-point accessible over HTTP. Fuseki provides REST-sty ...
- Jena Fuseki 102
Version Fuseki v1 Fuseki v2 since Jena 2.13.0 Both v1 and v2 are active and maintained.[2015/06/29] ...
- Apache jena SPARQL endpoint及推理
一.Apache Jena简介 Apache Jena(后文简称Jena),是一个开源的Java语义网框架(open source Semantic Web Framework for Java),用 ...
随机推荐
- ubuntu 到底是选择32位还是64位?
ubuntu 到底是选择32位还是64位? 2011-06-03 15:16:31 标签:ubuntu linux 休闲 cpu 职场 原文出处:官方wiki原文作者:授权许可: 创作共用协议Att ...
- INPUT只能输入数字
input只能输入数字: (只能输入数字,并且输入的值不能大于99),但是这样有个问题,就是当输入非数字字符时,输入框中所有的字符都会被清除 <input type="text&quo ...
- CSS基础介绍
CSS介绍 CSS是指层叠样式表,CSS样式表极大的提高了工作效率 CSS基础语法 1. 首先选择一个属性 2. 选择了属性以后,用大括号括起来 3. 括号里面是对应的属性和属性值,如: select ...
- Codeforces 720A. Closing ceremony
A. Closing ceremony time limit per test 2 seconds memory limit per test 256 megabytes The closing ce ...
- D3.js 力导向图
花了大半天看了一个八十几行的代码..心累 力导向图是之前就有画过很多次的东西,但是这次的代码看上去很陌生,然后发现是D3更新了4.0.... 先贴代码 var svg = d3.select(&quo ...
- ios 模拟器不显示系统版本了,后边都是 uuid 了,怎么弄回来?系统升级xcode6.4,模拟器找不到选择了?
当我用El Capitan Beta 下 Xcode6.4版本时候出现了问题 常用的Scheme 选择版本不见了 而在Xcode 7.0 beta 6中显示有 简直就是坑,经过查资料其实是一个bug ...
- zabbix3.0.4 部署之二 (Centos6.5系统准备)
1.安装Centos6.5 2.6.32-642.4.2.el6.x86_64 升级所有软件至最新: yum update 2.同步时间.安装ntpd yum install ntpddate n ...
- java.util.concurrent包分类结构图
摘自:http://blog.csdn.net/tsyj810883979/article/details/6956290
- Java 中的 request 和response 理解
request和response(请求和响应) 1.当Web容器收到客户端的发送过来http请求,会针对每一次请求,分别创建一个用于代表此次请求的HttpServletRequest对象(reque ...
- 字符串与模式匹配(一)——KMP算法
源码:kmp.cpp // KMP.cpp : Defines the entry point for the console application. // #include "stdaf ...