Пример #1
0
 /// <summary>
 /// Applies the query to the given federation
 /// </summary>
 public RDFSelectQueryResult ApplyToFederation(RDFFederation federation)
 {
     if (federation != null)
     {
         return(RDFQueryEngine.CreateNew().EvaluateSelectQuery(this, federation));
     }
     else
     {
         return(new RDFSelectQueryResult());
     }
 }
Пример #2
0
 /// <summary>
 /// Applies the query to the given graph
 /// </summary>
 public RDFSelectQueryResult ApplyToGraph(RDFGraph graph)
 {
     if (graph != null)
     {
         return(RDFQueryEngine.CreateNew().EvaluateSelectQuery(this, graph));
     }
     else
     {
         return(new RDFSelectQueryResult());
     }
 }
Пример #3
0
 /// <summary>
 /// Applies the query to the given store
 /// </summary>
 public RDFSelectQueryResult ApplyToStore(RDFStore store)
 {
     if (store != null)
     {
         return(RDFQueryEngine.CreateNew().EvaluateSelectQuery(this, store));
     }
     else
     {
         return(new RDFSelectQueryResult());
     }
 }
Пример #4
0
 /// <summary>
 /// Applies the query to the given federation
 /// </summary>
 public RDFConstructQueryResult ApplyToFederation(RDFFederation federation)
 {
     if (federation != null)
     {
         return(RDFQueryEngine.CreateNew().EvaluateConstructQuery(this, federation));
     }
     else
     {
         return(new RDFConstructQueryResult(this.ToString()));
     }
 }
Пример #5
0
 /// <summary>
 /// Applies the query to the given store
 /// </summary>
 public RDFConstructQueryResult ApplyToStore(RDFStore store)
 {
     if (store != null)
     {
         return(RDFQueryEngine.CreateNew().EvaluateConstructQuery(this, store));
     }
     else
     {
         return(new RDFConstructQueryResult(this.ToString()));
     }
 }
Пример #6
0
 /// <summary>
 /// Applies the query to the given graph
 /// </summary>
 public RDFConstructQueryResult ApplyToGraph(RDFGraph graph)
 {
     if (graph != null)
     {
         return(RDFQueryEngine.CreateNew().EvaluateConstructQuery(this, graph));
     }
     else
     {
         return(new RDFConstructQueryResult(this.ToString()));
     }
 }
Пример #7
0
        /// <summary>
        /// Executes projection algorythm
        /// </summary>
        private DataTable ExecuteProjectionAlgorythm()
        {
            List <DataTable> projFuncTables = new List <DataTable>();

            this.Aggregators.ForEach(ag =>
                                     projFuncTables.Add(ag.ExecuteProjection(this.PartitionVariables)));

            DataTable resultTable = RDFQueryEngine.CreateNew()
                                    .CombineTables(projFuncTables, false);

            return(resultTable);
        }
Пример #8
0
        /// <summary>
        /// Applies the modifier on the given datatable
        /// </summary>
        internal override DataTable ApplyModifier(DataTable table)
        {
            //Perform consistency checks
            ConsistencyChecks(table);

            //Execute partition algorythm
            foreach (DataRow tableRow in table.Rows)
            {
                this.Aggregators.ForEach(ag =>
                                         ag.ExecutePartition(GetPartitionKey(tableRow), tableRow));
            }

            //Execute projection algorythm
            List <DataTable> projFuncTables = new List <DataTable>();

            this.Aggregators.ForEach(ag =>
                                     projFuncTables.Add(ag.ExecuteProjection(this.PartitionVariables)));

            //Produce result's table
            return(RDFQueryEngine.CreateNew().CombineTables(projFuncTables, false));
        }