You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2014/12/05 11:40:39 UTC

svn commit: r1643227 - /jena/site/trunk/content/documentation/extras/querybuilder/index.mdtext

Author: andy
Date: Fri Dec  5 10:40:39 2014
New Revision: 1643227

URL: http://svn.apache.org/viewvc?rev=1643227&view=rev
Log:
Fix formatting of content

Modified:
    jena/site/trunk/content/documentation/extras/querybuilder/index.mdtext

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=1643227&r1=1643226&r2=1643227&view=diff
==============================================================================
--- jena/site/trunk/content/documentation/extras/querybuilder/index.mdtext (original)
+++ jena/site/trunk/content/documentation/extras/querybuilder/index.mdtext Fri Dec  5 10:40:39 2014
@@ -12,10 +12,14 @@ builder for easy chaing.  The  example:
         .addVar( "*" )
         .addWhere( "?s", "?o", "?p" );
     
-    Query q = sb.build();
+    Query q = sb.build() ;
+
 
+produces
 
-produces `SELECT * WHERE { ?s ?o ?p . }`
+    SELECT * 
+    WHERE 
+      { ?s ?p ?o }
 
 Template Usage
 ==============
@@ -27,10 +31,18 @@ for example using the above query as the
 
 
     SelectBuilder sb2 = sb.clone();
-    sb2.addPrefix( "foaf", "http://xmlns.com/foaf/0.1/" ).addWhere( ?s, RDF.type, foaf:Person) 
+    sb2.addPrefix( "foaf", "http://xmlns.com/foaf/0.1/" )
+       .addWhere( ?s, RDF.type, "foaf:Person") ;
+
 
+produces
 
-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 . }`
+    PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+    SELECT * 
+    WHERE 
+      { ?s ?p ?o . 
+        ?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> foaf:person . 
+      } 
 
 Prepared Statement Usage
 ========================
@@ -41,8 +53,14 @@ The query builders have the ability to r
         .addVar( "*" )
         .addWhere( "?s", "?o", "?p" );
     
-    sb.setVar( Var.alloc( "?p" ), NodeFactory.createURI( "http://xmlns.com/foaf/0.1/Person" )
+    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> . }`
+produces 
+
+    SELECT * 
+    WHERE 
+      { ?s ?p <http://xmlns.com/foaf/0.1/Person> }
+
+