java.lang.Object
org.apache.jena.query.QueryFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Querycreate()Make a query - no parsing donestatic QueryCreate a SPARQL query from the given string.static QueryCreate a query from the given string by calling the parser.static QueryCreate a query from the given string by calling the parser.static QueryCreate a query from the given string with thestatic QueryMake a query from another one by deep copy (a clone).static ElementcreateElement(String elementString) static TemplatecreateTemplate(String templateString) static Querymake()Make a query - no parsing done - old name:create()preferred.static QueryParse a query from the given string by calling the parser.static QueryRead a SPARQL query from a file.static QueryRead a SPARQL query from a file.static QueryRead a query from a file.static QueryRead a query from a file.static Queryread(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
-