public BrightstarSparqlResultsType ExecuteSparqlQuery(SparqlQuery query, ISerializationFormat targetFormat, Stream resultsStream, IEnumerable<string> defaultGraphUris ) { var queryHandler = new SparqlQueryHandler(targetFormat, defaultGraphUris); // NOTE: streamWriter is not wrapped in a using because we don't want to close resultStream at this point var streamWriter = new StreamWriter(resultsStream, targetFormat.Encoding); var resultsType = queryHandler.ExecuteSparql(query, this, streamWriter); return resultsType; }
public void ExecuteSparqlQuery(string exp, SparqlResultsFormat resultsFormat, Stream resultStream, out BrightstarSparqlResultsType resultsType) { var queryHandler = new SparqlQueryHandler(); BrightstarSparqlResultSet result = queryHandler.ExecuteSparql(exp, this); // NOTE: streamWriter is not wrapped in a using because we don't want to close resultStream at this point var streamWriter = new StreamWriter(resultStream, resultsFormat.Encoding); resultsType = result.ResultType; streamWriter.Write(result.GetString(resultsFormat)); streamWriter.Flush(); }
public string ExecuteSparqlQuery(string exp, SparqlResultsFormat resultsFormat, out long rowCount) { var queryHandler = new SparqlQueryHandler(); BrightstarSparqlResultSet result = queryHandler.ExecuteSparql(exp, this); rowCount = result.Count; return result.GetString(resultsFormat); }
public string ExecuteSparqlQuery(string exp, SparqlResultsFormat resultsFormat, IEnumerable<string> defaultGraphUris = null) { var queryHandler = new SparqlQueryHandler(defaultGraphUris); BrightstarSparqlResultSet result = queryHandler.ExecuteSparql(exp, this); return result.GetString(resultsFormat); }
public void Query(IRdfHandler rdfHandler, ISparqlResultsHandler resultsHandler, string sparqlQuery) { var sh = new SparqlQueryHandler(); sh.ExecuteSparql(rdfHandler, resultsHandler, sparqlQuery, _store); }
public object Query(string sparqlQuery) { var sh = new SparqlQueryHandler(); return sh.ExecuteSparql(sparqlQuery, _store).RawResultSet; }