public string ExecuteSparqlQuery(string exp, SparqlResultsFormat resultsFormat) { var queryHandler = new SparqlQueryHandler(); BrightstarSparqlResultSet result = queryHandler.ExecuteSparql(exp, this); return(result.GetString(resultsFormat)); }
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 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(ParseSparql(sparqlQuery), _store).RawResultSet); }