com.hp.hpl.jena.query
Class QueryFactory

java.lang.Object
  extended by com.hp.hpl.jena.query.QueryFactory

public class QueryFactory
extends Object


Constructor Summary
QueryFactory()
           
 
Method Summary
static Query create()
          Make a query - no parsing done
static Query create(Query originalQuery)
          Make a query from another one by deep copy (a clone).
static Query create(String queryString)
          Create a SPARQL query from the given string.
static Query create(String queryString, String baseURI)
          Create a query from the given string by calling the parser.
static Query create(String queryString, String baseURI, Syntax syntax)
          Create a query from the given string by calling the parser.
static Query create(String queryString, Syntax syntax)
          Create a query from the given string with the
static Element createElement(String elementString)
           
static Template createTemplate(String templateString)
           
static Query make()
          Make a query - no parsing done - old name: create() preferred.
static Query parse(Query query, String queryString, String baseURI, Syntax syntaxURI)
          Parse a query from the given string by calling the parser.
static Query read(String url)
          Read a SPARQL query from a file.
static Query read(String url, com.hp.hpl.jena.util.FileManager filemanager, String baseURI, Syntax langURI)
          Read a query from a file.
static Query read(String url, String baseURI)
          Read a SPARQL query from a file.
static Query read(String url, String baseURI, Syntax langURI)
          Read a query from a file.
static Query read(String url, Syntax langURI)
          Read a query from a file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryFactory

public QueryFactory()
Method Detail

create

public static Query create(String queryString)
Create a SPARQL query from the given string.

Parameters:
queryString - The query string
Throws:
QueryException - Thrown when a parse error occurs

create

public static Query create(String queryString,
                           Syntax syntax)
Create a query from the given string with the

Parameters:
queryString - The query string
syntax - Syntax
Throws:
QueryException - Thrown when a parse error occurs

create

public static Query create(String queryString,
                           String baseURI)
Create a query from the given string by calling the parser.

Parameters:
queryString - The query string
baseURI - Base URI
Throws:
QueryException - Thrown when a parse error occurs

create

public static Query create(String queryString,
                           String baseURI,
                           Syntax syntax)
Create a query from the given string by calling the parser.

Parameters:
queryString - The query string
baseURI - Base URI
syntax - Syntax
Throws:
QueryException - Thrown when a parse error occurs

create

public static Query create()
Make a query - no parsing done


make

public static Query make()
Make a query - no parsing done - old name: create() preferred.


create

public static Query create(Query originalQuery)
Make a query from another one by deep copy (a clone). The returned query will be .equals to the original. The returned query can be mutated without changing the original (at which point it will stop being .equals)

Parameters:
originalQuery - The query to clone.

parse

public static Query parse(Query query,
                          String queryString,
                          String baseURI,
                          Syntax syntaxURI)
Parse a query from the given string by calling the parser.

Parameters:
query - Existing, uninitialized query
queryString - The query string
baseURI - URI for relative URI expansion
syntaxURI - URI for the syntax
Throws:
QueryException - Thrown when a parse error occurs

read

public static Query read(String url)
Read a SPARQL query from a file.

Parameters:
url - URL (file: or http: or anything a FileManager can handle)
Returns:
A new query object

read

public static Query read(String url,
                         String baseURI)
Read a SPARQL query from a file.

Parameters:
url - URL (file: or http: or anything a FileManager can handle)
baseURI - BaseURI for the query
Returns:
A new query object

read

public static Query read(String url,
                         Syntax langURI)
Read a query from a file.

Parameters:
url - URL (file: or http: or anything a FileManager can handle)
langURI - Query syntax
Returns:
A new query object

read

public static Query read(String url,
                         String baseURI,
                         Syntax langURI)
Read a query from a file.

Parameters:
url - URL (file: or http: or anything a FileManager can handle)
baseURI - BaseURI for the query
langURI - Query syntax
Returns:
A new query object

read

public static Query read(String url,
                         com.hp.hpl.jena.util.FileManager filemanager,
                         String baseURI,
                         Syntax langURI)
Read a query from a file.

Parameters:
url - URL (file: or http: or anything a FileManager can handle)
filemanager - Optional filemanager
baseURI - BaseURI for the query
langURI - Query syntax
Returns:
A new query object

createElement

public static Element createElement(String elementString)

createTemplate

public static Template createTemplate(String templateString)


Licenced under the Apache License, Version 2.0