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),用 ...
随机推荐
- Trying to hack Redis via HTTP requests
Trying to hack Redis via HTTP requests Context Imagine than you can access a Redis server via HTTP r ...
- C#定时执行一个操作
一个客户端向服务器端socket发送报文,但是服务器端限制了发送频率,假如10秒内只能发送1次,这时客户端也要相应的做限制,初步的想法是在配置文件中保存上次最后发送的时间,当前发送时和这个上次最后时间 ...
- Codeforces Round #316 (Div. 2) D. Tree Requests dfs序
D. Tree Requests time limit per test 2 seconds memory limit per test 256 megabytes input standard in ...
- (五)AOS编程
一.LOG AOS_LOG(index) //断言,会打印出断言传进来的值 AOS_ASSERT(0); //只会打印断言位置 return AOS_FAIL; //返回错误,函数 ...
- 用单分子测序(single-molecule sequencing)和局部敏感哈希(locality-sensitive hashing)来组装大型基因组
Assembling large genomes with single-molecule sequencing and locality-sensitive hashing 好好读读,算法系列的好文 ...
- RabbitMQ基础概念详细介绍
http://blog.csdn.net/column/details/rabbitmq.html 转至:http://www.ostest.cn/archives/497 引言 你是否遇到过两个(多 ...
- 深入浅出Mybatis系列(一)---Mybatis入门
最近两年 springmvc + mybatis 的在这种搭配还是蛮火的,楼主我呢,也从来没真正去接触过mybatis, 趁近日得闲, 就去学习一下mybatis吧. 本次拟根据自己的学习进度,做一次 ...
- 字符串与模式匹配(一)——KMP算法
源码:kmp.cpp // KMP.cpp : Defines the entry point for the console application. // #include "stdaf ...
- mybitis学习的页面
http://mybatis.github.io/mybatis-3/zh/configuration.html
- C# 技巧(1) C# 转换时间戳
经常发现很多地方使用一个时间戳表示时间.比如: 1370838759 表示 2013年6月10日 12:32:39. 我们就需要一个工具,方便地转换这种时间格式 什么是时间戳? 时间戳, 又叫Uni ...