/** Create a service request for remote execution over HTTP. The returned class, * {@link QueryEngineHTTP}, * allows various HTTP specific parameters to be set. * @param service Endpoint URL * @param query Query * @return Remote Query Engine */ static public QueryEngineHTTP createServiceRequest(String service, Query query) { return createServiceRequest(service, query, null); }
/** Create a QueryExecution that will access a SPARQL service over HTTP * @param service URL of the remote service * @param query Query to execute * @param authenticator HTTP Authenticator * @return QueryExecution */ static public QueryExecution sparqlService(String service, Query query, HttpAuthenticator authenticator) { checkNotNull(service, "URL for service is null") ; checkArg(query) ; return createServiceRequest(service, query, authenticator) ; }
/** Create a QueryExecution that will access a SPARQL service over HTTP * @param service URL of the remote service * @param query Query to execute * @return QueryExecution */ static public QueryExecution sparqlService(String service, Query query) { checkNotNull(service, "URL for service is null") ; checkArg(query) ; return createServiceRequest(service, query) ; }
/** Create a QueryExecution that will access a SPARQL service over HTTP * @param service URL of the remote service * @param query Query to execute * @param defaultGraph URI of the default graph * @param authenticator HTTP Authenticator * @return QueryExecution */ static public QueryExecution sparqlService(String service, Query query, String defaultGraph, HttpAuthenticator authenticator) { checkNotNull(service, "URL for service is null") ; //checkNotNull(defaultGraph, "IRI for default graph is null") ; checkArg(query) ; QueryEngineHTTP qe = createServiceRequest(service, query, authenticator) ; qe.addDefaultGraph(defaultGraph) ; return qe ; }
/** Create a QueryExecution that will access a SPARQL service over HTTP * @param service URL of the remote service * @param query Query to execute * @param defaultGraph URI of the default graph * @return QueryExecution */ static public QueryExecution sparqlService(String service, Query query, String defaultGraph) { checkNotNull(service, "URL for service is null") ; //checkNotNull(defaultGraph, "IRI for default graph is null") ; checkArg(query) ; QueryEngineHTTP qe = createServiceRequest(service, query) ; qe.addDefaultGraph(defaultGraph) ; return qe ; }
/** Create a QueryExecution that will access a SPARQL service over HTTP * @param service URL of the remote service * @param query Query to execute * @param defaultGraphURIs List of URIs to make up the default graph * @param namedGraphURIs List of URIs to make up the named graphs * @return QueryExecution */ static public QueryExecution sparqlService(String service, Query query, List<String> defaultGraphURIs, List<String> namedGraphURIs) { checkNotNull(service, "URL for service is null") ; //checkNotNull(defaultGraphURIs, "List of default graph URIs is null") ; //checkNotNull(namedGraphURIs, "List of named graph URIs is null") ; checkArg(query) ; QueryEngineHTTP qe = createServiceRequest(service, query) ; if ( defaultGraphURIs != null ) qe.setDefaultGraphURIs(defaultGraphURIs) ; if ( namedGraphURIs != null ) qe.setNamedGraphURIs(namedGraphURIs) ; return qe ; }
/** Create a QueryExecution that will access a SPARQL service over HTTP * @param service URL of the remote service * @param query Query to execute * @param defaultGraphURIs List of URIs to make up the default graph * @param namedGraphURIs List of URIs to make up the named graphs * @param authenticator HTTP Authenticator * @return QueryExecution */ static public QueryExecution sparqlService(String service, Query query, List<String> defaultGraphURIs, List<String> namedGraphURIs, HttpAuthenticator authenticator) { checkNotNull(service, "URL for service is null") ; //checkNotNull(defaultGraphURIs, "List of default graph URIs is null") ; //checkNotNull(namedGraphURIs, "List of named graph URIs is null") ; checkArg(query) ; QueryEngineHTTP qe = createServiceRequest(service, query, authenticator) ; if ( defaultGraphURIs != null ) qe.setDefaultGraphURIs(defaultGraphURIs) ; if ( namedGraphURIs != null ) qe.setNamedGraphURIs(namedGraphURIs) ; return qe ; }