You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by bu...@apache.org on 2011/11/01 01:40:13 UTC

svn commit: r797817 [1/3] - /websites/staging/jena/trunk/content/jena/documentation/tdb/

Author: buildbot
Date: Tue Nov  1 00:40:11 2011
New Revision: 797817

Log:
Staging update by buildbot

Added:
    websites/staging/jena/trunk/content/jena/documentation/tdb/architecture.html
    websites/staging/jena/trunk/content/jena/documentation/tdb/assembler.html
    websites/staging/jena/trunk/content/jena/documentation/tdb/commands.html
    websites/staging/jena/trunk/content/jena/documentation/tdb/configuration.html
    websites/staging/jena/trunk/content/jena/documentation/tdb/datasets.html
    websites/staging/jena/trunk/content/jena/documentation/tdb/dynamic_datasets.html
    websites/staging/jena/trunk/content/jena/documentation/tdb/installation.html
    websites/staging/jena/trunk/content/jena/documentation/tdb/java_api.html
    websites/staging/jena/trunk/content/jena/documentation/tdb/joseki_integration.html
    websites/staging/jena/trunk/content/jena/documentation/tdb/jvm_64_32.html
    websites/staging/jena/trunk/content/jena/documentation/tdb/optimizer.html
    websites/staging/jena/trunk/content/jena/documentation/tdb/quadfilter.html
    websites/staging/jena/trunk/content/jena/documentation/tdb/requirements.html
    websites/staging/jena/trunk/content/jena/documentation/tdb/value_canonicalization.html
Modified:
    websites/staging/jena/trunk/content/jena/documentation/tdb/index.html

Added: websites/staging/jena/trunk/content/jena/documentation/tdb/architecture.html
==============================================================================
--- websites/staging/jena/trunk/content/jena/documentation/tdb/architecture.html (added)
+++ websites/staging/jena/trunk/content/jena/documentation/tdb/architecture.html Tue Nov  1 00:40:11 2011
@@ -0,0 +1,298 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+  <link href="/jena/css/jena.css" rel="stylesheet" type="text/css">
+  <title>Apache Jena - TDB Architecture</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+  <script src="/jena/js/jquery-1.6.4.min.js" type="text/javascript"></script>
+  <script src="/jena/js/jena-navigation.js" type="text/javascript"></script>
+</head>
+
+<body>
+  <div id="header">
+    <div id="logoblock">
+    <img alt="Apache Jena" src="/jena/images/jena-logo/jena-logo-small.png"/>
+    </div>
+
+    <div id="titleblock">
+      <h1 class="title">Apache Jena</h1>
+      <div id="topmenu" class="tabbar round-10">
+        <ul>
+        <li class="round-top-8"><a class="round-top-8" href="/jena/index.html" id="home_menu">Home</a></li>
+        <li class="round-top-8"><a class="round-top-8" href="/jena/help_and_support/index.html">Support</a></li>
+        <li class="round-top-8"><a class="round-top-8" href="/jena/getting_started/index.html">Getting started</a></li>
+        <li class="round-top-8"><a class="round-top-8" href="/jena/tutorials/index.html">Tutorials</a></li>
+        <li class="round-top-8"><a class="round-top-8" href="/jena/documentation/index.html">Documentation</a></li>
+        </ul>
+      </div>
+    </div>
+  </div>
+
+  <div id="navigation" class="clear">
+  <h1 id="quick_links">Quick links</h1>
+<ul>
+<li><a href="/jena/index.html">Home</a></li>
+<li><a href="/jena/download/index.html">Downloads</a></li>
+<li><a href="/jena/help_and_support/index.html">Help and support</a></li>
+<li><a href="/jena/help_and_support/bugs_and_suggestions.html">Report a bug</a></li>
+<li><a href="/jena/about_jena/roadmap.html">Roadmap</a></li>
+<li><a href="/jena/getting_involved/index.html">Getting involved</a></li>
+<li><a href="/jena/documentation/">Documentation</a></li>
+</ul>
+<h1 id="about_jena">About Jena</h1>
+<ul>
+<li><a href="/jena/index.html">Home</a></li>
+<li><a href="/jena/about_jena/about.html">About Jena</a></li>
+<li><a href="/jena/about_jena/architecture.html">Architecture</a></li>
+<li><a href="/jena/about_jena/roadmap.html">Roadmap</a></li>
+<li><a href="/jena/about_jena/team.html">Project team</a></li>
+</ul>
+<h1 id="download">Download</h1>
+<ul>
+<li><a href="/jena/download/index.html">Downloading Jena</a></li>
+<li><a href="/jena/download/maven.html">Using Maven</a></li>
+<li><a href="/jena/download/osgi.html">Using OSGi</a></li>
+</ul>
+<h1 id="help_and_support">Help and support</h1>
+<ul>
+<li><a href="/jena/help_and_support/index.html">Getting help</a></li>
+<li><a href="/jena/help_and_support/bugs_and_suggestions.html">Bugs and suggestions</a></li>
+</ul>
+<h1 id="getting_started">Getting Started</h1>
+<ul>
+<li><a href="/jena/getting_started/index.html">A first Jena project</a></li>
+<li><a href="/jena/getting_started/rdf_api.html">RDF API overview</a></li>
+<li><a href="/jena/getting_started/sparql.html">Querying RDF with SPARQL</a></li>
+<li><a href="/jena/getting_started/fuseki.html">Serving RDF over HTTP</a></li>
+<li><a href="/jena/getting_started/tell_me_how.html">Tell me how to ...</a></li>
+</ul>
+<h1 id="tutorials">Tutorials</h1>
+<ul>
+<li><a href="/jena/tutorials/index.html">RDF tutorial</a></li>
+<li><a href="/jena/tutorials/sparql.html">SPARQL queries</a></li>
+<li><a href="/jena/tutorials/using_jena_with_eclipse.html">Using Jena with Eclipse</a></li>
+</ul>
+<h1 id="documentation">Documentation</h1>
+<ul>
+<li><a href="/jena/documentation/index.html">Overview</a></li>
+<li><a href="/jena/documentation/javadoc">Javadoc</a></li>
+<li><a href="/jena/documentation/rdf/index.html">RDF</a></li>
+<li><a href="/jena/documentation/query/index.html">SPARQL (ARQ)</a></li>
+<li><a href="/jena/documentation/tdb/index.html">TDB</a></li>
+<li><a href="/jena/documentation/sdb/index.html">SDB</a><ul>
+<li><a href="/jena/documentation/sdb/installation.html">Installation</a></li>
+<li><a href="/jena/documentation/sdb/quickstart.html">Quick start</a></li>
+<li><a href="/jena/documentation/sdb/commands.html">Cmd line</a></li>
+<li><a href="/jena/documentation/sdb/javaapi.html">Java API</a></li>
+<li><a href="/jena/documentation/sdb/configuration.html">Config</a></li>
+<li><a href="/jena/documentation/sdb/databases_supported.html">Databases</a></li>
+</ul>
+</li>
+<li><a href="/jena/documentation/larq/index.html">LARQ</a></li>
+<li><a href="/jena/documentation/serving_data/index.html">Serving Data</a></li>
+<li><a href="/jena/documentation/ontology/index.html">Ontology</a></li>
+<li><a href="/jena/documentation/inference/index.html">Inference</a></li>
+<li><a href="/jena/documentation/assembler/index.html">Assembler</a><ul>
+<li><a href="/jena/documentation/assembler/assembler-howto.html">Assembler how-to</a></li>
+<li><a href="/jena/documentation/assembler/inside-assemblers.html">Inside assemblers</a></li>
+</ul>
+</li>
+<li><a href="/jena/documentation/io/index.html">I/O</a><ul>
+<li><a href="/jena/documentation/io/iohowto.html">I/O how-to</a></li>
+</ul>
+</li>
+<li><a href="/jena/documentation/notes/index.html">Notes</a><ul>
+<li><a href="/jena/documentation/notes/concurrency-howto.html">Concurrency how-to</a></li>
+<li><a href="/jena/documentation/notes/event-handler-howto.html">Event handler how-to</a></li>
+<li><a href="/jena/documentation/notes/file-manager.html">File manager how-to</a></li>
+<li><a href="/jena/documentation/notes/model-factory.html">Model factory how-to</a></li>
+<li><a href="/jena/documentation/notes/rdf-frames.html">RDF frames</a></li>
+<li><a href="/jena/documentation/notes/reification.html">Reification how-to</a></li>
+<li><a href="/jena/documentation/notes/typed-literals.html">Typed literals how-to</a></li>
+</ul>
+</li>
+<li><a href="/jena/documentation/tools/index.html">Tools</a><ul>
+<li><a href="/jena/documentation/tools/schemagen.html">schemagen</a></li>
+</ul>
+</li>
+</ul>
+<h1 id="getting_involved">Getting Involved</h1>
+<ul>
+<li><a href="/jena/getting_involved/index.html">Contributing to Jena</a></li>
+</ul>
+<h1 id="asf_links">ASF links</h1>
+<ul>
+<li><a href="http://www.apache.org">Apache Software Foundation</a></li>
+<li><a href="http://www.apache.org/licenses/LICENSE-2.0">License</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+  </div>
+
+  <div id="content">
+    <h1 class="title">TDB Architecture</h1>
+    <p>This page gives an overview of the TDB architecture. Specific
+details refer to TDB 0.8.</p>
+<h2 id="contents">Contents</h2>
+<ul>
+<li><a href="#Terminology">Terminology</a></li>
+<li><a href="#Design">Design</a><ul>
+<li><a href="#The_Node_Table">The Node Table</a></li>
+<li><a href="#Triple_and_Quad_indexes">Triple and Quad indexes</a></li>
+<li><a href="#Prefixes_Table">Prefixes Table</a></li>
+<li><a href="#TDB_B.2BTrees">TDB B+Trees</a></li>
+</ul>
+</li>
+<li><a href="#Inline_values">Inline values</a></li>
+<li><a href="#Query_Processing">Query Processing</a></li>
+<li><a href="#Caching_on_32_and_64_bit_Java_systems">Caching on 32 and 64 bit Java systems</a></li>
+</ul>
+<h2 id="terminology">Terminology</h2>
+<p>Terms like "table" and "index" are used in this description. They
+don't directly correspond to concepts in SQL, For example, in SQL
+terms, there is no triple table; that can be seen as just having
+indexes for the table or, alternatively, there are 3 tables, each
+of which has a primary key and TDB manages the relationship between
+them.</p>
+<h2 id="design">Design</h2>
+<p>A dataset backed by TDB is stored in a single directory in the
+filing system. A dataset consists of</p>
+<ul>
+<li>The node table</li>
+<li>Triple and Quad indexes</li>
+<li>The prefixes table</li>
+</ul>
+<h3 id="the_node_table">The Node Table</h3>
+<p>The node table stores the representation of RDF terms (except for
+inlined value - see below). It provides two mappings from Node to
+NodeId and from NodeId to Node. This is sometimes called a
+dictionary.</p>
+<p>The Node to NodeId mapping is used during data loading and when
+converting constant terms in queries from their Jena Node
+representation to the TDB-specific internal ids.</p>
+<p>The NodeId to Node mapping is used to turn query results expressed
+as TDB NodeIds into the Jena Node representation and also during
+query processing when filters are applied if the whole node
+representation is needed for testing (e.g. regex).</p>
+<p>Node table implementations usually provide a large cache - the
+NodeId to Node mapping is heavily used in query processing yet the
+same NodeId can appear in many query results.</p>
+<p>NodeIds are 8 byte quantities. The Node to NodeId mapping is based
+on hash of the Node (a 128 bit MD5 hash - the length was found not
+to major performance factor).</p>
+<p>The default storage of the node table is a sequential access file
+for the NodeId to Node mapping and a B+Tree for the Node to NodeId
+mapping.</p>
+<h3 id="triple_and_quad_indexes">Triple and Quad indexes</h3>
+<p>Quads are used for named graphs, triples for the default graph.
+Triples are held as 3-tuples of NodeIds in triple indexes - quads
+as 4-tuples. Otherwise they are handled in the same manner.</p>
+<p>The triple table is 3 indexes - there is no distinguished triple
+table with secondary indexes. Instead, each index has all the
+information about a triple.</p>
+<p>The default storage of each indexes</p>
+<h3 id="prefixes_table">Prefixes Table</h3>
+<p>The prefixes table uses a node table and a index for GPU
+(Graph-&gt;Prefix-&gt;URI). It is usually small. It does not take part
+in query processing. It provides support for Jena's PrefixMappings
+used mainly for presentation and for serialisation of triples in
+<a href="http://www.w3.org/TR/REC-rdf-syntax/" title="http://www.w3.org/TR/REC-rdf-syntax/">RDF/XML</a>
+or
+<a href="http://www.w3.org/TeamSubmission/turtle/" title="http://www.w3.org/TeamSubmission/turtle/">Turtle</a>.</p>
+<h3 id="tdb_btrees">TDB B+Trees</h3>
+<p>Many of the persistent data structures in TDB use a custom
+implementation of threaded
+<a href="http://en.wikipedia.org/wiki/B+_tree" title="http://en.wikipedia.org/wiki/B%2B_tree">B+Trees</a>.
+The TDB implementation only provides for fixed length key and fixed
+length value. There is no use of the value part in triple indexes.</p>
+<p>The threaded nature means that long scans of indexes proceeds
+without needing to traverse the branches of the tree.</p>
+<p>See the description of index caching below.</p>
+<h2 id="inline_values">Inline values</h2>
+<p>Values of certain datatypes are held as part of the NodeId in the
+bottom 56 bits. The top 8 bits indicates the type - external NodeId
+or the value space.</p>
+<p>The value spaces handled are (TDB 0.8): xsd:decimal, xsd:integer,
+xsd:dateTime, xsd:date and xsd:boolean. Each has it's own encoding
+to fit in 56 bits. If a node falls outside of the range of values
+that can be represented in the 56 bit encoding.</p>
+<p>The xsd:dateTime and xsd:date ranges cover about 8000 years from
+year zero with a precision down to 1 millisecond. Timezone
+information is retained to an accuracy of 15 minutes with special
+timezones for Z and for no explicit timezone.</p>
+<p>By storing the value, the exact lexical form is not recorded. The
+integers 01 and 1 will both be treated as a the value 1.</p>
+<p>Derived XSD datatypes are held as their base type. The exact
+datatype is not retained; the value of the RDF term is.</p>
+<h2 id="query_processing">Query Processing</h2>
+<p>TDB uses the
+<a href="TODO">OpExecutor extension point of ARQ</a>.
+TDB provides low level optimization of basic graph patterns using a
+<a href="optimizer.html" title="TDB/Optimizer">statistics based optimizer</a>.</p>
+<h2 id="caching_on_32_and_64_bit_java_systems">Caching on 32 and 64 bit Java systems</h2>
+<p>TDB runs on both 32-bit and 64-bit Java Virtual Machines. The same
+file formats are used on both systems and database files can be
+transferred between architectures (no TDB system should be running
+for the the database at the time of copy). What differs is the file
+access mechanism used.</p>
+<p>TDB is faster on a 64 bit JVM because more memory is available for
+file caching.</p>
+<p>The node table caches are always in the Java heap.</p>
+<p>The file access mechanism can be set explicitly, but this is not a
+good idea for production usage, only for experimentation - see the
+<a href="configuration.html#File_Access_Mode" title="TDB/Configuration">File Access mode option</a>.</p>
+<p>On 64-bit Java, TDB uses memory mapped files, accessed 8M segments,
+and the operating system handles caching between RAM and disk. The
+amount of RAM used for file caching increases and decreases as
+other application run on the machine. The fewer other programs
+running on the machine, the more RAM will be available for file
+caching. The mapped address space counts as part of the application
+processes memory usage but this space is not part of the Java
+heap.</p>
+<p>On a 32 bit JVM, this approach does not work because Java
+addressing is limited to about 1.5Gbytes (the exact figure is JVM
+specific and includes any memory mapped file usage) and this would
+limit the size of TDB datasets. Instead, TDB provides an in-heap
+LRU cache of B+Tree blocks. Applications should set the JVM heap to
+1G or above (within the JVM specific limit).</p>
+<p>On 32-bit Java, TDB uses it's own file caching to enable large
+databases. 32-bit Java limits the address space of the JVM to about
+1.5Gbytes (the exact size is JVM-dependent), and this includes
+memory mapped files, even though they are not in the Java heap. The
+JVM heap size may need to be increased to make space for the disk
+caches used by TDB.</p>
+  </div>
+
+  <div id="footer">
+    <div class="copyright">
+      <p>
+        Copyright &copy; 2011 The Apache Software Foundation, Licensed under
+        the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+        <br />
+        Apache Jena, Jena, the Apache Jena project logo,
+        Apache and the Apache feather logos are trademarks of The Apache Software Foundation.
+      </p>
+    </div>
+  </div>
+
+</body>
+</html>

Added: websites/staging/jena/trunk/content/jena/documentation/tdb/assembler.html
==============================================================================
--- websites/staging/jena/trunk/content/jena/documentation/tdb/assembler.html (added)
+++ websites/staging/jena/trunk/content/jena/documentation/tdb/assembler.html Tue Nov  1 00:40:11 2011
@@ -0,0 +1,365 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+  <link href="/jena/css/jena.css" rel="stylesheet" type="text/css">
+  <title>Apache Jena - TDB Assembler</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+  <script src="/jena/js/jquery-1.6.4.min.js" type="text/javascript"></script>
+  <script src="/jena/js/jena-navigation.js" type="text/javascript"></script>
+</head>
+
+<body>
+  <div id="header">
+    <div id="logoblock">
+    <img alt="Apache Jena" src="/jena/images/jena-logo/jena-logo-small.png"/>
+    </div>
+
+    <div id="titleblock">
+      <h1 class="title">Apache Jena</h1>
+      <div id="topmenu" class="tabbar round-10">
+        <ul>
+        <li class="round-top-8"><a class="round-top-8" href="/jena/index.html" id="home_menu">Home</a></li>
+        <li class="round-top-8"><a class="round-top-8" href="/jena/help_and_support/index.html">Support</a></li>
+        <li class="round-top-8"><a class="round-top-8" href="/jena/getting_started/index.html">Getting started</a></li>
+        <li class="round-top-8"><a class="round-top-8" href="/jena/tutorials/index.html">Tutorials</a></li>
+        <li class="round-top-8"><a class="round-top-8" href="/jena/documentation/index.html">Documentation</a></li>
+        </ul>
+      </div>
+    </div>
+  </div>
+
+  <div id="navigation" class="clear">
+  <h1 id="quick_links">Quick links</h1>
+<ul>
+<li><a href="/jena/index.html">Home</a></li>
+<li><a href="/jena/download/index.html">Downloads</a></li>
+<li><a href="/jena/help_and_support/index.html">Help and support</a></li>
+<li><a href="/jena/help_and_support/bugs_and_suggestions.html">Report a bug</a></li>
+<li><a href="/jena/about_jena/roadmap.html">Roadmap</a></li>
+<li><a href="/jena/getting_involved/index.html">Getting involved</a></li>
+<li><a href="/jena/documentation/">Documentation</a></li>
+</ul>
+<h1 id="about_jena">About Jena</h1>
+<ul>
+<li><a href="/jena/index.html">Home</a></li>
+<li><a href="/jena/about_jena/about.html">About Jena</a></li>
+<li><a href="/jena/about_jena/architecture.html">Architecture</a></li>
+<li><a href="/jena/about_jena/roadmap.html">Roadmap</a></li>
+<li><a href="/jena/about_jena/team.html">Project team</a></li>
+</ul>
+<h1 id="download">Download</h1>
+<ul>
+<li><a href="/jena/download/index.html">Downloading Jena</a></li>
+<li><a href="/jena/download/maven.html">Using Maven</a></li>
+<li><a href="/jena/download/osgi.html">Using OSGi</a></li>
+</ul>
+<h1 id="help_and_support">Help and support</h1>
+<ul>
+<li><a href="/jena/help_and_support/index.html">Getting help</a></li>
+<li><a href="/jena/help_and_support/bugs_and_suggestions.html">Bugs and suggestions</a></li>
+</ul>
+<h1 id="getting_started">Getting Started</h1>
+<ul>
+<li><a href="/jena/getting_started/index.html">A first Jena project</a></li>
+<li><a href="/jena/getting_started/rdf_api.html">RDF API overview</a></li>
+<li><a href="/jena/getting_started/sparql.html">Querying RDF with SPARQL</a></li>
+<li><a href="/jena/getting_started/fuseki.html">Serving RDF over HTTP</a></li>
+<li><a href="/jena/getting_started/tell_me_how.html">Tell me how to ...</a></li>
+</ul>
+<h1 id="tutorials">Tutorials</h1>
+<ul>
+<li><a href="/jena/tutorials/index.html">RDF tutorial</a></li>
+<li><a href="/jena/tutorials/sparql.html">SPARQL queries</a></li>
+<li><a href="/jena/tutorials/using_jena_with_eclipse.html">Using Jena with Eclipse</a></li>
+</ul>
+<h1 id="documentation">Documentation</h1>
+<ul>
+<li><a href="/jena/documentation/index.html">Overview</a></li>
+<li><a href="/jena/documentation/javadoc">Javadoc</a></li>
+<li><a href="/jena/documentation/rdf/index.html">RDF</a></li>
+<li><a href="/jena/documentation/query/index.html">SPARQL (ARQ)</a></li>
+<li><a href="/jena/documentation/tdb/index.html">TDB</a></li>
+<li><a href="/jena/documentation/sdb/index.html">SDB</a><ul>
+<li><a href="/jena/documentation/sdb/installation.html">Installation</a></li>
+<li><a href="/jena/documentation/sdb/quickstart.html">Quick start</a></li>
+<li><a href="/jena/documentation/sdb/commands.html">Cmd line</a></li>
+<li><a href="/jena/documentation/sdb/javaapi.html">Java API</a></li>
+<li><a href="/jena/documentation/sdb/configuration.html">Config</a></li>
+<li><a href="/jena/documentation/sdb/databases_supported.html">Databases</a></li>
+</ul>
+</li>
+<li><a href="/jena/documentation/larq/index.html">LARQ</a></li>
+<li><a href="/jena/documentation/serving_data/index.html">Serving Data</a></li>
+<li><a href="/jena/documentation/ontology/index.html">Ontology</a></li>
+<li><a href="/jena/documentation/inference/index.html">Inference</a></li>
+<li><a href="/jena/documentation/assembler/index.html">Assembler</a><ul>
+<li><a href="/jena/documentation/assembler/assembler-howto.html">Assembler how-to</a></li>
+<li><a href="/jena/documentation/assembler/inside-assemblers.html">Inside assemblers</a></li>
+</ul>
+</li>
+<li><a href="/jena/documentation/io/index.html">I/O</a><ul>
+<li><a href="/jena/documentation/io/iohowto.html">I/O how-to</a></li>
+</ul>
+</li>
+<li><a href="/jena/documentation/notes/index.html">Notes</a><ul>
+<li><a href="/jena/documentation/notes/concurrency-howto.html">Concurrency how-to</a></li>
+<li><a href="/jena/documentation/notes/event-handler-howto.html">Event handler how-to</a></li>
+<li><a href="/jena/documentation/notes/file-manager.html">File manager how-to</a></li>
+<li><a href="/jena/documentation/notes/model-factory.html">Model factory how-to</a></li>
+<li><a href="/jena/documentation/notes/rdf-frames.html">RDF frames</a></li>
+<li><a href="/jena/documentation/notes/reification.html">Reification how-to</a></li>
+<li><a href="/jena/documentation/notes/typed-literals.html">Typed literals how-to</a></li>
+</ul>
+</li>
+<li><a href="/jena/documentation/tools/index.html">Tools</a><ul>
+<li><a href="/jena/documentation/tools/schemagen.html">schemagen</a></li>
+</ul>
+</li>
+</ul>
+<h1 id="getting_involved">Getting Involved</h1>
+<ul>
+<li><a href="/jena/getting_involved/index.html">Contributing to Jena</a></li>
+</ul>
+<h1 id="asf_links">ASF links</h1>
+<ul>
+<li><a href="http://www.apache.org">Apache Software Foundation</a></li>
+<li><a href="http://www.apache.org/licenses/LICENSE-2.0">License</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+  </div>
+
+  <div id="content">
+    <h1 class="title">TDB Assembler</h1>
+    <p><a href="TODO">Assemblers</a>
+are a general mechanism in Jena to describe objects to be built,
+often these objects are models and datasets. Assemblers are used
+heavily in
+<a href="http://www.joseki.org/" title="http://www.joseki.org/">Joseki</a> for
+datset and model descriptions, for example.</p>
+<p>SPARQL queries operate over an
+<a href="http://www.w3.org/TR/rdf-sparql-query/#rdfDataset" title="http://www.w3.org/TR/rdf-sparql-query/#rdfDataset">RDF dataset</a>,
+which is a unnamed, default graph and zero or more named graphs.</p>
+<p>Having the description in a file means that the data that the
+application is going to work on can be changed without changing the
+program code.</p>
+<h2 id="contents">Contents</h2>
+<ul>
+<li><a href="#Dataset">Dataset</a><ul>
+<li><a href="#Union_Default_Graph">Union Default Graph</a></li>
+</ul>
+</li>
+<li><a href="#Graph">Graph</a></li>
+<li><a href="#Mixed_Datasets">Mixed Datasets</a></li>
+<li><a href="#RDFS">RDFS</a></li>
+</ul>
+<h2 id="dataset">Dataset</h2>
+<p>This is needed for use in <a href="fuseki.html" title="Fuseki">Fuseki</a> or
+<a href="http://www.joseki.org" title="http://www.joseki.org">Joseki</a>.</p>
+<p>A dataset can be constructed in an assembler file:</p>
+<div class="codehilite"><pre><span class="nv">@prefix</span> <span class="n">tdb:</span>     <span class="sr">&lt;http://jena.hpl.hp.com/2008/tdb#&gt;</span> <span class="o">.</span>
+<span class="nv">@prefix</span> <span class="n">rdf:</span>     <span class="sr">&lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;</span> <span class="o">.</span>
+<span class="nv">@prefix</span> <span class="n">rdfs:</span>    <span class="sr">&lt;http://www.w3.org/2000/01/rdf-schema#&gt;</span> <span class="o">.</span>
+<span class="nv">@prefix</span> <span class="n">ja:</span>      <span class="sr">&lt;http://jena.hpl.hp.com/2005/11/Assembler#&gt;</span> <span class="o">.</span>
+
+<span class="o">[]</span> <span class="n">ja:loadClass</span> <span class="s">&quot;com.hp.hpl.jena.tdb.TDB&quot;</span> <span class="o">.</span>
+<span class="n">tdb:DatasetTDB</span>  <span class="n">rdfs:subClassOf</span>  <span class="n">ja:RDFDataset</span> <span class="o">.</span>
+<span class="n">tdb:GraphTDB</span>    <span class="n">rdfs:subClassOf</span>  <span class="n">ja:Model</span>      <span class="o">.</span>
+
+<span class="sr">&lt;#dataset&gt;</span> <span class="n">rdf:type</span>         <span class="n">tdb:DatasetTDB</span><span class="err"> </span><span class="p">;</span>
+    <span class="n">tdb:location</span> <span class="s">&quot;DB&quot;</span><span class="err"> </span><span class="p">;</span>
+    <span class="o">.</span>
+</pre></div>
+
+
+<p>Only one dataset can be stored in a location (filing system
+directory).</p>
+<p>The first section declares the prefixes used later:</p>
+<div class="codehilite"><pre><span class="nv">@prefix</span> <span class="n">tdb:</span>     <span class="sr">&lt;http://jena.hpl.hp.com/2008/tdb#&gt;</span> <span class="o">.</span>
+<span class="nv">@prefix</span> <span class="n">rdf:</span>     <span class="sr">&lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;</span> <span class="o">.</span>
+<span class="nv">@prefix</span> <span class="n">rdfs:</span>    <span class="sr">&lt;http://www.w3.org/2000/01/rdf-schema#&gt;</span> <span class="o">.</span>
+<span class="nv">@prefix</span> <span class="n">ja:</span>      <span class="sr">&lt;http://jena.hpl.hp.com/2005/11/Assembler#&gt;</span> <span class="o">.</span>
+</pre></div>
+
+
+<p>then there is a statement that causes TDB to be loaded. TDB
+initialization occurs automatically when loaded. The TDB jar must
+be on the Java classpath.</p>
+<p>While order in this file does not matter to the machine, because in
+this case the jena assembler system checks for any <code>ja:loadClass</code>
+statements before any attempt to assemble an object is made, having
+it early in the file is helpful to any person looking at the file.</p>
+<div class="codehilite"><pre><span class="o">[]</span> <span class="n">ja:loadClass</span> <span class="s">&quot;com.hp.hpl.jena.tdb.TDB&quot;</span> <span class="o">.</span>
+</pre></div>
+
+
+<p>And finally there is the description of the TDB dataset itself:</p>
+<div class="codehilite"><pre><span class="sr">&lt;#graph&gt;</span> <span class="n">rdf:type</span> <span class="n">tdb:DatasetTDB</span><span class="err"> </span><span class="p">;</span>
+    <span class="n">tdb:location</span> <span class="s">&quot;DB&quot;</span><span class="err"> </span><span class="p">;</span>
+</pre></div>
+
+
+<p>The property <code>tdb:location</code> gives the file name as a string. It is
+relative to the applications current working directory, not where
+the assembler file is read from.</p>
+<p>The dataset description is usually found by looking for the one
+subject with type <code>tdb:GraphDataset</code>. If more than one graph is
+given in a single file, the application will have to specify which
+description it wishes to use.</p>
+<h3 id="union_default_graph">Union Default Graph</h3>
+<p>An assembler can specify that the default graph for query is the
+union of the named graphs. This is done by adding
+<em>tdb:unionDefaultGraph</em>.</p>
+<div class="codehilite"><pre><span class="sr">&lt;#dataset&gt;</span> <span class="n">rdf:type</span>         <span class="n">tdb:DatasetTDB</span><span class="err"> </span><span class="p">;</span>
+    <span class="n">tdb:location</span> <span class="s">&quot;DB&quot;</span><span class="err"> </span><span class="p">;</span>
+    <span class="n">tdb:unionDefaultGraph</span> <span class="n">true</span><span class="err"> </span><span class="p">;</span>
+    <span class="o">.</span>
+</pre></div>
+
+
+<h2 id="graph">Graph</h2>
+<p>A single graph can be described as well:</p>
+<div class="codehilite"><pre><span class="nv">@prefix</span> <span class="n">tdb:</span>     <span class="sr">&lt;http://jena.hpl.hp.com/2008/tdb#&gt;</span> <span class="o">.</span>
+<span class="nv">@prefix</span> <span class="n">rdf:</span>     <span class="sr">&lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;</span> <span class="o">.</span>
+<span class="nv">@prefix</span> <span class="n">ja:</span>      <span class="sr">&lt;http://jena.hpl.hp.com/2005/11/Assembler#&gt;</span> <span class="o">.</span>
+
+<span class="o">[]</span> <span class="n">ja:loadClass</span> <span class="s">&quot;com.hp.hpl.jena.tdb.TDB&quot;</span> <span class="o">.</span>
+
+ <span class="sr">&lt;#graph&gt;</span> <span class="n">rdf:type</span> <span class="n">tdb:GraphTDB</span><span class="err"> </span><span class="p">;</span>
+     <span class="n">tdb:location</span> <span class="s">&quot;DB&quot;</span> <span class="o">.</span>
+</pre></div>
+
+
+<p>but note that this graph is a single graph at that location; it is
+the default graph of a dataset.</p>
+<p>A particular named graph in the dataset at a location can be
+assembled with:</p>
+<div class="codehilite"><pre><span class="nv">@prefix</span> <span class="n">tdb:</span>     <span class="sr">&lt;http://jena.hpl.hp.com/2008/tdb#&gt;</span> <span class="o">.</span>
+<span class="nv">@prefix</span> <span class="n">rdf:</span>     <span class="sr">&lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;</span> <span class="o">.</span>
+<span class="nv">@prefix</span> <span class="n">ja:</span>      <span class="sr">&lt;http://jena.hpl.hp.com/2005/11/Assembler#&gt;</span> <span class="o">.</span>
+
+<span class="o">[]</span> <span class="n">ja:loadClass</span> <span class="s">&quot;com.hp.hpl.jena.tdb.TDB&quot;</span> <span class="o">.</span>
+
+<span class="sr">&lt;#graph&gt;</span> <span class="n">rdf:type</span> <span class="n">tdb:GraphTDB</span><span class="err"> </span><span class="p">;</span>
+     <span class="n">tdb:location</span> <span class="s">&quot;DB&quot;</span><span class="err"> </span><span class="p">;</span>
+     <span class="n">tdb:graphName</span> <span class="sr">&lt;http://example/graph1&gt;</span><span class="err"> </span><span class="p">;</span>
+     <span class="o">.</span>
+</pre></div>
+
+
+<p>It is also possible to describe a graph, or named graph, in a
+dataset where the dataset description can now be shared:</p>
+<div class="codehilite"><pre><span class="sr">&lt;#graph2&gt;</span> <span class="n">rdf:type</span> <span class="n">tdb:GraphTDB</span><span class="err"> </span><span class="p">;</span>
+     <span class="n">tdb:dataset</span> <span class="sr">&lt;#dataset&gt;</span><span class="err"> </span><span class="p">;</span>
+     <span class="o">.</span>
+
+<span class="sr">&lt;#dataset&gt;</span> <span class="n">rdf:type</span> <span class="n">tdb:DatasetTDB</span><span class="err"> </span><span class="p">;</span>
+   <span class="n">tdb:location</span> <span class="s">&quot;DB&quot;</span><span class="err"> </span><span class="p">;</span>
+   <span class="o">.</span>
+</pre></div>
+
+
+<h2 id="mixed_datasets">Mixed Datasets</h2>
+<p>It is possible to create a dataset with graphs backed by different
+storage subsystems, although query is not necessarily as
+efficient.</p>
+<p>To include as a named graph in a dataset use vocabulary as shown
+below:</p>
+<div class="codehilite"><pre><span class="nv">@prefix</span> <span class="n">tdb:</span>     <span class="sr">&lt;http://jena.hpl.hp.com/2008/tdb#&gt;</span> <span class="o">.</span>
+<span class="nv">@prefix</span> <span class="n">rdf:</span>     <span class="sr">&lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;</span> <span class="o">.</span>
+<span class="nv">@prefix</span> <span class="n">rdfs:</span>    <span class="sr">&lt;http://www.w3.org/2000/01/rdf-schema#&gt;</span> <span class="o">.</span>
+<span class="nv">@prefix</span> <span class="n">ja:</span>      <span class="sr">&lt;http://jena.hpl.hp.com/2005/11/Assembler#&gt;</span> <span class="o">.</span>
+
+<span class="o">[]</span> <span class="n">ja:loadClass</span> <span class="s">&quot;com.hp.hpl.jena.tdb.TDB&quot;</span> <span class="o">.</span>
+<span class="n">tdb:DatasetTDB</span>  <span class="n">rdfs:subClassOf</span>  <span class="n">ja:RDFDataset</span> <span class="o">.</span>
+<span class="n">tdb:GraphTDB</span>    <span class="n">rdfs:subClassOf</span>  <span class="n">ja:Model</span> <span class="o">.</span>
+
+<span class="c1"># A dataset of one TDB-backed graph as the default graph and an in-memory graph as a named graph.</span>
+<span class="sr">&lt;#dataset&gt;</span> <span class="n">rdf:type</span>      <span class="n">ja:RDFDataset</span><span class="err"> </span><span class="p">;</span>
+     <span class="n">ja:defaultGraph</span> <span class="sr">&lt;#graph&gt;</span><span class="err"> </span><span class="p">;</span>
+     <span class="n">ja:namedGraph</span>
+        <span class="p">[</span> <span class="n">ja:graphName</span>      <span class="sr">&lt;http://example.org/name1&gt;</span><span class="err"> </span><span class="p">;</span>
+          <span class="n">ja:graph</span>          <span class="sr">&lt;#graph2&gt;</span> <span class="p">]</span><span class="err"> </span><span class="p">;</span>
+     <span class="o">.</span>
+
+<span class="sr">&lt;#graph&gt;</span> <span class="n">rdf:type</span> <span class="n">tdb:GraphTDB</span><span class="err"> </span><span class="p">;</span>
+    <span class="n">tdb:location</span> <span class="s">&quot;DB&quot;</span><span class="err"> </span><span class="p">;</span>
+    <span class="o">.</span>
+
+<span class="sr">&lt;#graph2&gt;</span> <span class="n">rdf:type</span> <span class="n">ja:MemoryModel</span><span class="err"> </span><span class="p">;</span>
+     <span class="n">ja:content</span> <span class="p">[</span><span class="n">ja:externalContent</span> <span class="sr">&lt;file:Data/books.n3&gt;</span> <span class="p">]</span><span class="err"> </span><span class="p">;</span>
+     <span class="o">.</span>
+</pre></div>
+
+
+<p>Note here we added:</p>
+<div class="codehilite"><pre><span class="err">tdb:DatasetTDB</span>  <span class="err">rdfs:subClassOf</span>  <span class="err">ja:RDFDataset</span> <span class="err">.</span>
+<span class="err">tdb:GraphTDB</span>    <span class="err">rdfs:subClassOf</span>  <span class="err">ja:Model</span> <span class="err">.</span>
+</pre></div>
+
+
+<p>which provides for integration with complex model setups, such as
+reasoners.</p>
+<h2 id="rdfs">RDFS</h2>
+<p>(to be finished)</p>
+<div class="codehilite"><pre><span class="nv">@prefix</span> <span class="n">tdb:</span>     <span class="sr">&lt;http://jena.hpl.hp.com/2008/tdb#&gt;</span> <span class="o">.</span>
+<span class="nv">@prefix</span> <span class="n">rdf:</span>     <span class="sr">&lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;</span> <span class="o">.</span>
+<span class="nv">@prefix</span> <span class="n">rdfs:</span>    <span class="sr">&lt;http://www.w3.org/2000/01/rdf-schema#&gt;</span> <span class="o">.</span>
+<span class="nv">@prefix</span> <span class="n">ja:</span>      <span class="sr">&lt;http://jena.hpl.hp.com/2005/11/Assembler#&gt;</span> <span class="o">.</span>
+
+<span class="n">tdb:Dataset</span> <span class="n">a</span> <span class="n">rdfs:Class</span> <span class="o">.</span>
+<span class="n">tdb:GraphTDB</span> <span class="n">a</span> <span class="n">rdfs:Class</span> <span class="o">.</span>
+
+<span class="n">tdb:DatasetTDB</span>  <span class="n">rdfs:subClassOf</span>  <span class="n">ja:RDFDataset</span> <span class="o">.</span>
+<span class="n">tdb:GraphTDB</span>    <span class="n">rdfs:subClassOf</span>  <span class="n">ja:Model</span> <span class="o">.</span>
+
+<span class="n">tdb:location</span> <span class="n">a</span> <span class="n">rdf:Property</span><span class="err"> </span><span class="p">;</span>
+   <span class="c1"># domain is tdb:Dataset or tdb:GraphTDB</span>
+   <span class="c1"># The range is simple literal</span>
+   <span class="o">.</span>
+
+<span class="n">tdb:unionDefaultGraph</span> <span class="n">a</span> <span class="n">rdf:Property</span><span class="err"> </span><span class="p">;</span>
+   <span class="n">rdfs:domain</span> <span class="n">tdb:Dataset</span><span class="err"> </span><span class="p">;</span>
+   <span class="c1"># The range is xsd:boolean</span>
+   <span class="o">.</span>
+
+<span class="n">tdb:graphName</span> <span class="n">a</span> <span class="n">rdf:Property</span><span class="err"> </span><span class="p">;</span>
+   <span class="n">rdfs:domain</span> <span class="n">tdb:GraphTDB</span><span class="err"> </span><span class="p">;</span>
+   <span class="c1"># range is a URI</span>
+   <span class="o">.</span>
+</pre></div>
+  </div>
+
+  <div id="footer">
+    <div class="copyright">
+      <p>
+        Copyright &copy; 2011 The Apache Software Foundation, Licensed under
+        the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+        <br />
+        Apache Jena, Jena, the Apache Jena project logo,
+        Apache and the Apache feather logos are trademarks of The Apache Software Foundation.
+      </p>
+    </div>
+  </div>
+
+</body>
+</html>

Added: websites/staging/jena/trunk/content/jena/documentation/tdb/commands.html
==============================================================================
--- websites/staging/jena/trunk/content/jena/documentation/tdb/commands.html (added)
+++ websites/staging/jena/trunk/content/jena/documentation/tdb/commands.html Tue Nov  1 00:40:11 2011
@@ -0,0 +1,269 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+  <link href="/jena/css/jena.css" rel="stylesheet" type="text/css">
+  <title>Apache Jena - TDB Command-line Utilities</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+  <script src="/jena/js/jquery-1.6.4.min.js" type="text/javascript"></script>
+  <script src="/jena/js/jena-navigation.js" type="text/javascript"></script>
+</head>
+
+<body>
+  <div id="header">
+    <div id="logoblock">
+    <img alt="Apache Jena" src="/jena/images/jena-logo/jena-logo-small.png"/>
+    </div>
+
+    <div id="titleblock">
+      <h1 class="title">Apache Jena</h1>
+      <div id="topmenu" class="tabbar round-10">
+        <ul>
+        <li class="round-top-8"><a class="round-top-8" href="/jena/index.html" id="home_menu">Home</a></li>
+        <li class="round-top-8"><a class="round-top-8" href="/jena/help_and_support/index.html">Support</a></li>
+        <li class="round-top-8"><a class="round-top-8" href="/jena/getting_started/index.html">Getting started</a></li>
+        <li class="round-top-8"><a class="round-top-8" href="/jena/tutorials/index.html">Tutorials</a></li>
+        <li class="round-top-8"><a class="round-top-8" href="/jena/documentation/index.html">Documentation</a></li>
+        </ul>
+      </div>
+    </div>
+  </div>
+
+  <div id="navigation" class="clear">
+  <h1 id="quick_links">Quick links</h1>
+<ul>
+<li><a href="/jena/index.html">Home</a></li>
+<li><a href="/jena/download/index.html">Downloads</a></li>
+<li><a href="/jena/help_and_support/index.html">Help and support</a></li>
+<li><a href="/jena/help_and_support/bugs_and_suggestions.html">Report a bug</a></li>
+<li><a href="/jena/about_jena/roadmap.html">Roadmap</a></li>
+<li><a href="/jena/getting_involved/index.html">Getting involved</a></li>
+<li><a href="/jena/documentation/">Documentation</a></li>
+</ul>
+<h1 id="about_jena">About Jena</h1>
+<ul>
+<li><a href="/jena/index.html">Home</a></li>
+<li><a href="/jena/about_jena/about.html">About Jena</a></li>
+<li><a href="/jena/about_jena/architecture.html">Architecture</a></li>
+<li><a href="/jena/about_jena/roadmap.html">Roadmap</a></li>
+<li><a href="/jena/about_jena/team.html">Project team</a></li>
+</ul>
+<h1 id="download">Download</h1>
+<ul>
+<li><a href="/jena/download/index.html">Downloading Jena</a></li>
+<li><a href="/jena/download/maven.html">Using Maven</a></li>
+<li><a href="/jena/download/osgi.html">Using OSGi</a></li>
+</ul>
+<h1 id="help_and_support">Help and support</h1>
+<ul>
+<li><a href="/jena/help_and_support/index.html">Getting help</a></li>
+<li><a href="/jena/help_and_support/bugs_and_suggestions.html">Bugs and suggestions</a></li>
+</ul>
+<h1 id="getting_started">Getting Started</h1>
+<ul>
+<li><a href="/jena/getting_started/index.html">A first Jena project</a></li>
+<li><a href="/jena/getting_started/rdf_api.html">RDF API overview</a></li>
+<li><a href="/jena/getting_started/sparql.html">Querying RDF with SPARQL</a></li>
+<li><a href="/jena/getting_started/fuseki.html">Serving RDF over HTTP</a></li>
+<li><a href="/jena/getting_started/tell_me_how.html">Tell me how to ...</a></li>
+</ul>
+<h1 id="tutorials">Tutorials</h1>
+<ul>
+<li><a href="/jena/tutorials/index.html">RDF tutorial</a></li>
+<li><a href="/jena/tutorials/sparql.html">SPARQL queries</a></li>
+<li><a href="/jena/tutorials/using_jena_with_eclipse.html">Using Jena with Eclipse</a></li>
+</ul>
+<h1 id="documentation">Documentation</h1>
+<ul>
+<li><a href="/jena/documentation/index.html">Overview</a></li>
+<li><a href="/jena/documentation/javadoc">Javadoc</a></li>
+<li><a href="/jena/documentation/rdf/index.html">RDF</a></li>
+<li><a href="/jena/documentation/query/index.html">SPARQL (ARQ)</a></li>
+<li><a href="/jena/documentation/tdb/index.html">TDB</a></li>
+<li><a href="/jena/documentation/sdb/index.html">SDB</a><ul>
+<li><a href="/jena/documentation/sdb/installation.html">Installation</a></li>
+<li><a href="/jena/documentation/sdb/quickstart.html">Quick start</a></li>
+<li><a href="/jena/documentation/sdb/commands.html">Cmd line</a></li>
+<li><a href="/jena/documentation/sdb/javaapi.html">Java API</a></li>
+<li><a href="/jena/documentation/sdb/configuration.html">Config</a></li>
+<li><a href="/jena/documentation/sdb/databases_supported.html">Databases</a></li>
+</ul>
+</li>
+<li><a href="/jena/documentation/larq/index.html">LARQ</a></li>
+<li><a href="/jena/documentation/serving_data/index.html">Serving Data</a></li>
+<li><a href="/jena/documentation/ontology/index.html">Ontology</a></li>
+<li><a href="/jena/documentation/inference/index.html">Inference</a></li>
+<li><a href="/jena/documentation/assembler/index.html">Assembler</a><ul>
+<li><a href="/jena/documentation/assembler/assembler-howto.html">Assembler how-to</a></li>
+<li><a href="/jena/documentation/assembler/inside-assemblers.html">Inside assemblers</a></li>
+</ul>
+</li>
+<li><a href="/jena/documentation/io/index.html">I/O</a><ul>
+<li><a href="/jena/documentation/io/iohowto.html">I/O how-to</a></li>
+</ul>
+</li>
+<li><a href="/jena/documentation/notes/index.html">Notes</a><ul>
+<li><a href="/jena/documentation/notes/concurrency-howto.html">Concurrency how-to</a></li>
+<li><a href="/jena/documentation/notes/event-handler-howto.html">Event handler how-to</a></li>
+<li><a href="/jena/documentation/notes/file-manager.html">File manager how-to</a></li>
+<li><a href="/jena/documentation/notes/model-factory.html">Model factory how-to</a></li>
+<li><a href="/jena/documentation/notes/rdf-frames.html">RDF frames</a></li>
+<li><a href="/jena/documentation/notes/reification.html">Reification how-to</a></li>
+<li><a href="/jena/documentation/notes/typed-literals.html">Typed literals how-to</a></li>
+</ul>
+</li>
+<li><a href="/jena/documentation/tools/index.html">Tools</a><ul>
+<li><a href="/jena/documentation/tools/schemagen.html">schemagen</a></li>
+</ul>
+</li>
+</ul>
+<h1 id="getting_involved">Getting Involved</h1>
+<ul>
+<li><a href="/jena/getting_involved/index.html">Contributing to Jena</a></li>
+</ul>
+<h1 id="asf_links">ASF links</h1>
+<ul>
+<li><a href="http://www.apache.org">Apache Software Foundation</a></li>
+<li><a href="http://www.apache.org/licenses/LICENSE-2.0">License</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+  </div>
+
+  <div id="content">
+    <h1 class="title">TDB Command-line Utilities</h1>
+    <h2 id="contents">Contents</h2>
+<ul>
+<li><a href="#Scripts">Scripts</a><ul>
+<li><a href="#Script_set_up">Script set up</a></li>
+<li><a href="#Argument_Structure">Argument Structure</a></li>
+<li><a href="#Setting_options_from_the_command_line">Setting options from the command line</a></li>
+</ul>
+</li>
+<li><a href="#TDB_Commands">TDB Commands</a><ul>
+<li><a href="#Store_description">Store description</a></li>
+<li><a href="#tdbloader">tdbloader</a></li>
+<li><a href="#tdbloader2">tdbloader2</a></li>
+<li><a href="#tdbquery">tdbquery</a></li>
+<li><a href="#tdbdump">tdbdump</a></li>
+<li><a href="#tdbstats">tdbstats</a></li>
+</ul>
+</li>
+</ul>
+<h2 id="scripts">Scripts</h2>
+<p>The directory <code>bin/</code> contains shell scripts to run the commands
+from the command line. The scripts are bash scripts which also run
+over <a href="http://www.cygwin.com/" title="http://www.cygwin.com/">Cygwin</a>.</p>
+<h3 id="script_set_up">Script set up</h3>
+<p>Set the environment variable <code>TDBROOT</code> to the root of the the TDB
+installation.</p>
+<p>They are bash scripts, and work on Linux and Cygwin for MS
+Windows.</p>
+<div class="codehilite"><pre> <span class="nv">$</span> <span class="nv">PATH</span><span class="o">=</span><span class="nv">$TDBROOT</span><span class="o">/</span><span class="n">bin:</span><span class="nv">$PATH</span>
+</pre></div>
+
+
+<p>Alternatively, there are wrapper scripts in <code>$TDBROOT/bin2</code> which
+can be placed in a convenient directory that is already on the
+shell command path.</p>
+<h3 id="argument_structure">Argument Structure</h3>
+<p>Each command then has command-specific arguments described below.</p>
+<p>All commands support <code>--help</code> to give details of named and
+positional arguments.</p>
+<p>There are two equivalent forms of named argument syntax:</p>
+<div class="codehilite"><pre><span class="o">--</span><span class="n">arg</span><span class="o">=</span><span class="n">val</span>
+
+<span class="o">--</span><span class="n">arg</span> <span class="n">val</span>
+</pre></div>
+
+
+<h3 id="setting_options_from_the_command_line">Setting options from the command line</h3>
+<p>TDB has a number of
+<a href="configuration.html" title="TDB/Configuration">configuration options</a>
+which can be set from the command line using:</p>
+<div class="codehilite"><pre> <span class="o">--</span><span class="n">set</span> <span class="n">tdb:symbol</span><span class="o">=</span><span class="n">value</span>
+</pre></div>
+
+
+<p>Using tdb: is really a short hand for the URI prefix
+http://jena.hpl.hp.com/TDB# so the full URI form is</p>
+<div class="codehilite"><pre> <span class="o">--</span><span class="n">set</span> <span class="n">http:</span><span class="sr">//</span><span class="n">jena</span><span class="o">.</span><span class="n">hpl</span><span class="o">.</span><span class="n">hp</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">TDB</span><span class="c1">#symbol=value</span>
+</pre></div>
+
+
+<h2 id="tdb_commands">TDB Commands</h2>
+<h3 id="store_description">Store description</h3>
+<p>TDB commands use an assembler description for the persistent store</p>
+<div class="codehilite"><pre><span class="o">--</span><span class="n">desc</span><span class="o">=</span><span class="n">assembler</span><span class="o">.</span><span class="n">ttl</span>
+<span class="o">--</span><span class="n">tdb</span><span class="o">=</span><span class="n">assembler</span><span class="o">.</span><span class="n">ttl</span>
+</pre></div>
+
+
+<p>or a direct reference to the directory with the index and node
+files:</p>
+<div class="codehilite"><pre><span class="o">--</span><span class="n">loc</span><span class="o">=</span><span class="n">DIRECTORY</span>
+<span class="o">--</span><span class="n">location</span><span class="o">=</span><span class="n">DIRECTORY</span>
+</pre></div>
+
+
+<p>The assembler description follow the form for a dataset given in
+<a href="assembler.html" title="TDB/Assembler">TDB assembler description</a> page.</p>
+<p>If neither assembler file nor location is given, <code>--desc=tdb.ttl</code>
+is assumed.</p>
+<h3 id="tdbloader"><code>tdbloader</code></h3>
+<p>Bulk loader and index builder. Performans bulk load operations more
+efficiently than simply reading RDF into a TDB-back model.</p>
+<h3 id="tdbloader2"><code>tdbloader2</code></h3>
+<p>Bulk loader and index builder. Faster than tdbloader but only works
+on Linux and Mac OS/X.</p>
+<p>This bulk loader can only be used to create a database. It may
+overwrite existing data. It only accepts the --loc argument and a
+list of files to load.</p>
+<h3 id="tdbquery"><code>tdbquery</code></h3>
+<p>Invoke a SPARQL query on a store. Use <code>--time</code> for timing
+information. The store is attached on each run of this command so
+timing includes some overhead not present in a running system.</p>
+<p>Details about query execution can be obtained -- see notes on the
+<a href="optimizer.html#Investigating_what_is_going_on" title="TDB/Optimizer">TDB Optimizer</a>.</p>
+<h3 id="tdbdump"><code>tdbdump</code></h3>
+<p>(Version 0.8.5)</p>
+<p>Dump the store in
+<a href="http://sw.deri.org/2008/07/n-quads/" title="http://sw.deri.org/2008/07/n-quads/">N-Quads</a>
+format.</p>
+<h3 id="tdbstats">tdbstats</h3>
+<p>Produce a statistics for the dataset. See the
+<a href="optimizer.html#Statistics_Rule_File" title="TDB/Optimizer">TDB Optimizer description.</a>.</p>
+  </div>
+
+  <div id="footer">
+    <div class="copyright">
+      <p>
+        Copyright &copy; 2011 The Apache Software Foundation, Licensed under
+        the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+        <br />
+        Apache Jena, Jena, the Apache Jena project logo,
+        Apache and the Apache feather logos are trademarks of The Apache Software Foundation.
+      </p>
+    </div>
+  </div>
+
+</body>
+</html>

Added: websites/staging/jena/trunk/content/jena/documentation/tdb/configuration.html
==============================================================================
--- websites/staging/jena/trunk/content/jena/documentation/tdb/configuration.html (added)
+++ websites/staging/jena/trunk/content/jena/documentation/tdb/configuration.html Tue Nov  1 00:40:11 2011
@@ -0,0 +1,273 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+  <link href="/jena/css/jena.css" rel="stylesheet" type="text/css">
+  <title>Apache Jena - TDB Configuration</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+  <script src="/jena/js/jquery-1.6.4.min.js" type="text/javascript"></script>
+  <script src="/jena/js/jena-navigation.js" type="text/javascript"></script>
+</head>
+
+<body>
+  <div id="header">
+    <div id="logoblock">
+    <img alt="Apache Jena" src="/jena/images/jena-logo/jena-logo-small.png"/>
+    </div>
+
+    <div id="titleblock">
+      <h1 class="title">Apache Jena</h1>
+      <div id="topmenu" class="tabbar round-10">
+        <ul>
+        <li class="round-top-8"><a class="round-top-8" href="/jena/index.html" id="home_menu">Home</a></li>
+        <li class="round-top-8"><a class="round-top-8" href="/jena/help_and_support/index.html">Support</a></li>
+        <li class="round-top-8"><a class="round-top-8" href="/jena/getting_started/index.html">Getting started</a></li>
+        <li class="round-top-8"><a class="round-top-8" href="/jena/tutorials/index.html">Tutorials</a></li>
+        <li class="round-top-8"><a class="round-top-8" href="/jena/documentation/index.html">Documentation</a></li>
+        </ul>
+      </div>
+    </div>
+  </div>
+
+  <div id="navigation" class="clear">
+  <h1 id="quick_links">Quick links</h1>
+<ul>
+<li><a href="/jena/index.html">Home</a></li>
+<li><a href="/jena/download/index.html">Downloads</a></li>
+<li><a href="/jena/help_and_support/index.html">Help and support</a></li>
+<li><a href="/jena/help_and_support/bugs_and_suggestions.html">Report a bug</a></li>
+<li><a href="/jena/about_jena/roadmap.html">Roadmap</a></li>
+<li><a href="/jena/getting_involved/index.html">Getting involved</a></li>
+<li><a href="/jena/documentation/">Documentation</a></li>
+</ul>
+<h1 id="about_jena">About Jena</h1>
+<ul>
+<li><a href="/jena/index.html">Home</a></li>
+<li><a href="/jena/about_jena/about.html">About Jena</a></li>
+<li><a href="/jena/about_jena/architecture.html">Architecture</a></li>
+<li><a href="/jena/about_jena/roadmap.html">Roadmap</a></li>
+<li><a href="/jena/about_jena/team.html">Project team</a></li>
+</ul>
+<h1 id="download">Download</h1>
+<ul>
+<li><a href="/jena/download/index.html">Downloading Jena</a></li>
+<li><a href="/jena/download/maven.html">Using Maven</a></li>
+<li><a href="/jena/download/osgi.html">Using OSGi</a></li>
+</ul>
+<h1 id="help_and_support">Help and support</h1>
+<ul>
+<li><a href="/jena/help_and_support/index.html">Getting help</a></li>
+<li><a href="/jena/help_and_support/bugs_and_suggestions.html">Bugs and suggestions</a></li>
+</ul>
+<h1 id="getting_started">Getting Started</h1>
+<ul>
+<li><a href="/jena/getting_started/index.html">A first Jena project</a></li>
+<li><a href="/jena/getting_started/rdf_api.html">RDF API overview</a></li>
+<li><a href="/jena/getting_started/sparql.html">Querying RDF with SPARQL</a></li>
+<li><a href="/jena/getting_started/fuseki.html">Serving RDF over HTTP</a></li>
+<li><a href="/jena/getting_started/tell_me_how.html">Tell me how to ...</a></li>
+</ul>
+<h1 id="tutorials">Tutorials</h1>
+<ul>
+<li><a href="/jena/tutorials/index.html">RDF tutorial</a></li>
+<li><a href="/jena/tutorials/sparql.html">SPARQL queries</a></li>
+<li><a href="/jena/tutorials/using_jena_with_eclipse.html">Using Jena with Eclipse</a></li>
+</ul>
+<h1 id="documentation">Documentation</h1>
+<ul>
+<li><a href="/jena/documentation/index.html">Overview</a></li>
+<li><a href="/jena/documentation/javadoc">Javadoc</a></li>
+<li><a href="/jena/documentation/rdf/index.html">RDF</a></li>
+<li><a href="/jena/documentation/query/index.html">SPARQL (ARQ)</a></li>
+<li><a href="/jena/documentation/tdb/index.html">TDB</a></li>
+<li><a href="/jena/documentation/sdb/index.html">SDB</a><ul>
+<li><a href="/jena/documentation/sdb/installation.html">Installation</a></li>
+<li><a href="/jena/documentation/sdb/quickstart.html">Quick start</a></li>
+<li><a href="/jena/documentation/sdb/commands.html">Cmd line</a></li>
+<li><a href="/jena/documentation/sdb/javaapi.html">Java API</a></li>
+<li><a href="/jena/documentation/sdb/configuration.html">Config</a></li>
+<li><a href="/jena/documentation/sdb/databases_supported.html">Databases</a></li>
+</ul>
+</li>
+<li><a href="/jena/documentation/larq/index.html">LARQ</a></li>
+<li><a href="/jena/documentation/serving_data/index.html">Serving Data</a></li>
+<li><a href="/jena/documentation/ontology/index.html">Ontology</a></li>
+<li><a href="/jena/documentation/inference/index.html">Inference</a></li>
+<li><a href="/jena/documentation/assembler/index.html">Assembler</a><ul>
+<li><a href="/jena/documentation/assembler/assembler-howto.html">Assembler how-to</a></li>
+<li><a href="/jena/documentation/assembler/inside-assemblers.html">Inside assemblers</a></li>
+</ul>
+</li>
+<li><a href="/jena/documentation/io/index.html">I/O</a><ul>
+<li><a href="/jena/documentation/io/iohowto.html">I/O how-to</a></li>
+</ul>
+</li>
+<li><a href="/jena/documentation/notes/index.html">Notes</a><ul>
+<li><a href="/jena/documentation/notes/concurrency-howto.html">Concurrency how-to</a></li>
+<li><a href="/jena/documentation/notes/event-handler-howto.html">Event handler how-to</a></li>
+<li><a href="/jena/documentation/notes/file-manager.html">File manager how-to</a></li>
+<li><a href="/jena/documentation/notes/model-factory.html">Model factory how-to</a></li>
+<li><a href="/jena/documentation/notes/rdf-frames.html">RDF frames</a></li>
+<li><a href="/jena/documentation/notes/reification.html">Reification how-to</a></li>
+<li><a href="/jena/documentation/notes/typed-literals.html">Typed literals how-to</a></li>
+</ul>
+</li>
+<li><a href="/jena/documentation/tools/index.html">Tools</a><ul>
+<li><a href="/jena/documentation/tools/schemagen.html">schemagen</a></li>
+</ul>
+</li>
+</ul>
+<h1 id="getting_involved">Getting Involved</h1>
+<ul>
+<li><a href="/jena/getting_involved/index.html">Contributing to Jena</a></li>
+</ul>
+<h1 id="asf_links">ASF links</h1>
+<ul>
+<li><a href="http://www.apache.org">Apache Software Foundation</a></li>
+<li><a href="http://www.apache.org/licenses/LICENSE-2.0">License</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+  </div>
+
+  <div id="content">
+    <h1 class="title">TDB Configuration</h1>
+    <p>There are a number of configuration options that affect the
+operation of TDB.</p>
+<h2 id="contents">Contents</h2>
+<ul>
+<li><a href="#Setting_Options">Setting Options</a><ul>
+<li><a href="#Setting_from_the_command_line">Setting from the command line</a></li>
+<li><a href="#Setting_with_Java_System_properties">Setting with Java System properties</a></li>
+</ul>
+</li>
+<li><a href="#Query_of_the_union_of_named_graphs">Query of the union of named graphs</a></li>
+<li><a href="#Logging_Query_Execution">Logging Query Execution</a></li>
+<li><a href="#Dataset_Caching">Dataset Caching</a></li>
+<li><a href="#File_Access_Mode">File Access Mode</a></li>
+<li><a href="#TDB_Configuration_Symbols">TDB Configuration Symbols</a></li>
+</ul>
+<h2 id="setting_options">Setting Options</h2>
+<p>Options can be set globally, through out the JVM, or on a per query
+execution basis. TDB uses the same mechanism as
+<a href="http://jena.sf.net/ARQ" title="http://jena.sf.net/ARQ">ARQ</a>.</p>
+<p>There is a global context, which is give to each query query
+execution as it is created. Modifications to the global context
+after the query execution is created are not seen by the query
+execution. Modifications to the context of a single query execution
+do not affect any other query execution nor the global context.</p>
+<p>A context is a set of symbol/value pairs. Symbols are used created
+internal to ARQ and TDB and accessed via Java constants. Values are
+any Java object, together with the values <code>true</code> and <code>false</code>, which
+are short for the constants of class <code>java.lang.Boolean</code>.</p>
+<p>Setting globally:</p>
+<div class="codehilite"><pre> <span class="n">TDB</span><span class="o">.</span><span class="n">getContext</span><span class="p">()</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="n">symbol</span><span class="p">,</span> <span class="n">value</span><span class="p">)</span><span class="err"> </span><span class="p">;</span>
+</pre></div>
+
+
+<p>Per query execution:</p>
+<div class="codehilite"><pre> <span class="n">QueryExecution</span> <span class="n">qExec</span> <span class="o">=</span> <span class="n">QueryExecutionFactory</span><span class="o">.</span><span class="n">create</span><span class="p">(</span><span class="o">...</span><span class="p">)</span><span class="err"> </span><span class="p">;</span>
+ <span class="n">qExec</span><span class="o">.</span><span class="n">getContext</span><span class="p">()</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="n">symbol</span><span class="p">,</span> <span class="n">value</span><span class="p">)</span><span class="err"> </span><span class="p">;</span>
+</pre></div>
+
+
+<p>Setting for a query execution happens before any query compilation
+or setup happens. Creation of a query execution object does not
+compile the query, which happens when the appropriate <code>.exec</code>
+method is called.</p>
+<h3 id="setting_from_the_command_line">Setting from the command line</h3>
+<p>Options can also set from the
+<a href="commands.html#Setting_options_from_the_command_line" title="TDB/Commands">command line</a>.</p>
+<h3 id="setting_with_java_system_properties">Setting with Java System properties</h3>
+<p>(TDB 0.8.5 and later)</p>
+<p>Options can be set when invoking the JVM using the Java system
+properties as set by "-D".</p>
+<h2 id="query_of_the_union_of_named_graphs">Query of the union of named graphs</h2>
+<p>See <a href="datasets.html" title="TDB/Datasets">TDB/Datasets</a>.</p>
+<h2 id="logging_query_execution">Logging Query Execution</h2>
+<p>If the symbol "<code>tdb:logExec</code>" is set to "true", and also the logger
+<code>com.hp.hpl.jena.tdb.exec</code> is enabled fro level "info", then each
+basic graph patterns is logged before execution. This pattern
+logged is after substitution of variable values and after
+optimization by the
+<a href="optimizer.html" title="TDB/Optimizer">BGP optimizer</a>.</p>
+<h2 id="dataset_caching">Dataset Caching</h2>
+<p>(TDB 0.8.0 and later)</p>
+<p>TDB caches datasets based on the location of the backing directory.
+Within a single JVM, all attempts to create or open a dataset at a
+particular location go through the same dataset (and same disk
+caching). Therefore, an application can open the same location
+several times in different places in the code and still get the
+same underlying dataset for query and update.</p>
+<p>Note that closing the dataset closes it everywhere (the opening
+calls are not being reference counted).</p>
+<h2 id="file_access_mode">File Access Mode</h2>
+<p>The context symbol can be set to "mapped" or "direct". Unset, or
+the value "default", ask TDB to use to make the choice based on
+JVM. Leaving it to the default is <em>strongly</em> encouraged.</p>
+<h2 id="tdb_configuration_symbols">TDB Configuration Symbols</h2>
+<p>Configuration Symbols</p>
+<table>
+<thead>
+<tr>
+<th>Symbol</th>
+<th>Java Constant</th>
+<th>Effect</th>
+<th>Default</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td><code>tdb:logExec</code></td>
+<td><code>TDB.symLogExec</code></td>
+<td>Log execution of BGPs. Set to "true" to enable. Must also enable the logger "com.hp.hpl.jena.tdb.exec". e.g. log4j.properties <code>log4j.logger.com.hp.hpl.jena.tdb.exec=INFO</code></td>
+<td>unset</td>
+</tr>
+<tr>
+<td><code>tdb:unionDefaultGraph</code></td>
+<td><code>TDB.symUnionDefaultGraph</code></td>
+<td>Query patterns on the default graph match against the union of the named graphs.</td>
+<td>unset</td>
+</tr>
+<tr>
+<td><code>tdb:fileMode</code></td>
+<td><code>SystemTDB.fileMode</code></td>
+<td>Force use of memory mapped files (<code>"mapped"</code>) or direct file caching (<code>"direct"</code>). See discussion of TDB on 32 or 64 bit hardware, especially limitations of memory mapped files on 32 bit Java.</td>
+<td>Set by the system based on 32 or 64 bit java.</td>
+</tr>
+</tbody>
+</table>
+  </div>
+
+  <div id="footer">
+    <div class="copyright">
+      <p>
+        Copyright &copy; 2011 The Apache Software Foundation, Licensed under
+        the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+        <br />
+        Apache Jena, Jena, the Apache Jena project logo,
+        Apache and the Apache feather logos are trademarks of The Apache Software Foundation.
+      </p>
+    </div>
+  </div>
+
+</body>
+</html>

Added: websites/staging/jena/trunk/content/jena/documentation/tdb/datasets.html
==============================================================================
--- websites/staging/jena/trunk/content/jena/documentation/tdb/datasets.html (added)
+++ websites/staging/jena/trunk/content/jena/documentation/tdb/datasets.html Tue Nov  1 00:40:11 2011
@@ -0,0 +1,233 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE- 2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+  <link href="/jena/css/jena.css" rel="stylesheet" type="text/css">
+  <title>Apache Jena - TDB Datasets</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+  <script src="/jena/js/jquery-1.6.4.min.js" type="text/javascript"></script>
+  <script src="/jena/js/jena-navigation.js" type="text/javascript"></script>
+</head>
+
+<body>
+  <div id="header">
+    <div id="logoblock">
+    <img alt="Apache Jena" src="/jena/images/jena-logo/jena-logo-small.png"/>
+    </div>
+
+    <div id="titleblock">
+      <h1 class="title">Apache Jena</h1>
+      <div id="topmenu" class="tabbar round-10">
+        <ul>
+        <li class="round-top-8"><a class="round-top-8" href="/jena/index.html" id="home_menu">Home</a></li>
+        <li class="round-top-8"><a class="round-top-8" href="/jena/help_and_support/index.html">Support</a></li>
+        <li class="round-top-8"><a class="round-top-8" href="/jena/getting_started/index.html">Getting started</a></li>
+        <li class="round-top-8"><a class="round-top-8" href="/jena/tutorials/index.html">Tutorials</a></li>
+        <li class="round-top-8"><a class="round-top-8" href="/jena/documentation/index.html">Documentation</a></li>
+        </ul>
+      </div>
+    </div>
+  </div>
+
+  <div id="navigation" class="clear">
+  <h1 id="quick_links">Quick links</h1>
+<ul>
+<li><a href="/jena/index.html">Home</a></li>
+<li><a href="/jena/download/index.html">Downloads</a></li>
+<li><a href="/jena/help_and_support/index.html">Help and support</a></li>
+<li><a href="/jena/help_and_support/bugs_and_suggestions.html">Report a bug</a></li>
+<li><a href="/jena/about_jena/roadmap.html">Roadmap</a></li>
+<li><a href="/jena/getting_involved/index.html">Getting involved</a></li>
+<li><a href="/jena/documentation/">Documentation</a></li>
+</ul>
+<h1 id="about_jena">About Jena</h1>
+<ul>
+<li><a href="/jena/index.html">Home</a></li>
+<li><a href="/jena/about_jena/about.html">About Jena</a></li>
+<li><a href="/jena/about_jena/architecture.html">Architecture</a></li>
+<li><a href="/jena/about_jena/roadmap.html">Roadmap</a></li>
+<li><a href="/jena/about_jena/team.html">Project team</a></li>
+</ul>
+<h1 id="download">Download</h1>
+<ul>
+<li><a href="/jena/download/index.html">Downloading Jena</a></li>
+<li><a href="/jena/download/maven.html">Using Maven</a></li>
+<li><a href="/jena/download/osgi.html">Using OSGi</a></li>
+</ul>
+<h1 id="help_and_support">Help and support</h1>
+<ul>
+<li><a href="/jena/help_and_support/index.html">Getting help</a></li>
+<li><a href="/jena/help_and_support/bugs_and_suggestions.html">Bugs and suggestions</a></li>
+</ul>
+<h1 id="getting_started">Getting Started</h1>
+<ul>
+<li><a href="/jena/getting_started/index.html">A first Jena project</a></li>
+<li><a href="/jena/getting_started/rdf_api.html">RDF API overview</a></li>
+<li><a href="/jena/getting_started/sparql.html">Querying RDF with SPARQL</a></li>
+<li><a href="/jena/getting_started/fuseki.html">Serving RDF over HTTP</a></li>
+<li><a href="/jena/getting_started/tell_me_how.html">Tell me how to ...</a></li>
+</ul>
+<h1 id="tutorials">Tutorials</h1>
+<ul>
+<li><a href="/jena/tutorials/index.html">RDF tutorial</a></li>
+<li><a href="/jena/tutorials/sparql.html">SPARQL queries</a></li>
+<li><a href="/jena/tutorials/using_jena_with_eclipse.html">Using Jena with Eclipse</a></li>
+</ul>
+<h1 id="documentation">Documentation</h1>
+<ul>
+<li><a href="/jena/documentation/index.html">Overview</a></li>
+<li><a href="/jena/documentation/javadoc">Javadoc</a></li>
+<li><a href="/jena/documentation/rdf/index.html">RDF</a></li>
+<li><a href="/jena/documentation/query/index.html">SPARQL (ARQ)</a></li>
+<li><a href="/jena/documentation/tdb/index.html">TDB</a></li>
+<li><a href="/jena/documentation/sdb/index.html">SDB</a><ul>
+<li><a href="/jena/documentation/sdb/installation.html">Installation</a></li>
+<li><a href="/jena/documentation/sdb/quickstart.html">Quick start</a></li>
+<li><a href="/jena/documentation/sdb/commands.html">Cmd line</a></li>
+<li><a href="/jena/documentation/sdb/javaapi.html">Java API</a></li>
+<li><a href="/jena/documentation/sdb/configuration.html">Config</a></li>
+<li><a href="/jena/documentation/sdb/databases_supported.html">Databases</a></li>
+</ul>
+</li>
+<li><a href="/jena/documentation/larq/index.html">LARQ</a></li>
+<li><a href="/jena/documentation/serving_data/index.html">Serving Data</a></li>
+<li><a href="/jena/documentation/ontology/index.html">Ontology</a></li>
+<li><a href="/jena/documentation/inference/index.html">Inference</a></li>
+<li><a href="/jena/documentation/assembler/index.html">Assembler</a><ul>
+<li><a href="/jena/documentation/assembler/assembler-howto.html">Assembler how-to</a></li>
+<li><a href="/jena/documentation/assembler/inside-assemblers.html">Inside assemblers</a></li>
+</ul>
+</li>
+<li><a href="/jena/documentation/io/index.html">I/O</a><ul>
+<li><a href="/jena/documentation/io/iohowto.html">I/O how-to</a></li>
+</ul>
+</li>
+<li><a href="/jena/documentation/notes/index.html">Notes</a><ul>
+<li><a href="/jena/documentation/notes/concurrency-howto.html">Concurrency how-to</a></li>
+<li><a href="/jena/documentation/notes/event-handler-howto.html">Event handler how-to</a></li>
+<li><a href="/jena/documentation/notes/file-manager.html">File manager how-to</a></li>
+<li><a href="/jena/documentation/notes/model-factory.html">Model factory how-to</a></li>
+<li><a href="/jena/documentation/notes/rdf-frames.html">RDF frames</a></li>
+<li><a href="/jena/documentation/notes/reification.html">Reification how-to</a></li>
+<li><a href="/jena/documentation/notes/typed-literals.html">Typed literals how-to</a></li>
+</ul>
+</li>
+<li><a href="/jena/documentation/tools/index.html">Tools</a><ul>
+<li><a href="/jena/documentation/tools/schemagen.html">schemagen</a></li>
+</ul>
+</li>
+</ul>
+<h1 id="getting_involved">Getting Involved</h1>
+<ul>
+<li><a href="/jena/getting_involved/index.html">Contributing to Jena</a></li>
+</ul>
+<h1 id="asf_links">ASF links</h1>
+<ul>
+<li><a href="http://www.apache.org">Apache Software Foundation</a></li>
+<li><a href="http://www.apache.org/licenses/LICENSE-2.0">License</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
+<li><a href="http://www.apache.org/security/">Security</a></li>
+</ul>
+  </div>
+
+  <div id="content">
+    <h1 class="title">TDB Datasets</h1>
+    <p>An
+<a href="http://www.w3.org/TR/rdf-sparql-query/#rdfDataset" title="http://www.w3.org/TR/rdf-sparql-query/#rdfDataset">RDF Dataset</a>
+is a collection of one, unnamed, default graph and zero, or more
+named graphs. In a SPARQL query, a query pattern is matched against
+the default graph unless the GRAPH keyword is applied to a
+pattern.</p>
+<h2 id="dataset_storage">Dataset Storage</h2>
+<p>One file location (directory) is used to store one RDF dataset. The
+unnamed graph of the dataset is held as a single graph while all
+the named graphs are held in a collection of quad indexes.</p>
+<p>Every dataset is obtained via TDBFactory.createDataset(Location)
+within a JVM is the same dataset. If a model is obtained from via
+TDBFactory.createModel(Location) there is a hidden, shared dataset
+and the appropriate model is returned.</p>
+<h2 id="dataset_query">Dataset Query</h2>
+<p>There is full support for SPARQL query over named graphs in a
+TDB-back dataset.</p>
+<p>All the named graphs can be treated as a single graph which is the
+union (RDF merge) of all the named graphs. This is given the
+special graph name &lt;urn:x-arq:UnionGraph&gt; in a GRAPH pattern.</p>
+<p>When querying the RDF merge of named graphs, the default graph in
+the store is not included. This feature applies to queries only. It
+does not affect the storage nor does it change loading.</p>
+<p>Alternatively, if the symbol tdb:unionDefaultGraph (see
+<a href="configuration.html">TDB Configuration</a>) is
+set, the unnamed graph for the query is the union of all the named
+graphs in the datasets. The stored default graph is ignored and is
+not part of the the data of the union graph although it is
+accessible by the special name <code>&lt;urn:x-arq:DefaultGraph\&gt;</code> in a GRAPH
+pattern.</p>
+<p>Set globally:</p>
+<div class="codehilite"><pre><span class="n">TDB</span><span class="o">.</span><span class="n">getContext</span><span class="p">()</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="n">TDB</span><span class="o">.</span><span class="n">symUnionDefaultGraph</span><span class="p">,</span> <span class="n">true</span><span class="p">)</span><span class="err"> </span><span class="p">;</span>
+</pre></div>
+
+
+<p>or set on a per query basis:</p>
+<div class="codehilite"><pre><span class="n">QueryExecution</span> <span class="n">qExec</span> <span class="o">=</span> <span class="n">QueryExecutionFactory</span><span class="o">.</span><span class="n">create</span><span class="p">(</span><span class="o">...</span><span class="p">)</span><span class="err"> </span><span class="p">;</span>
+<span class="n">qExec</span><span class="o">.</span><span class="n">getContext</span><span class="p">()</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="n">TDB</span><span class="o">.</span><span class="n">symUnionDefaultGraph</span><span class="p">,</span> <span class="n">true</span><span class="p">)</span><span class="err"> </span><span class="p">;</span>
+</pre></div>
+
+
+<h2 id="special_graph_names">Special Graph Names</h2>
+<table>
+<thead>
+<tr>
+<th>URI</th>
+<th>Meaning</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td><code>urn:x-arq:UnionGraph</code></td>
+<td>The RDF merge of all the named graphs in the datasets of the query.</td>
+</tr>
+<tr>
+<td><code>urn:x-arq:DefaultGraph</code></td>
+<td>The default graph of the dataset, used when the default graph of the query is the union graph.</td>
+</tr>
+</tbody>
+</table>
+<p>Note that setting tdb:unionDefaultGraph does not affect the default
+graph or default model obtained with dataset.getDefaultModel().</p>
+<p>The RDF merge of all named graph can be accessed as the named graph
+<code>urn:x-arq:UnionGraph</code> using
+<code>Dataset.getNamedModel("urn:x-arq:UnionGraph")</code> .</p>
+  </div>
+
+  <div id="footer">
+    <div class="copyright">
+      <p>
+        Copyright &copy; 2011 The Apache Software Foundation, Licensed under
+        the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+        <br />
+        Apache Jena, Jena, the Apache Jena project logo,
+        Apache and the Apache feather logos are trademarks of The Apache Software Foundation.
+      </p>
+    </div>
+  </div>
+
+</body>
+</html>