Ejemplo n.º 1
0
 /// <summary>
 /// Processes the SPARQL Query using the underlying processor and then
 /// </summary>
 /// <param name="query"></param>
 /// <param name="sink"></param>
 public void Run(SparqlQuery query, ILinqResultsSink sink)
 {
     Object results = this.ProcessQuery(query);
     if (results is SparqlResultSet)
     {
         sink.Fill((SparqlResultSet)results);
     }
     else if (results is BaseMultiset)
     {
         sink.Fill((BaseMultiset)results);
     }
     else
     {
         throw new LinqToRdfException("Underlying Query Processor returned unexpected results of type " + results.GetType().ToString());
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Processes the SPARQL Query using the underlying processor and then
        /// </summary>
        /// <param name="query"></param>
        /// <param name="sink"></param>
        public void Run(SparqlQuery query, ILinqResultsSink sink)
        {
            Object results = this.ProcessQuery(query);

            if (results is SparqlResultSet)
            {
                sink.Fill((SparqlResultSet)results);
            }
            else if (results is BaseMultiset)
            {
                sink.Fill((BaseMultiset)results);
            }
            else
            {
                throw new LinqToRdfException("Underlying Query Processor returned unexpected results of type " + results.GetType().ToString());
            }
        }