public static string ExecuteSparqlQuery(this IStore store, string sparqlExpression, SparqlResultsFormat resultsFormat) { var query = ParseSparql(sparqlExpression); var resultsStream = new MemoryStream(); store.ExecuteSparqlQuery(query, resultsFormat.WithEncoding(new UTF8Encoding(false)), resultsStream); var ret = Encoding.UTF8.GetString(resultsStream.ToArray()); return ret; }
public static string Query(this StoreWorker storeWorker, string sparqlExpression, SparqlResultsFormat resultsFormat, string[] defaultGraphUris) { var query = ParseSparql(sparqlExpression); using (var resultsStream = new MemoryStream()) { storeWorker.Query(query, resultsFormat.WithEncoding(new UTF8Encoding(false)), resultsStream, defaultGraphUris); return Encoding.UTF8.GetString(resultsStream.ToArray()); } }
public static string Query(this StoreWorker storeWorker, string sparqlExpression, SparqlResultsFormat resultsFormat, string[] defaultGraphUris) { var query = ParseSparql(sparqlExpression); using (var resultsStream = new MemoryStream()) { storeWorker.Query(query, resultsFormat.WithEncoding(new UTF8Encoding(false)), resultsStream, defaultGraphUris); return(Encoding.UTF8.GetString(resultsStream.ToArray())); } }
public static string ExecuteSparqlQuery(this IStore store, string sparqlExpression, SparqlResultsFormat resultsFormat) { var query = ParseSparql(sparqlExpression); var resultsStream = new MemoryStream(); store.ExecuteSparqlQuery(query, resultsFormat.WithEncoding(new UTF8Encoding(false)), resultsStream); var ret = Encoding.UTF8.GetString(resultsStream.ToArray()); return(ret); }