blob: 45d3466e25d12c4e3db0d6b34d59448e21886e39 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<title>Apache Jena - The core RDF API</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="/css/bootstrap-icons.css" rel="stylesheet" media="screen"><link rel="stylesheet" type="text/css" href="https://jena.apache.org/sass/jena.1b17c39a117e22b46db4c66f6395dc27c134a60377d87d2d5745b8600eb69722.css" integrity="sha256-GxfDmhF&#43;IrRttMZvY5XcJ8E0pgN32H0tV0W4YA62lyI=">
<link rel="shortcut icon" href="/images/favicon.ico" />
</head>
<body>
<nav class="navbar navbar-expand-lg bg-body-tertiary" role="navigation">
<div class="container">
<div class="navbar-header">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="/index.html">
<img class="logo-menu" src="/images/jena-logo/jena-logo-notext-small.png" alt="jena logo">Apache Jena</a>
</div>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li id="homepage" class="nav-item"><a class="nav-link" href="/index.html"><span class="bi-house"></span> Home</a></li>
<li id="download" class="nav-item"><a class="nav-link" href="/download/index.cgi"><span class="bi-download"></span> Download</a></li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" role="button" data-bs-toggle="dropdown" aria-expanded="false"><span class="bi-journal"></span> Learn <b class="caret"></b></a>
<ul class="dropdown-menu">
<li class="dropdown-header">Tutorials</li>
<li><a class="dropdown-item" href="/tutorials/index.html">Overview</a></li>
<li><a class="dropdown-item" href="/documentation/fuseki2/index.html">Fuseki Triplestore</a></li>
<li><a class="dropdown-item" href="/documentation/notes/index.html">How-To's</a></li>
<li><a class="dropdown-item" href="/documentation/query/manipulating_sparql_using_arq.html">Manipulating SPARQL using ARQ</a></li>
<li><a class="dropdown-item" href="/tutorials/rdf_api.html">RDF core API tutorial</a></li>
<li><a class="dropdown-item" href="/tutorials/sparql.html">SPARQL tutorial</a></li>
<li><a class="dropdown-item" href="/tutorials/using_jena_with_eclipse.html">Using Jena with Eclipse</a></li>
<li class="dropdown-divider"></li>
<li class="dropdown-header">References</li>
<li><a class="dropdown-item" href="/documentation/index.html">Overview</a></li>
<li><a class="dropdown-item" href="/documentation/query/index.html">ARQ (SPARQL)</a></li>
<li><a class="dropdown-item" href="/documentation/io/">RDF I/O</a></li>
<li><a class="dropdown-item" href="/documentation/assembler/index.html">Assembler</a></li>
<li><a class="dropdown-item" href="/documentation/tools/index.html">Command-line tools</a></li>
<li><a class="dropdown-item" href="/documentation/rdfs/">Data with RDFS Inferencing</a></li>
<li><a class="dropdown-item" href="/documentation/geosparql/index.html">GeoSPARQL</a></li>
<li><a class="dropdown-item" href="/documentation/inference/index.html">Inference API</a></li>
<li><a class="dropdown-item" href="/documentation/ontology/">Ontology API</a></li>
<li><a class="dropdown-item" href="/documentation/permissions/index.html">Permissions</a></li>
<li><a class="dropdown-item" href="/documentation/extras/querybuilder/index.html">Query Builder</a></li>
<li><a class="dropdown-item" href="/documentation/rdf/index.html">RDF API</a></li>
<li><a class="dropdown-item" href="/documentation/rdfconnection/">RDF Connection - SPARQL API</a></li>
<li><a class="dropdown-item" href="/documentation/rdfstar/index.html">RDF-star</a></li>
<li><a class="dropdown-item" href="/documentation/shacl/index.html">SHACL</a></li>
<li><a class="dropdown-item" href="/documentation/shex/index.html">ShEx</a></li>
<li><a class="dropdown-item" href="/documentation/tdb/index.html">TDB</a></li>
<li><a class="dropdown-item" href="/documentation/tdb2/index.html">TDB2</a></li>
<li><a class="dropdown-item" href="/documentation/query/text-query.html">Text Search</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" role="button" data-bs-toggle="dropdown" aria-expanded="false"><span class="bi-journal-code"></span> Javadoc <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="/documentation/javadoc.html">All Javadoc</a></li>
<li><a class="dropdown-item" href="/documentation/javadoc/arq/">ARQ</a></li>
<li><a class="dropdown-item" href="/documentation/javadoc/fuseki2/">Fuseki</a></li>
<li><a class="dropdown-item" href="/documentation/javadoc/geosparql/">GeoSPARQL</a></li>
<li><a class="dropdown-item" href="/documentation/javadoc/jena/">Jena Core</a></li>
<li><a class="dropdown-item" href="/documentation/javadoc/permissions/">Permissions</a></li>
<li><a class="dropdown-item" href="/documentation/javadoc/extras/querybuilder/">Query Builder</a></li>
<li><a class="dropdown-item" href="/documentation/javadoc/shacl/">SHACL</a></li>
<li><a class="dropdown-item" href="/documentation/javadoc/tdb/">TDB</a></li>
<li><a class="dropdown-item" href="/documentation/javadoc/text/">Text Search</a></li>
</ul>
</li>
</ul>
<form class="d-flex" role="search" action="/search" method="GET">
<div class="input-group">
<input class="form-control border-end-0 border m-0" type="search" name="q" id="search-query" placeholder="Search...." aria-label="Search" style="width: 10rem;">
<button class="btn btn-outline-secondary border-start-0 border" type="submit">
<i class="bi-search"></i>
</button>
</div>
</form>
<ul class="navbar-nav">
<li id="ask" class="nav-item"><a class="nav-link" href="/help_and_support/index.html" title="Ask"><span class="bi-patch-question"></span><span class="text-body d-none d-xxl-inline"> Ask</span></a></li>
<li class="nav-item dropdown">
<a href="#" title="Get involved" class="nav-link dropdown-toggle" role="button" data-bs-toggle="dropdown" aria-expanded="false"><span class="bi-megaphone"></span><span class="text-body d-none d-xxl-inline"> Get involved </span><b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="/getting_involved/index.html">Contribute</a></li>
<li><a class="dropdown-item" href="/help_and_support/bugs_and_suggestions.html">Report a bug</a></li>
<li class="dropdown-divider"></li>
<li class="dropdown-header">Project</li>
<li><a class="dropdown-item" href="/about_jena/about.html">About Jena</a></li>
<li><a class="dropdown-item" href="/about_jena/architecture.html">Architecture</a></li>
<li><a class="dropdown-item" href="/about_jena/citing.html">Citing</a></li>
<li><a class="dropdown-item" href="/about_jena/team.html">Project team</a></li>
<li><a class="dropdown-item" href="/about_jena/contributions.html">Related projects</a></li>
<li><a class="dropdown-item" href="/about_jena/roadmap.html">Roadmap</a></li>
<li><a class="dropdown-item" href="/about_jena/security-advisories.html">Security Advisories</a></li>
<li class="dropdown-divider"></li>
<li class="dropdown-header">ASF</li>
<li><a class="dropdown-item" href="https://www.apache.org/">Apache Software Foundation</a></li>
<li><a class="dropdown-item" href="https://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
<li><a class="dropdown-item" href="https://www.apache.org/licenses/LICENSE-2.0">License</a></li>
<li><a class="dropdown-item" href="https://www.apache.org/security/">Security</a></li>
<li><a class="dropdown-item" href="https://www.apache.org/foundation/thanks.html">Thanks</a></li>
</ul>
</li>
<li class="nav-item" id="edit"><a class="nav-link" href="https://github.com/apache/jena-site/edit/main/source/documentation/rdf/__index.md" title="Edit this page on GitHub"><span class="bi-pencil-square"></span><span class="text-body d-none d-xxl-inline"> Edit this page</span></a></li>
</ul>
</div>
</div>
</nav>
<div class="container">
<div class="row">
<div class="col-md-12">
<div id="breadcrumbs">
<ol class="breadcrumb mt-4 p-2 bg-body-tertiary">
<li class="breadcrumb-item"><a href='/documentation'>DOCUMENTATION</a></li>
<li class="breadcrumb-item active">RDF</li>
</ol>
</div>
<h1 class="title">The core RDF API</h1>
<main class="d-flex flex-xl-row flex-column">
<aside class="text-muted align-self-start mb-3 p-0 d-xl-none d-block">
<h2 class="h6 sticky-top m-0 p-2 bg-body-tertiary">On this page</h2>
<nav id="TableOfContents">
<ul>
<li><a href="#core-concepts">Core concepts</a>
<ul>
<li><a href="#graphs-models">Graphs, models</a></li>
<li><a href="#nodes-resources-literals-and-blank-nodes">Nodes: resources, literals and blank nodes</a></li>
<li><a href="#triples">Triples</a></li>
<li><a href="#properties">Properties</a></li>
<li><a href="#namespaces">Namespaces</a></li>
</ul>
</li>
<li><a href="#jena-packages">Jena packages</a></li>
</ul>
</nav>
</aside>
<article class="flex-column me-lg-4">
<p>This section provides some basic reference notes on the core Jena RDF API.
For a more tutorial introduction, please see <a href="/tutorials">the tutorials</a>.</p>
<h2 id="core-concepts">Core concepts</h2>
<h3 id="graphs-models">Graphs, models</h3>
<p>In Jena, all state information provided by a collection of RDF triples is
contained in a data structure called a <code>Model</code>. The model denotes an
<em>RDF graph</em>, so called because it contains a collection of <em>RDF nodes</em>,
attached to each other by labelled relations. Each relationship goes
only in one direction, so the triple:</p>
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-turtle" data-lang="turtle"><span style="display:flex;"><span><span style="color:#00f;font-weight:bold">example:</span><span style="color:#008000;font-weight:bold">ijd</span><span style="color:#bbb"> </span><span style="color:#00f;font-weight:bold">foaf:</span><span style="color:#008000;font-weight:bold">name</span><span style="color:#bbb"> </span><span style="color:#b44">&#34;Ian&#34;</span><span style="color:#bbb">
</span></span></span></code></pre></div><p>can be read as &lsquo;<em>resource</em> <code>example:ijd</code> <em>has property</em> <code>foaf:name</code> <em>with value</em> <code>&quot;Ian&quot;</code>&rsquo;.
Clearly the reverse is not true. Mathematically, this makes the model an instance of a
<a href="http://en.wikipedia.org/wiki/Directed_graph">directed graph</a>.</p>
<p>In Java terms, we use the class <code>Model</code> as the primary container of RDF information
contained in graph form. <code>Model</code> is designed to have a rich API, with many methods
intended to make it easier to write RDF-based programs and applications. One of
<code>Model</code>&rsquo;s other roles is to provide an abstraction over different ways of storing
the RDF nodes and relations: in-memory data structures, disk-based persistent stores
and inference engines, for example, all provide <code>Model</code> as a core API.</p>
<p>While this common abstraction is appealing to API users, it is less convenient when trying
to create a new abstraction over a different storage medium. For example, suppose we
wanted to present an RDF triples view of an LDAP store by wrapping it as a Jena <code>Model</code>.
Internally, Jena uses a much simpler abstraction, <code>Graph</code> as the common interface to
low-level RDF stores. <code>Graph</code> has a much simpler API, so is easier to re-implement
for different store substrates.</p>
<p>In summary there are three distinct concepts of RDF containers in Jena:</p>
<ul>
<li><em>graph</em>, a mathematical view of the directed relations between nodes in a connected structure</li>
<li><code>Model</code>, a rich Java API with many convenience methods for Java application developers</li>
<li><code>Graph</code>, a simpler Java API intended for extending Jena&rsquo;s functionality.</li>
</ul>
<p>As an application developer, you will mostly be concerned with <code>Model</code>.</p>
<h3 id="nodes-resources-literals-and-blank-nodes">Nodes: resources, literals and blank nodes</h3>
<p>So if RDF information is contained in a graph of connected nodes, what do the nodes themselves
look like? There are two distinct types of nodes: URI references and literals. Essentially, these
denote, respectively, some resource about which we wish to make some assertions, and concrete data values that
appear in those assertions. In the example above, <code>example:ijd</code> is a resource, denoting a person,
and <code>&quot;Ian&quot;</code> denotes the value of a property of that resource (that property being first name, in this case).
The resource is denoted by a URI, shown in abbreviated form here (about which more below).</p>
<p>What is the nature of the relationship between the resource node in the graph (<code>example:ijd</code>) and
an actual person (the author of this document)? That turns out to be a surprisingly subtle and
complex matter, which we won&rsquo;t dwell on here.
See <a href="http://www.jenitennison.com/blog/node/159">this very good summary of the issues</a>
by Jeni Tennison for a detailed analysis. Suffice to say here that <em>resources</em> - somehow - denote
the things we want to describe in an RDF model.</p>
<p>A resource represented as a URI denotes a named thing - it has an identity. We can use that identity
to refer to directly the resource, as we will see below. Another kind of node in the graph is a <em>literal</em>,
which just represents a data value such as the string <code>&quot;ten&quot;</code> or the number <code>10</code>. Literals representing
values other than strings may have an attached <em>datatype</em>, which helps an RDF processor correctly
convert the string representation of the literal into the correct value in the computer. By default,
RDF assumes the <a href="http://www.w3.org/TR/xmlschema-2/">datatypes used XSD</a> are available, but in fact
any datatype URI may be used.</p>
<p>RDF allows one special case of resources, in which we don&rsquo;t actually know the identity (i.e. the URI)
of the resource. Consider the sentence &ldquo;I gave my friend five dollars&rdquo;. We know from this claim
that I have friend, but we don&rsquo;t know who that friend is. We also know a property of the friend -
namely that he or she is five dollars better off than before. In RDF, we can model this situation by
using a special type of resource called an <em>anonymous resource</em>. In the RDF semantics, an anonymous
resource is represented as having an identity which is blank, so they are often referred to
as nodes in the graph with blank identities, or <em>blank nodes</em>, typically shortened to <em>bNodes</em>.</p>
<p>In Jena, the Java interface <code>Resource</code> represents both ordinary URI resources and bNodes (in the case
of a bNode, the <code>getURI()</code> method returns <code>null</code>, and the <code>isAnon()</code> method returns true).
The Java interface <code>Literal</code> represents literals. Since both resources and literals may appear
as nodes in a graph, the common interface <code>RDFNode</code> is a super-class of both <code>Resource</code> and <code>Literal</code>.</p>
<h3 id="triples">Triples</h3>
<p>In an RDF graph, the relationships always connect one subject resource to one other resource or
one literal. For example:</p>
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-turtle" data-lang="turtle"><span style="display:flex;"><span><span style="color:#00f;font-weight:bold">example:</span><span style="color:#008000;font-weight:bold">ijd</span><span style="color:#bbb"> </span><span style="color:#00f;font-weight:bold">foaf:</span><span style="color:#008000;font-weight:bold">firstName</span><span style="color:#bbb"> </span><span style="color:#b44">&#34;Ian&#34;</span>.<span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"></span><span style="color:#00f;font-weight:bold">example:</span><span style="color:#008000;font-weight:bold">ijd</span><span style="color:#bbb"> </span><span style="color:#00f;font-weight:bold">foaf:</span><span style="color:#008000;font-weight:bold">knows</span><span style="color:#bbb"> </span><span style="color:#00f;font-weight:bold">example:</span><span style="color:#008000;font-weight:bold">mary</span>.<span style="color:#bbb">
</span></span></span></code></pre></div><p>The relationship, or <em>predicate</em>, always connects two nodes (formally, it has <em>arity</em> two). The first
argument of the predicate is node we are linking <em>from</em>, and the second is the node we are linking
<em>to</em>. We will often refer to these as the <em>subject</em> and <em>object</em> of the RDF statement, respectively.
The pattern subject-predicate-object is sufficiently commonplace that we will sometimes use the
abbreviation SPO. More commonly, we refer to a statement of one subject, predicate and object as a <em>triple</em>,
leading naturally to the term <em>triplestore</em> to refer to a means of storing RDF information.</p>
<p>In Jena, the Java class used to represent a single triple is <code>Statement</code>. According to the RDF
specification, only resources can be the subject of an RDF triple, whereas the object can be a
resource or a literal. The key methods for extracting the elements of a <code>Statement</code> are then:</p>
<ul>
<li><code>getSubject()</code> returning a <code>Resource</code></li>
<li><code>getObject()</code> returning an <code>RDFNode</code></li>
<li><code>getPredicate()</code> returning a <code>Property</code> (see below for more on Properties)</li>
</ul>
<p>The predicate of a triple corresponds to the label on an edge in the RDF graph. So in the figure
below, the two representations are equivalent:</p>
<p><img src="rdf-graph-and-triples.png" alt="Picture of two RDF triples in graphical and text form" title="RDF graph and triples"></p>
<p>Technically, an RDF graph corresponds to a set of RDF triples. This means that an RDF resource
can only be the subject of at most one triple with the same predicate and object (because sets do
not contain any duplicates).</p>
<h3 id="properties">Properties</h3>
<p>As mentioned above, the connection between two resources or a resource and a literal in an RDF graph
is labelled with the identity of the property. Just as RDF itself uses URI&rsquo;s as names for resources,
minimising the chances of accidental name collisions, so too are properties identified with URI&rsquo;s. In fact,
RDF Properties are just a special case of RDF Resources. Properties are denoted in Jena by the <code>Property</code>
object, which is a Java sub-class of <code>Resource</code> (itself a Java sub-class of <code>RDFNode</code>).</p>
<p>One difference between properties and resources in general is that RDF does not permit anonymous
properties, so you can&rsquo;t use a bNode in place of a <code>Property</code> in the graph.</p>
<h3 id="namespaces">Namespaces</h3>
<p>Suppose two companies, Acme Inc, and Emca Inc, decide to encode their product catalogues in RDF. A key
piece of information to include in the graph is the price of the product, so both decide to use a <code>price</code>
predicate to denote the relationship between a product and its current price. However, Acme wants the
price to include applicable sales taxes, whereas Emca wants to exclude them. So the notion of price
is slightly different in each case. However, using the name &lsquo;price&rsquo; on its own risks losing this
distinction.</p>
<p>Fortunately, RDF specifies that a property is identified by a URI, and &lsquo;price&rsquo; on its own is not a URI.
A logical solution is for both Acme and Emca to use their own web spaces to provide different
base URIs on which to construct the URI for the property:</p>
<pre tabindex="0"><code>http://acme.example/schema/products#price
http://emca.example/ontology/catalogue/price
</code></pre><p>These are clearly now two distinct identities, and so each company can define the semantics of the
price property without interfering with the other. Writing out such long strings each time, however,
can be unwieldy and a source of error. A <em>compact URI</em> or <a href="http://www.w3.org/TR/curie/"><em>curie</em></a>
is an abbreviated form in which a namespace and name are separated by a colon character:</p>
<pre tabindex="0"><code>acme-product:price
emca-catalogue:price
</code></pre><p>where <code>acme-product</code> is defined to be <code>http://acme.example/schema/products#</code>. This can be defined,
for example, in Turtle:</p>
<div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-turtle" data-lang="turtle"><span style="display:flex;"><span><span style="color:#a2f;font-weight:bold">PREFIX</span><span style="color:#bbb"> </span><span style="color:#00f;font-weight:bold">acme-product:</span><span style="color:#bbb"> </span><span style="color:#b8860b">&lt;http://acme.example/schema/products#&gt;</span><span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb">
</span></span></span><span style="display:flex;"><span><span style="color:#bbb"></span><span style="color:#00f;font-weight:bold">acme-product:</span><span style="color:#008000;font-weight:bold">widget</span><span style="color:#bbb"> </span><span style="color:#00f;font-weight:bold">acme-product:</span><span style="color:#008000;font-weight:bold">price</span><span style="color:#bbb"> </span><span style="color:#b44">&#34;44.99&#34;</span><span style="color:#666">^^</span><span style="font-style:italic">xsd:decimal</span>.<span style="color:#bbb">
</span></span></span></code></pre></div><p>The datatype <code>xsd:decimal</code> is another example of an abbreviated URI. Note that no <code>PREFIX</code> rules
are defined by RDF or Turtle: authors of RDF content should ensure that all prefixes used in curies
are defined before use.</p>
<p><strong>Note</strong></p>
<p>Jena does not treat namespaces in a special way. A <code>Model</code> will remember any prefixes defined
in the input RDF (see the <a href="/documentation/javadoc/jena/org.apache.jena.core/org/apache/jena/shared/PrefixMapping.html"><code>PrefixMapping</code></a>
interface; all Jena <code>Model</code> objects extend <code>PrefixMapping</code>), and the output writers which
serialize a model to XML or Turtle will normally attempt to use prefixes to abbreviate URI&rsquo;s.
However internally, a <code>Resource</code> URI is not separated into a namespace and local-name pair.
The method <code>getLocalName()</code> on <code>Resource</code> will attempt to calculate what a reasonable local
name might have been, but it may not always recover the pairing that was used in the
input document.</p>
<p>can be used as the <em>subject</em> of statements about the properties
of that resource, as above, but also as the value of a statement. For example, the property
<code>is-a-friend-of</code> might typically connect two resources denoting people</p>
<h2 id="jena-packages">Jena packages</h2>
<p>As a guide to the various features of Jena, here&rsquo;s a description of the main Java packages.
For brevity, we shorten <code>org.apache.jena</code> to <code>oaj</code>.</p>
<table>
<thead>
<tr>
<th>Package</th>
<th>Description</th>
<th>More information</th>
</tr>
</thead>
<tbody>
<tr>
<td>oaj.jena.rdf.model</td>
<td>The Jena core. Creating and manipulating RDF graphs.</td>
<td></td>
</tr>
<tr>
<td>oaj.riot</td>
<td>Reading and Writing RDF.</td>
<td></td>
</tr>
<tr>
<td>oaj.jena.datatypes</td>
<td>Provides the core interfaces through which datatypes are described to Jena.</td>
<td><a href="/documentation/notes/typed-literals.html">Typed literals</a></td>
</tr>
<tr>
<td>oaj.jena.ontology</td>
<td>Abstractions and convenience classes for accessing and manipulating ontologies represented in RDF.</td>
<td><a href="/documentation/ontology/index.html">Ontology API</a></td>
</tr>
<tr>
<td>oaj.jena.rdf.listeners</td>
<td>Listening for changes to the statements in a model</td>
<td></td>
</tr>
<tr>
<td>oaj.jena.reasoner</td>
<td>The reasoner subsystem is supports a range of inference engines which derive additional information from an RDF model</td>
<td><a href="/documentation/inference/index.html">Reasoner how-to</a></td>
</tr>
<tr>
<td>oaj.jena.shared</td>
<td>Common utility classes</td>
<td></td>
</tr>
<tr>
<td>oaj.jena.vocabulary</td>
<td>A package containing constant classes with predefined constant objects for classes and properties defined in well known vocabularies.</td>
<td></td>
</tr>
<tr>
<td>oaj.jena.xmloutput</td>
<td>Writing RDF/XML.</td>
<td><a href="/documentation/io/index.html">I/O index</a></td>
</tr>
</tbody>
</table>
</article>
<aside class="text-muted align-self-start mb-3 mb-xl-5 p-0 d-none d-xl-flex flex-column sticky-top">
<h2 class="h6 sticky-top m-0 p-2 bg-body-tertiary">On this page</h2>
<nav id="TableOfContents">
<ul>
<li><a href="#core-concepts">Core concepts</a>
<ul>
<li><a href="#graphs-models">Graphs, models</a></li>
<li><a href="#nodes-resources-literals-and-blank-nodes">Nodes: resources, literals and blank nodes</a></li>
<li><a href="#triples">Triples</a></li>
<li><a href="#properties">Properties</a></li>
<li><a href="#namespaces">Namespaces</a></li>
</ul>
</li>
<li><a href="#jena-packages">Jena packages</a></li>
</ul>
</nav>
</aside>
</main>
</div>
</div>
</div>
<footer class="bd-footer py-4 py-md-5 mt-4 mt-lg-5 bg-body-tertiary">
<div class="container" style="font-size:80%" >
<p>
Copyright &copy; 2011&ndash;2024 The Apache Software Foundation, Licensed under the
<a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
</p>
<p>
Apache Jena, Jena, the Apache Jena project logo, Apache and the Apache feather logos are trademarks of
The Apache Software Foundation.
<br/>
<a href="https://privacy.apache.org/policies/privacy-policy-public.html"
>Apache Software Foundation Privacy Policy</a>.
</p>
</div>
</footer>
<script src="/js/popper.min.js.js" type="text/javascript"></script>
<script src="/js/bootstrap.min.js" type="text/javascript"></script>
<script src="/js/improve.js" type="text/javascript"></script>
<script type="text/javascript">
(function() {
'use strict'
const links = document.querySelectorAll(`a[href="${window.location.pathname}"]`)
if (links !== undefined && links !== null) {
for (const link of links) {
link.classList.add('active')
let parentElement = link.parentElement
let count = 0
const levelsLimit = 4
while (['UL', 'LI'].includes(parentElement.tagName) && count <= levelsLimit) {
if (parentElement.tagName === 'LI') {
parentElement.querySelector('a:first-child').classList.add('active')
}
parentElement = parentElement.parentElement
count++
}
}
}
})()
</script>
</body>
</html>