Package org.bitbucket.rehei.sparqljava.query

Examples of org.bitbucket.rehei.sparqljava.query.where


  public static void main(String[] args) {

    String shortQuery = Q.prefix("books", "http://example.org/books/")
        .prefix("rdf", "http://example.org/rdf")
        .select("?book ?authorName", new where() {
          {
            $("?book books:author ?author");
            $("?author books:authorName ?authorName");
          }
        }).get();
    System.out.println(shortQuery);

   
    String longQuery = Q
        .base("http://example.org/someWorldOntology#")
        .prefix("rdf",
            "http://www.w3.org/1999/02/22-rdf-syntax-ns#type")
        .prefix("owl", "http://www.w3.org/2002/07/owl#")
        .selectDistinct("?bookTitle ?authorName ?totalAmountOfBooks")
        .from("http://example.org/books/fantasy")
        .fromNamed("http://example.org/people", new where() {
          {
            select("SUM(?book) as ?totalAmountOfBooks",
                new where() {
                  {
                    $(new group() {
                      {
                        $("?book rdf:type <Book>");
                      }
View Full Code Here

TOP

Related Classes of org.bitbucket.rehei.sparqljava.query.where

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.