public class QueryFactory extends Object
Constructor and Description |
---|
QueryFactory() |
Modifier and Type | Method and Description |
---|---|
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(Query originalQuery,
boolean useRawQuery)
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,
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.
|
public static Query create(String queryString)
queryString
- The query stringQueryException
- Thrown when a parse error occurspublic static Query create(String queryString, Syntax syntax)
queryString
- The query stringsyntax
- Syntax
QueryException
- Thrown when a parse error occurspublic static Query create(String queryString, String baseURI)
queryString
- The query stringbaseURI
- Base URIQueryException
- Thrown when a parse error occurspublic static Query create(String queryString, String baseURI, Syntax syntax)
queryString
- The query stringbaseURI
- Base URIsyntax
- Syntax
QueryException
- Thrown when a parse error occurspublic static Query create()
public static Query create(Query originalQuery)
originalQuery
- The query to clone.public static Query create(Query originalQuery, boolean useRawQuery)
originalQuery
- The query to clone.useRawQuery
- Whether to clone from the raw query string the original query was created from (if it is available)public static Query parse(Query query, String queryString, String baseURI, Syntax syntaxURI)
query
- Existing, uninitialized queryqueryString
- The query stringbaseURI
- URI for relative URI expansionsyntaxURI
- URI for the syntaxQueryException
- Thrown when a parse error occurspublic static Query read(String url)
url
- URL (file: or http: or anything a FileManager can handle)public static Query read(String url, String baseURI)
url
- URL (file: or http: or anything a FileManager can handle)baseURI
- BaseURI for the querypublic static Query read(String url, Syntax langURI)
url
- URL (file: or http: or anything a FileManager can handle)langURI
- Query syntaxpublic static Query read(String url, String baseURI, Syntax langURI)
url
- URL (file: or http: or anything a FileManager can handle)baseURI
- BaseURI for the querylangURI
- Query syntaxpublic static Query read(String url, FileManager filemanager, String baseURI, Syntax langURI)
url
- URL (file: or http: or anything a FileManager can handle)filemanager
- Optional filemanagerbaseURI
- BaseURI for the querylangURI
- Query syntaxLicenced under the Apache License, Version 2.0