Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.hp.hpl.jena.query
Class QueryFactory

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

    public class QueryFactory

extends java.lang.Object

Constructor Summary
`QueryFactory()`

Method Summary
`static Query` | `create(Query originalQuery)` Make a query from another one by deep copy (a clone).
`static Query` | `create(java.lang.String queryString)` Create a SPARQL query from the given string by calling the parser.
`static Query` | `create(java.lang.String queryString, java.lang.String baseURI)` Create a query from the given string by calling the parser.
`static Query` | `create(java.lang.String queryString, java.lang.String baseURI, Syntax querySyntax)` Create a query from the given string by calling the parser.
`static Query` | `create(java.lang.String queryString, Syntax langURI)` Create a query from the given string by calling the parser.
`static com.hp.hpl.jena.sparql.syntax.Element` | `createElement(java.lang.String elementString)`
`static com.hp.hpl.jena.sparql.syntax.Template` | `createTemplate(java.lang.String templateString)`
`static Query` | `make()` Make a query - no parsing done
`static Query` | `parse(Query query, java.lang.String queryString, java.lang.String baseURI, Syntax syntaxURI)` Parse a query from the given string by calling the parser.
`static Query` | `read(java.lang.String url)` Read a SPARQL query from a file.
`static Query` | `read(java.lang.String url, com.hp.hpl.jena.util.FileManager filemanager, java.lang.String baseURI, Syntax langURI)` Read a query from a file.
`static Query` | `read(java.lang.String url, java.lang.String baseURI)` Read a SPARQL query from a file.
`static Query` | `read(java.lang.String url, java.lang.String baseURI, 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(java.lang.String queryString)

  Create a SPARQL query from the given string by calling the parser.

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

### create

    public static Query create(java.lang.String queryString,
                               Syntax langURI)

  Create a query from the given string by calling the parser.

  Parameters:
    `queryString` - The query string
    `langURI` - URI for the syntax
  Throws:
    `QueryException` - Thrown when a parse error occurs

### create

    public static Query create(java.lang.String queryString,
                               java.lang.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(java.lang.String queryString,
                               java.lang.String baseURI,
                               Syntax querySyntax)

  Create a query from the given string by calling the parser.

  Parameters:
    `queryString` - The query string
    `baseURI` - Base URI
    `querySyntax` - URI for the syntax
  Throws:
    `QueryException` - Thrown when a parse error occurs

### make

    public static Query make()

  Make a query - no parsing done

### 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,
                              java.lang.String queryString,
                              java.lang.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(java.lang.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(java.lang.String url,
                             java.lang.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(java.lang.String url,
                             java.lang.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(java.lang.String url,
                             com.hp.hpl.jena.util.FileManager filemanager,
                             java.lang.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 com.hp.hpl.jena.sparql.syntax.Element createElement(java.lang.String elementString)

### createTemplate

    public static com.hp.hpl.jena.sparql.syntax.Template createTemplate(java.lang.String templateString)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP