java.lang.Object
org.apache.jena.query.QueryFactory
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Query
create()
Make a query - no parsing donestatic Query
Create a SPARQL query from the given string.static Query
Create a query from the given string by calling the parser.static Query
Create a query from the given string by calling the parser.static Query
Create a query from the given string with thestatic Query
Make a query from another one by deep copy (a clone).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 a query from the given string by calling the parser.static Query
Read a SPARQL query from a file.static Query
Read a SPARQL query from a file.static Query
Read a query from a file.static Query
Read a query from a file.static Query
read
(String url, StreamManager streamManager, String baseURI, Syntax langURI) Read a query from a file.
-
Constructor Details
-
QueryFactory
public QueryFactory()
-
-
Method Details
-
create
Create a SPARQL query from the given string.- Parameters:
queryString
- The query string- Throws:
QueryException
- Thrown when a parse error occurs
-
create
Create a query from the given string with the- Parameters:
queryString
- The query stringsyntax
-Syntax
- Throws:
QueryException
- Thrown when a parse error occurs
-
create
Create a query from the given string by calling the parser.- Parameters:
queryString
- The query stringbaseURI
- Base URI- Throws:
QueryException
- Thrown when a parse error occurs
-
create
Create a query from the given string by calling the parser.- Parameters:
queryString
- The query stringbaseURI
- Base URIsyntax
-Syntax
- Throws:
QueryException
- Thrown when a parse error occurs
-
create
Make a query - no parsing done -
make
Make a query - no parsing done - old name:create()
preferred. -
create
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
Parse a query from the given string by calling the parser.- Parameters:
query
- Existing, uninitialized queryqueryString
- The query stringbaseURI
- URI for relative URI expansionsyntaxURI
- URI for the syntax- Throws:
QueryException
- Thrown when a parse error occurs
-
read
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
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
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
Read a query from a file.- Parameters:
url
- URL (file: or http: or anything a FileManager can handle)baseURI
- BaseURI for the querylangURI
- Query syntax- Returns:
- A new query object
-
read
Read a query from a file.- Parameters:
url
- URL (file: or http: or anything a FileManager can handle)streamManager
- Optional StreamManagerbaseURI
- BaseURI for the querylangURI
- Query syntax- Returns:
- A new query object
-
createElement
-
createTemplate
-