Author: buildbot
Date: Wed Feb 19 22:53:58 2020
New Revision: 1056740
Log:
Staging update by buildbot for jena
Modified:
websites/staging/jena/trunk/content/ (props changed)
websites/staging/jena/trunk/content/tutorials/rdf_api.html
websites/staging/jena/trunk/content/tutorials/rdf_api_pt.html
Propchange: websites/staging/jena/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Wed Feb 19 22:53:58 2020
@@ -1 +1 @@
-1874229
+1874232
Modified: websites/staging/jena/trunk/content/tutorials/rdf_api.html
==============================================================================
--- websites/staging/jena/trunk/content/tutorials/rdf_api.html (original)
+++ websites/staging/jena/trunk/content/tutorials/rdf_api.html Wed Feb 19
22:53:58 2020
@@ -197,15 +197,15 @@ all the examples used in this tutorial c
<ol>
<li><a href="#ch-Introduction">Introduction</a></li>
<li><a href="#ch-Statements">Statements</a></li>
- <li><a href="#ch-Writing RDF">Writing RDF</a></li>
- <li><a href="#ch-Reading RDF">Reading RDF</a></li>
+ <li><a href="#ch-Writing-RDF">Writing RDF</a></li>
+ <li><a href="#ch-Reading-RDF">Reading RDF</a></li>
<li><a href="#ch-Prefixes">Controlling Prefixes</a></li>
- <li><a href="#ch-Jena RDF Packages">Jena RDF Packages</a></li>
- <li><a href="#ch-Navigating a Model">Navigating a Model</a></li>
- <li><a href="#ch-Querying a Model">Querying a Model</a></li>
- <li><a href="#ch-Operations on Models">Operations on Models</a></li>
+ <li><a href="#ch-Jena-RDF-Packages">Jena RDF Packages</a></li>
+ <li><a href="#ch-Navigating-a-Model">Navigating a Model</a></li>
+ <li><a href="#ch-Querying-a-Model">Querying a Model</a></li>
+ <li><a href="#ch-Operations-on-Models">Operations on Models</a></li>
<li><a href="#ch-Containers">Containers</a></li>
- <li><a href="#ch-More about Literals and Datatypes">More about Literals and
+ <li><a href="#ch-More-about-Literals-and-Datatypes">More about Literals and
Datatypes</a></li>
<li><a href="#ch-Glossary">Glossary</a></li>
</ol>
@@ -302,9 +302,11 @@ yourself.</p>
<p>The code to create the resource and add the property, can be more
compactly written in a cascading style:</p>
-<p><pre>Resource johnSmith =
- model.createResource(personURI)
- .addProperty(VCARD.FN, fullName);</pre></p>
+<pre>Resource johnSmith =
+ model.createResource(personURI)
+ .addProperty(VCARD.FN, fullName);
+</pre>
+
<p>Now let's add some more detail to the vcard, exploring some more features
of RDF and Jena.</p>
@@ -325,14 +327,16 @@ It is known as an <i><a href="#glos-blan
<p>The Jena code to construct this example, is again very simple. First
some declarations and the creation of the empty model.</p>
-<p><pre>// some definitions
+<pre>// some definitions
String personURI = "http://somewhere/JohnSmith";
String givenName = "John";
String familyName = "Smith";
-String fullName = givenName + " " + familyName;</p>
-<p>// create an empty Model
-Model model = ModelFactory.createDefaultModel();</p>
-<p>// create the resource
+String fullName = givenName + " " + familyName;
+
+// create an empty Model
+Model model = ModelFactory.createDefaultModel();
+
+// create the resource
// and add the properties cascading style
Resource johnSmith
= model.createResource(personURI)
@@ -340,7 +344,9 @@ Resource johnSmith
.addProperty(VCARD.N,
model.createResource()
.addProperty(VCARD.Given, givenName)
- .addProperty(VCARD.Family, familyName));</pre></p>
+ .addProperty(VCARD.Family, familyName));
+</pre>
+
<p>The working code for this example can be found as <a
href="https://github.com/apache/jena/tree/master/jena-core/src-examples/jena/examples/rdf/Tutorial02.java">tutorial
2</a> in the /src-examples directory
of the Jena distribution.</p>
@@ -399,7 +405,8 @@ while (iter.hasNext()) {
}
System.out.println(" .");
-} </pre>
+}
+</pre>
<p>Since the object of a statement can be either a resource or a literal, the
<code>getObject()</code> method returns an
@@ -432,7 +439,7 @@ href="http://www.w3.org/TR/rdf-testcases
means "triple notation". We will see in the next section that Jena has an
N-Triples writer built in.</p>
-<h2><a id="ch-Writing RDF">Writing RDF</a></h2>
+<h2><a id="ch-Writing-RDF">Writing RDF</a></h2>
<p>Jena has methods for reading and writing RDF as XML. These can be
used to save an RDF model to a file and later read it back in again.</p>
@@ -443,11 +450,12 @@ model in RDF XML form to the standard ou
very simple: <code>model.write</code> can take an <code>OutputStream</code>
argument.</p>
-<p><pre>// now write the model in XML form to a file
-model.write(System.out);</pre></p>
+<pre>// now write the model in XML form to a file
+model.write(System.out);</pre>
+
<p>The output should look something like this:</p>
-<p><pre><rdf:RDF
+<pre><rdf:RDF
xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
xmlns:vcard='http://www.w3.org/2001/vcard-rdf/3.0#'
>
@@ -459,7 +467,8 @@ model.write(System.out);</pre></p>
<vcard:Given>John</vcard:Given>
<vcard:Family>Smith</vcard:Family>
</rdf:Description>
-</rdf:RDF></pre></p>
+</rdf:RDF></pre>
+
<p></p>
<p>The RDF specifications specify how to represent RDF as XML. The RDF
@@ -501,9 +510,10 @@ invoked the standard 'dumb' writer. Jen
RDF/XML writer which can be invoked by specifying another argument to the
<code>write()</code> method call:</p>
-<p><pre>// now write the model in XML form to a file
+<pre>// now write the model in XML form to a file
model.write(System.out, "RDF/XML-ABBREV");
- </pre></p>
+</pre>
+
<p>This writer, the so called PrettyWriter, takes advantage of features of
the RDF/XML abbreviated syntax to write a Model more compactly. It is also
able to preserve blank nodes where that is possible. It is however, not
@@ -511,13 +521,14 @@ suitable for writing very large Models,
acceptable. To write large files and preserve blank nodes, write in
N-Triples format:</p>
-<p><pre>// now write the model in N-TRIPLES form to a file
+<pre>// now write the model in N-TRIPLES form to a file
model.write(System.out, "N-TRIPLES");
- </pre></p>
+</pre>
+
<p>This will produce output similar to that of tutorial 3 which conforms to
the N-Triples specification.</p>
-<h2><a id="ch-Reading RDF">Reading RDF</a></h2>
+<h2><a id="ch-Reading-RDF">Reading RDF</a></h2>
<p><a
href="https://github.com/apache/jena/tree/master/jena-core/src-examples/jena/examples/rdf/Tutorial05.java">Tutorial
5</a> demonstrates reading the
statements recorded in RDF XML form into a model. With this tutorial,
@@ -525,27 +536,31 @@ we have provided <a href="sparql_data/vc
code will read it in and write it out. <em>Note that for this application to
run, the input file must be in the current directory.</em></p>
-<p><pre>
+<pre>
// create an empty model
- Model model = ModelFactory.createDefaultModel();</p>
-<p>// use the FileManager to find the input file
+ Model model = ModelFactory.createDefaultModel();
+
+ // use the FileManager to find the input file
InputStream in = FileManager.get().open( inputFileName );
if (in == null) {
throw new IllegalArgumentException(
"File: " + inputFileName + " not found");
-}</p>
-<p>// read the RDF/XML file
-model.read(in, null);</p>
-<p>// write it to standard out
+}
+
+// read the RDF/XML file
+model.read(in, null);
+
+// write it to standard out
model.write(System.out);
- </pre></p>
+</pre>
+
<p>The second argument to the <code>read()</code> method call is the URI which
will
be used for resolving relative URI's. As there are no relative URI
references in the test file, it is allowed to be empty. When run, <a
href="https://github.com/apache/jena/tree/master/jena-core/src-examples/jena/examples/rdf/Tutorial05.java">
tutorial 5</a> will produce XML output which
looks like:</p>
-<p><pre><rdf:RDF
+<pre><rdf:RDF
xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
xmlns:vcard='http://www.w3.org/2001/vcard-rdf/3.0#'
>
@@ -581,7 +596,8 @@ looks like:</p>
<vcard:FN>Becky Smith</vcard:FN>
<vcard:N rdf:nodeID="A3"/>
</rdf:Description>
-</rdf:RDF></pre></p>
+</rdf:RDF></pre>
+
<h2 id="ch-Prefixes">Controlling Prefixes</h2>
<h3>Explicit prefix definitions</h3>
@@ -592,7 +608,6 @@ uses only the full URIs, and not this sh
of controlling the namespaces used on output with its <i>prefix mappings</i>.
Here's a simple example.</p>
<pre>
-<code>
Model m = ModelFactory.createDefaultModel();
String nsA = "http://somewhere/else#";
String nsB = "http://nowhere/else#";
@@ -611,14 +626,12 @@ Here's a simple example.</p>
System.out.println( "# -- nsA and cat defined" );
m.setNsPrefix( "cat", nsB );
m.write( System.out );
-</code>
</pre>
<p>The output from this fragment is three lots of RDF/XML, with
three different prefix mappings. First the default, with no
prefixes other than the standard ones:</p>
<pre>
-<code>
# -- no special prefixes defined
<rdf:RDF
@@ -633,7 +646,6 @@ prefixes other than the standard ones:</
<j.0:Q rdf:resource="http://somewhere/else#z"/>
</rdf:Description>
</rdf:RDF>
-</code>
</pre>
<p>We see that the rdf namespace is declared automatically, since it
@@ -653,7 +665,6 @@ output:
<pre>
-<code>
# -- nsA defined
<rdf:RDF
@@ -668,7 +679,6 @@ output:
<j.0:Q rdf:resource="http://somewhere/else#z"/>
</rdf:Description>
</rdf:RDF>
-</code>
</pre>
@@ -678,7 +688,6 @@ to have anything to do with the variable
<pre>
-<code>
# -- nsA and cat defined
<rdf:RDF
@@ -693,7 +702,6 @@ to have anything to do with the variable
<cat:Q rdf:resource="http://somewhere/else#z"/>
</rdf:Description>
</rdf:RDF>
-</code>
</pre>
@@ -711,11 +719,9 @@ code:
<pre>
-<code>
Model m2 = ModelFactory.createDefaultModel();
m2.read( "file:/tmp/fragment.rdf" );
m2.write( System.out );
-</code>
</pre>
@@ -735,7 +741,7 @@ adding a whole group of mappings at once
<code>PrefixMapping</code> for details.
-<h2 id="ch-Jena RDF Packages">Jena RDF Packages</h2>
+<h2 id="ch-Jena-RDF-Packages">Jena RDF Packages</h2>
<p>Jena is a Java API for semantic web applications. The key RDF package for
the application developer is
@@ -764,7 +770,7 @@ implementation of <code>Resource</code>,
types will be necessary.</p>
-<h2 id="ch-Navigating a Model">Navigating a Model</h2>
+<h2 id="ch-Navigating-a-Model">Navigating a Model</h2>
<p>So far, this tutorial has dealt mainly with creating, reading and writing
RDF Models. It is now time to deal with accessing information held in a
@@ -777,9 +783,9 @@ otherwise to create a new one. For examp
resource from the model read in from the file in tutorial 5:</p>
- <pre>// retrieve the John Smith vcard resource from the model
+<pre>// retrieve the John Smith vcard resource from the model
Resource vcard = model.getResource(johnSmithURI);</code>
- </pre>
+</pre>
<p>The Resource interface defines a number of methods for accessing the
@@ -793,7 +799,7 @@ return the object of the statement. For
resource which is the value of the <code>vcard:N</code> property:</p>
- <pre>// retrieve the value of the N property
+<pre>// retrieve the value of the N property
Resource name = (Resource) vcard.getProperty(VCARD.N)
.getObject();</pre>
@@ -806,7 +812,7 @@ checking can be done at compile time. Th
more conveniently written:</p>
- <pre>// retrieve the value of the N property
+<pre>// retrieve the value of the N property
Resource name = vcard.getProperty(VCARD.N)
.getResource();</pre>
@@ -814,7 +820,7 @@ Resource name = vcard.getProperty(VCARD.
<p>Similarly, the literal value of a property can be retrieved:</p>
- <pre>// retrieve the given name property
+<pre>// retrieve the given name property
String fullName = vcard.getProperty(VCARD.FN)
.getString();</pre>
@@ -825,7 +831,7 @@ property; for example Adam might have mo
two:</p>
- <pre>// add two nickname properties to vcard
+<pre>// add two nickname properties to vcard
vcard.addProperty(VCARD.NICKNAME, "Smithy")
.addProperty(VCARD.NICKNAME, "Adman");</pre>
@@ -845,7 +851,7 @@ objects of type <code>Statement</code>.
this:</p>
- <pre>// set up the output
+<pre>// set up the output
System.out.println("The nicknames of \""
+ fullName + "\" are:");
// list the nicknames
@@ -866,7 +872,7 @@ a string.
The code produces the following output when run:</p>
- <pre>The nicknames of "John Smith" are:
+<pre>The nicknames of "John Smith" are:
Smithy
Adman</pre>
@@ -876,7 +882,7 @@ The code produces the following output w
</p>
-<h2 id="ch-Querying a Model">Querying a Model</h2>
+<h2 id="ch-Querying-a-Model">Querying a Model</h2>
<p>The previous section dealt with the case of navigating a model from a
resource with a known URI. This section deals with searching a
@@ -898,12 +904,13 @@ will have <code>vcard:FN</code> property
resources have such a property, then we can find all the vcards like this:</p>
- <pre>// list vcards
+<pre>// list vcards
ResIterator iter = model.listSubjectsWithProperty(VCARD.FN);
while (iter.hasNext()) {
Resource r = iter.nextResource();
...
-}</pre>
+}
+</pre>
<p>All these query methods are simply syntactic sugar over a primitive query
@@ -917,8 +924,7 @@ necessary to use a specific class rather
<code>SimpleSelector</code> constructor takes three arguments:</p>
- <pre>Selector selector = new SimpleSelector(subject, predicate, object)
- </pre>
+<pre>Selector selector = new SimpleSelector(subject, predicate, object);</pre>
<p>This selector will select all statements with a subject that matches
@@ -930,15 +936,13 @@ or are the same blank node; two literals
are equal.) Thus:</p>
- <pre>Selector selector = new SimpleSelector(null, null, null);
- </pre>
+<pre>Selector selector = new SimpleSelector(null, null, null);</pre>
<p>will select all the statements in a Model.</p>
- <pre>Selector selector = new SimpleSelector(null, VCARD.FN, null);
- </pre>
+<pre>Selector selector = new SimpleSelector(null, VCARD.FN, null);</pre>
<p>will select all the statements with VCARD.FN as their predicate, whatever
@@ -961,7 +965,7 @@ href="https://github.com/apache/jena/tre
vcards in the database.</p>
- <pre>// select all the resources with a VCARD.FN property
+<pre>// select all the resources with a VCARD.FN property
ResIterator iter = model.listSubjectsWithProperty(VCARD.FN);
if (iter.hasNext()) {
System.out.println("The database contains vcards for:");
@@ -973,18 +977,18 @@ if (iter.hasNext()) {
} else {
System.out.println("No vcards were found in the database");
}
- </pre>
+</pre>
<p>This should produce output similar to the following:</p>
- <pre>The database contains vcards for:
+<pre>The database contains vcards for:
Sarah Jones
John Smith
Matt Jones
Becky Smith
- </pre>
+</pre>
<p>Your next exercise is to modify this code to use <code>SimpleSelector
@@ -995,7 +999,7 @@ if (iter.hasNext()) {
to perform further filtering:</p>
- <pre>// select all the resources with a VCARD.FN property
+<pre>// select all the resources with a VCARD.FN property
// whose value ends with "Smith"
StmtIterator iter = model.listStatements(
new SimpleSelector(null, VCARD.FN, (RDFNode) null) {
@@ -1016,7 +1020,7 @@ applied to matching statements.</p>
8</a> and produces output like this:</p>
- <pre>The database contains vcards for:
+<pre>The database contains vcards for:
John Smith
Becky Smith</pre>
@@ -1026,7 +1030,7 @@ applied to matching statements.</p>
<p>You might think that:</p>
- <pre>// do all filtering in the selects method
+<pre>// do all filtering in the selects method
StmtIterator iter = model.listStatements(
new
SimpleSelector(null, null, (RDFNode) null) {
@@ -1042,7 +1046,7 @@ StmtIterator iter = model.listStatements
<p>is equivalent to:</p>
- <pre>StmtIterator iter =
+<pre>StmtIterator iter =
model.listStatements(new SimpleSelector(subject, predicate, object)</pre>
@@ -1051,7 +1055,7 @@ the statements in the Model and test eac
allows indexes maintained by the implementation to improve performance. Try
it on a large Model and see for yourself, but make a cup of coffee first.</p>
-<h2 id="ch-Operations on Models">Operations on Models</h2>
+<h2 id="ch-Operations-on-Models">Operations on Models</h2>
<p>Jena provides three operations for manipulating Models as a whole. These
are the common set operations of union, intersection and difference.</p>
@@ -1075,7 +1079,7 @@ one and the duplicate <code>vcard:FN</co
href="https://github.com/apache/jena/tree/master/jena-core/src-examples/jena/examples/rdf/Tutorial09.java">tutorial
9</a>) and see what happens.</p>
- <pre>// read the RDF/XML files
+<pre>// read the RDF/XML files
model1.read(new InputStreamReader(in1), "");
model2.read(new InputStreamReader(in2), "");
@@ -1089,7 +1093,7 @@ model.write(system.out, "RDF/XML-ABBREV"
<p>The output produced by the pretty writer looks like this:</p>
- <pre><rdf:RDF
+<pre><rdf:RDF
xmlns:rdf="<a
href="http://www.w3.org/1999/02/22-rdf-syntax-ns#">http://www.w3.org/1999/02/22-rdf-syntax-ns#</a>"
xmlns:vcard="http://www.w3.org/2001/vcard-rdf/3.0#">
<rdf:Description rdf:about="http://somewhere/JohnSmith/">
@@ -1105,7 +1109,6 @@ model.write(system.out, "RDF/XML-ABBREV"
<vcard:FN>John Smith</vcard:FN>
</rdf:Description>
</rdf:RDF></pre>
- <pre> </pre>
<p>Even if you are unfamiliar with the details of the RDF/XML syntax, it
@@ -1168,7 +1171,7 @@ container using the lower level methods.
<p align="left">Let's modify tutorial 8 to create this bag:</p>
- <pre>// create a bag
+<pre>// create a bag
Bag smiths = model.createBag();
// select all the resources with a VCARD.FN property
@@ -1188,7 +1191,7 @@ while (iter.hasNext()) {
<p>If we write out this Model, it contains something like the following:</p>
- <pre><rdf:RDF
+<pre><rdf:RDF
xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
xmlns:vcard='http://www.w3.org/2001/vcard-rdf/3.0#'
>
@@ -1207,7 +1210,7 @@ while (iter.hasNext()) {
container:</p>
- <pre>// print out the members of the bag
+<pre>// print out the members of the bag
NodeIterator iter2 = smiths.iterator();
if (iter2.hasNext()) {
System.out.println("The bag contains:");
@@ -1225,7 +1228,7 @@ if (iter2.hasNext()) {
<p>which produces the following output:</p>
- <pre>The bag contains:
+<pre>The bag contains:
John Smith
Becky Smith</pre>
@@ -1242,7 +1245,7 @@ The RDFCore WG have relaxed this constra
representation of containers. This therefore is an area of Jena may be
changed in the future.</p>
-<h2 id="ch-More about Literals and Datatypes">More about Literals and
Datatypes</h2>
+<h2 id="ch-More-about-Literals-and-Datatypes">More about Literals and
Datatypes</h2>
<p>RDF literals are not just simple strings. Literals may have a language
tag to indicate the language of the literal. The literal "chat" with an
@@ -1260,7 +1263,7 @@ parseType='Literal' attribute is used to
constructed, e.g. in <a
href="https://github.com/apache/jena/tree/master/jena-core/src-examples/jena/examples/rdf/Tutorial11.java">tutorial
11</a>:</p>
- <pre>// create the resource
+<pre>// create the resource
Resource r = model.createResource();
// add the property
@@ -1275,7 +1278,7 @@ model.write(system.out);</pre>
<p>produces</p>
- <pre><rdf:RDF
+<pre><rdf:RDF
xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
xmlns:rdfs='http://www.w3.org/2000/01/rdf-schema#'
>
@@ -1303,7 +1306,7 @@ simple literals, we can omit the <code>m
call):</p>
- <pre>// create the resource
+<pre>// create the resource
Resource r = model.createResource();
// add the property
@@ -1316,9 +1319,7 @@ model.write(system.out, "N-TRIPLE");</pr
<p>The output produced is:</p>
-
- <pre>_:A... <http://www.w3.org/2000/01/rdf-schema#label> "11" .</pre>
-
+<pre>_:A... <http://www.w3.org/2000/01/rdf-schema#label> "11" .</pre>
<p>Since both literals are really just the string "11", then only one
statement is added.</p>
Modified: websites/staging/jena/trunk/content/tutorials/rdf_api_pt.html
==============================================================================
--- websites/staging/jena/trunk/content/tutorials/rdf_api_pt.html (original)
+++ websites/staging/jena/trunk/content/tutorials/rdf_api_pt.html Wed Feb 19
22:53:58 2020
@@ -191,15 +191,15 @@ relativamente simples, então esta abo
<ol>
<li><a href="#ch-Introduction">Introdução</a></li>
<li><a href="#ch-Statements">Sentenças</a></li>
- <li><a href="#ch-Writing RDF">Escrita de RDF</a></li>
- <li><a href="#ch-Reading RDF">Leitura de RDF</a></li>
+ <li><a href="#ch-Writing-RDF">Escrita de RDF</a></li>
+ <li><a href="#ch-Reading-RDF">Leitura de RDF</a></li>
<li><a href="#ch-Prefixes">Controle de Prefixos</a></li>
- <li><a href="#ch-Jena RDF Packages">Pacotes de Jena RDF</a></li>
- <li><a href="#ch-Navigating a Model">Navegação em Modelos</a></li>
- <li><a href="#ch-Querying a Model">Consulta de Modelos</a></li>
- <li><a href="#ch-Operations on Models">Operações em Modelos</a></li>
+ <li><a href="#ch-Jena-RDF-Packages">Pacotes de Jena RDF</a></li>
+ <li><a href="#ch-Navigating-a-Model">Navegação em Modelos</a></li>
+ <li><a href="#ch-Querying-a-Model">Consulta de Modelos</a></li>
+ <li><a href="#ch-Operations-on-Models">Operações em Modelos</a></li>
<li><a href="#ch-Containers">Containers</a></li>
- <li><a href="#ch-More about Literals and Datatypes">Mais sobre Literais e
Datatypes</a></li>
+ <li><a href="#ch-More-about-Literals-and-Datatypes">Mais sobre Literais e
Datatypes</a></li>
<li><a href="#ch-Glossary">Glossário</a></li>
</ol>
@@ -338,7 +338,7 @@ http://somewhere/JohnSmith http://www.w3
<p>O W3C <a href="http://www.w3.org/2001/sw/RDFCore/">RDFCore Working
Group</a> definiu uma notação similar chamada <a
href="http://www.w3.org/TR/rdf-testcases/#ntriples">N-Triples</a>. O nome
significa "notação de triplas". Nós veremos na próxima sessão que o Jena
possui uma interface de escrita de N-Triples também.</p>
-<h2><a id="ch-Writing RDF">Escrita de RDF</a></h2>
+<h2><a id="ch-Writing-RDF">Escrita de RDF</a></h2>
<p>Jena possui métodos para ler e escrever RDF como XML. Eles podem ser
usados para armazenar o modelo RDF em um arquivo e carregá-lo novamente em
outro momento.</p>
@@ -387,7 +387,7 @@ model.write(System.out, "N-TRIPLE");
</pre></p>
<p>Isso produzirá uma saÃda similar à do tutorial 3, que está em
conformidade com a especificação de N-Triplas.</p>
-<h2><a id="ch-Reading RDF">Leitura de RDF</a></h2>
+<h2><a id="ch-Reading-RDF">Leitura de RDF</a></h2>
<p><a
href="https://github.com/apache/jena/tree/master/jena-core/src-examples/jena/examples/rdf/Tutorial05.java">Tutorial
5</a> demonstra a leitura num modelo de sentenças gravadas num RDF XML. Com
este tutorial, nós teremos criado uma pequena base de dados de vcards na forma
RDF/XML. O código a seguir fará leitura e escrita. <em>Note que para esta
aplicação rodar, o arquivo de entrada precisa estar no diretório da
aplicação.</em></p>
@@ -567,7 +567,7 @@ Você verá que os prefixos da entra
<p>Jena possui outras operações sobre mapeamento de prefixos de um modelo,
como um<code>Map</code> de Java extraÃdo a partir dos mapeamentos existentes,
ou a adição de um grupo inteiro de mapeamentos de uma só vez; olhe a
documentação de <code>PrefixMapping</code> para mais detalhes.
-<h2 id="ch-Jena RDF Packages">Pacotes Jena RDF</h2>
+<h2 id="ch-Jena-RDF-Packages">Pacotes Jena RDF</h2>
<p>Jena é uma API JAVA para aplicações de web semântica. O pacote RDF
chave para o desenvolvedor é
<code>org.apache.jena.rdf.model</code>. A API tem sido definida em termos de
interfaces, logo o código da aplicação pode trabalhar com diferentes
implementações sem causar mudanças. Esse pacote contém interfaces para
representar modelos, recursos, propriedades, literais, sentenças e todos os
outros conceitos chaves de RDF, e um ModelFactory para criação de modelos.
Portanto, o código da aplicação permanece independente da implementação, o
melhor é usar interfaces onde for possÃvel e não implementações
especÃficas de classes.</p>
@@ -578,7 +578,7 @@ Você verá que os prefixos da entra
<code>PropertyImpl</code>, e <code>LiteralImpl</code> que podem ser usadas
diretamente ou então herdadas por diferentes implementações. As aplicações
devem raramente usar essas classes diretamente. Por exemplo, em vez de criar um
nova instância de <code>ResourceImpl</code>, é melhor usar o método
<code>createResource</code> do modelo que estiver sendo usado. Desta forma, se
a implementação do modelo usar uma implementação otimizada de
<code>Resource</code>, então não serão necessárias conversões entre os
dois tipos.</p>
-<h2 id="ch-Navigating a Model">Navegação em Modelos</h2>
+<h2 id="ch-Navigating-a-Model">Navegação em Modelos</h2>
<p>Até agora, este tutorial mostrou como criar, ler e escrever modelos RDF.
Chegou o momento de mostrar como acessar as informações mantidas num
modelo.</p>
@@ -653,7 +653,7 @@ while (iter.hasNext()) {
</p>
-<h2 id="ch-Querying a Model">Consultas em Modelos</h2>
+<h2 id="ch-Querying-a-Model">Consultas em Modelos</h2>
<p>A sessão anterior mostrou como navegar um modelo a partir de um recurso
com uma URI conhecida. Essa sessão mostrará como fazer buscas em um modelo. O
núcleo da API Jena suporta um limitada primitiva de consulta. As consultas
mais poderosas de SPARQL são descritas em outros lugares.</p>
@@ -792,7 +792,7 @@ StmtIterator iter = model.listStatements
<p>Embora possam ser funcionalmente equivalentes, a primeira forma vai listar
todas as sentenças do modelo e testar cada uma individualmente, a segunda
forma permite Ãndices mantidos pela implementação para melhor a perfomance.
Tente isso em modelos grandes e veja você mesmo, mas prepare uma chÃcara de
café antes.</p>
-<h2 id="ch-Operations on Models">Operações em Modelos</h2>
+<h2 id="ch-Operations-on-Models">Operações em Modelos</h2>
<p>Jena provê três operações para manipular modelos. Elas são operações
comuns de conjunto: unão, intersecção e diferença.</p>
@@ -943,7 +943,7 @@ tutorial 10</a>, que coloca esses fragme
<p>As classes de Jena oferecem métodos para manipular containers, incluindo
adição de novos membros, inserção de novos membros no meio de um container
e a remoção de membros existentes. As classes de container Jena atualmente
garantem que a lista ordenada de propriedades usadas começam com rdf:_1 e é
contÃguo. O RDFCore WG relaxou essa regra, permitindo uma representação
parcial dos containers. Isso, portanto, é uma área de Jena que pode ser
mudada no futuro.</p>
-<h2 id="ch-More about Literals and Datatypes">Mais sobre Literais e
Datatypes</h2>
+<h2 id="ch-More-about-Literals-and-Datatypes">Mais sobre Literais e
Datatypes</h2>
<p>Literais RDF não são apenas strings. Literais devem ter uma tag para
indicar a linguagem da literal. O diálogo de uma literal em Inglês é
considerado diferente de um diálogo de uma literal em Francês. Esse
comportamento estranho é um artefato da sintaxe RDF/XML original.</p>
@@ -1005,7 +1005,7 @@ model.write(system.out, "N-TRIPLE");</pr
<p>O RDFCore WG definiu mecanismos para suportar datatypes em RDF. Jena os
suporta usando mecanismos de <i>literais tipadas</i>; isso não é discutido
neste tutorial.</p>
-<h2 id="ch-Glossary">Glossário</h2>
+<h2 id="ch-gGlossary">Glossário</h2>
<dl>