コード例 #1
0
 public static 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 = makeServiceRequest(service, query);
   qe.addDefaultGraph(defaultGraph);
   return qe;
 }
コード例 #2
0
  public static QueryExecution sparqlService(
      String service, Query query, List defaultGraphURIs, List 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 = makeServiceRequest(service, query);

    if (defaultGraphURIs != null) qe.setDefaultGraphURIs(defaultGraphURIs);
    if (namedGraphURIs != null) qe.setNamedGraphURIs(namedGraphURIs);
    return qe;
  }
コード例 #3
0
 private static void checkArg(Query query) {
   checkNotNull(query, "Query is null");
 }
コード例 #4
0
 private static void checkArg(String queryStr) {
   checkNotNull(queryStr, "Query string is null");
 }
コード例 #5
0
 private static void checkArg(Model model) {
   checkNotNull(model, "Model is a null pointer");
 }
コード例 #6
0
 public static QueryExecution sparqlService(String service, Query query) {
   checkNotNull(service, "URL for service is null");
   checkArg(query);
   return makeServiceRequest(service, query);
 }