com.franz.agjena.query
Class AllegroGraphQueryExecutionFactory

java.lang.Object
  extended by com.franz.agjena.query.AllegroGraphQueryExecutionFactory

public class AllegroGraphQueryExecutionFactory
extends java.lang.Object

The static methods in this class are used to make QueryExecution instances for AllegroGraph models. QueryExecution instances created by methods in QueryExecutionFactory will work correctly, but will be very inefficient. Place to make QueryProcessor objects from Query objects or a string.


Method Summary
static QueryExecution create(Query query)
          Create a QueryExecution
static QueryExecution create(java.lang.String queryStr, Syntax syntax)
          Create a QueryExecution
static QueryExecution create(java.lang.String queryStr, Syntax syntax, Dataset dataset)
          Create a QueryExecution to execute over the Dataset.
static QueryExecution create(java.lang.String queryStr, Syntax syntax, Model model, QuerySolution initialBinding)
          Create a QueryExecution to execute over the Model, given some initial values of variables.
static Plan createPlan(AllegroGraphQuery query, DatasetGraph dataset, Binding input, Context context)
           
static Plan createPlan(java.lang.String queryStr, Graph graph)
           
static QueryEngineHTTP createServiceRequest(java.lang.String service, Query query)
          Create a service request for remote execution over HTTP.
static QueryExecution sparqlService(java.lang.String service, java.lang.String query)
          Create a QueryExecution that will access a SPARQL service over HTTP
static QueryExecution sparqlService(java.lang.String service, java.lang.String query, java.util.List defaultGraphURIs, java.util.List namedGraphURIs)
          Create a QueryExecution that will access a SPARQL service over HTTP
static QueryExecution sparqlService(java.lang.String service, java.lang.String query, java.lang.String defaultGraph)
          Create a QueryExecution that will access a SPARQL service over HTTP
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static QueryExecution create(Query query)
Create a QueryExecution

Parameters:
query - Query
Returns:
QueryExecution

create

public static QueryExecution create(java.lang.String queryStr,
                                    Syntax syntax)
Create a QueryExecution

Parameters:
queryStr - Query string
syntax - Query syntax
Returns:
QueryExecution

create

public static QueryExecution create(java.lang.String queryStr,
                                    Syntax syntax,
                                    Dataset dataset)
Create a QueryExecution to execute over the Dataset.

Parameters:
queryStr - Query string
syntax - Query language
dataset - Target of the query
Returns:
QueryExecution

create

public static QueryExecution create(java.lang.String queryStr,
                                    Syntax syntax,
                                    Model model,
                                    QuerySolution initialBinding)
Create a QueryExecution to execute over the Model, given some initial values of variables.

Parameters:
queryStr - Query string
syntax - Query language
model - Target of the query
initialBinding - Any initial binding of variables
Returns:
QueryExecution

sparqlService

public static QueryExecution sparqlService(java.lang.String service,
                                           java.lang.String query)
Create a QueryExecution that will access a SPARQL service over HTTP

Parameters:
service - URL of the remote service
query - Query string to execute
Returns:
QueryExecution

sparqlService

public static QueryExecution sparqlService(java.lang.String service,
                                           java.lang.String query,
                                           java.lang.String defaultGraph)
Create a QueryExecution that will access a SPARQL service over HTTP

Parameters:
service - URL of the remote service
query - Query string to execute
defaultGraph - URI of the default graph
Returns:
QueryExecution

sparqlService

public static QueryExecution sparqlService(java.lang.String service,
                                           java.lang.String query,
                                           java.util.List defaultGraphURIs,
                                           java.util.List namedGraphURIs)
Create a QueryExecution that will access a SPARQL service over HTTP

Parameters:
service - URL of the remote service
query - Query string to execute
defaultGraphURIs - List of URIs to make up the default graph
namedGraphURIs - List of URIs to make up the named graphs
Returns:
QueryExecution

createServiceRequest

public static QueryEngineHTTP createServiceRequest(java.lang.String service,
                                                   Query query)
Create a service request for remote execution over HTTP. The returned class, QueryEngineHTTP, allows various HTTP specific paramters to be set.


createPlan

public static Plan createPlan(AllegroGraphQuery query,
                              DatasetGraph dataset,
                              Binding input,
                              Context context)

createPlan

public static Plan createPlan(java.lang.String queryStr,
                              Graph graph)