Пример #1
0
 public string Query(string queryExpression, SparqlResultsFormat resultsFormat)
 {
     Logging.LogDebug("Query {0}", queryExpression);
     try
     {
         return(ReadStore.ExecuteSparqlQuery(queryExpression, resultsFormat));
     }
     catch (ReadWriteStoreModifiedException)
     {
         Logging.LogDebug("Read/Write store was concurrently modified. Attempting a retry");
         InvalidateReadStore();
         return(Query(queryExpression, resultsFormat));
     }
 }
Пример #2
0
 public BrightstarSparqlResultsType Query(SparqlQuery query, ISerializationFormat targetFormat, Stream resultsStream, string[] defaultGraphUris)
 {
     Logging.LogDebug("Query {0}", query);
     try
     {
         return(ReadStore.ExecuteSparqlQuery(query, targetFormat, resultsStream, defaultGraphUris));
     }
     catch (ReadWriteStoreModifiedException)
     {
         Logging.LogDebug("Read/Write store was concurrently modified. Attempting a retry");
         InvalidateReadStore();
         return(Query(query, targetFormat, resultsStream, defaultGraphUris));
     }
 }
Пример #3
0
 public void Query(string queryExpression, SparqlResultsFormat resultsFormat, Stream resultsStream)
 {
     Logging.LogDebug("Query {0}", queryExpression);
     try
     {
         BrightstarSparqlResultsType resultsType;
         ReadStore.ExecuteSparqlQuery(queryExpression, resultsFormat, resultsStream, out resultsType);
     }
     catch (ReadWriteStoreModifiedException)
     {
         Logging.LogDebug("Read/Write store was concurrently modified. Attempting a retry");
         InvalidateReadStore();
         Query(queryExpression, resultsFormat, resultsStream);
     }
 }