Author: claude
Date: Mon Oct 13 18:43:37 2014
New Revision: 1631507
URL: http://svn.apache.org/r1631507
Log:
fixed querybuilder documentation
added extras to navigation.
Modified:
jena/site/trunk/content/documentation/extras/querybuilder/index.mdtext
jena/site/trunk/templates/skeleton.html
Modified: jena/site/trunk/content/documentation/extras/querybuilder/index.mdtext
URL:
http://svn.apache.org/viewvc/jena/site/trunk/content/documentation/extras/querybuilder/index.mdtext?rev=1631507&r1=1631506&r2=1631507&view=diff
==============================================================================
--- jena/site/trunk/content/documentation/extras/querybuilder/index.mdtext
(original)
+++ jena/site/trunk/content/documentation/extras/querybuilder/index.mdtext Mon
Oct 13 18:43:37 2014
@@ -7,14 +7,13 @@ developers to create queries without res
Each of the builders has a series of methods to define the query. Each method
returns the
builder for easy chaing. The example:
-```
-SelectBuilder sb = new SelectBuilder()
- .addVar( "*" )
- .addWhere( "?s", "?o", "?p" );
-
-Query q = sb.build();
-```
+ SelectBuilder sb = new SelectBuilder()
+ .addVar( "*" )
+ .addWhere( "?s", "?o", "?p" );
+
+ Query q = sb.build();
+
produces `SELECT * WHERE { ?s ?o ?p . }`
@@ -26,10 +25,10 @@ Using this a developer can create as "Te
for example using the above query as the "template" the this code:
-```
-SelectBuilder sb2 = sb.clone();
-sb2.addPrefix( "foaf", "http://xmlns.com/foaf/0.1/" ).addWhere( ?s, RDF.type,
foaf:Person)
-```
+
+ SelectBuilder sb2 = sb.clone();
+ sb2.addPrefix( "foaf", "http://xmlns.com/foaf/0.1/" ).addWhere( ?s,
RDF.type, foaf:Person)
+
produces `PREFIX foaf: http://xmlns.com/foaf/0.1/ SELECT * WHERE { ?s ?o ?p .
?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> foaf:person . }`
@@ -38,15 +37,12 @@ Prepared Statement Usage
The query builders have the ability to replace variables with other values.
This can be
-```
-SelectBuilder sb = new SelectBuilder()
- .addVar( "*" )
- .addWhere( "?s", "?o", "?p" );
-
-sb.setVar( Var.alloc( "?p" ), NodeFactory.createURI(
"http://xmlns.com/foaf/0.1/Person" )
-Query q = sb.build();
-
-```
+ SelectBuilder sb = new SelectBuilder()
+ .addVar( "*" )
+ .addWhere( "?s", "?o", "?p" );
+
+ sb.setVar( Var.alloc( "?p" ), NodeFactory.createURI(
"http://xmlns.com/foaf/0.1/Person" )
+ Query q = sb.build();
produces `SELECT * WHERE { ?s ?o <http://xmlns.com/foaf/0.1/Person> . }`
Modified: jena/site/trunk/templates/skeleton.html
URL:
http://svn.apache.org/viewvc/jena/site/trunk/templates/skeleton.html?rev=1631507&r1=1631506&r2=1631507&view=diff
==============================================================================
--- jena/site/trunk/templates/skeleton.html (original)
+++ jena/site/trunk/templates/skeleton.html Mon Oct 13 18:43:37 2014
@@ -91,6 +91,7 @@
<li><a href="/documentation/ontology/">Ontology API</a></li>
<li><a href="/documentation/inference/index.html">Inference
API</a></li>
<li><a href="/documentation/tools/index.html">Command-line
tools</a></li>
+ <li><a
href="/documentation/extras/index.html">Extras</a></li>
</ul>
</li>