Hi Heshan,
Great that you are working hard, and good to know that there are no bugs in the AST :)
When it comes to the plan and the ShaclSailConnection. The ShaclSailConnection should generate the plan when commit() is called and validate that the data is according to the plan. The way this happens is that ShaclSailConnection calls the generatePlan methods in each shape’s property, and then calls validate() (or something like that) on the return value of generatePlan. The ShaclSailConnection just calls the appropriate methods in the shape properties and the plan, it doesn’t do much else with regards to validation.
Your plan is going to be quite simple for implementing support for minCount. At the end of your chain (plan) you will have a node of type MinCountValidator. This node needs some method on it (eg. validate()) that the ShaclSailConnection can call. For the time being this method should probably just return true/false. In the future we will expand this, especially when looking at maxCount.
The the condition for GroupBy (e.g., the variable to group by, ?a in the diagram) should be set in the generatePlan (or getPlan as I wrote in the code) method in MinCountPropertyShape. This is where GroupBy should be instantiated.
Would probably be a good idea to write some tests for OuterLeftJoin, GroupBy and Count.
Håvard
Hi Håvard,
I checked our AST with multiple minCount and multiple Shapes it working fine.I go though research papers and tutorials last days lambda expressions and Iterator little bit new to me. I go though with plan and some places i couldn't understand properly. Now i am writing iterator implementations to OuterLeftJoin, GroupBy, Count. Can you please tell me what is the validation plan in ShaclSailConnection and what is the difference between ShaclSailConnection and mincount validation. I think Groupby section logic (condition) we right in main class and we retrieve that condition to out GroupBy class. is that correct?
I will commit my code to Github after implement this OuterLeftJoin,GroupBy,Count classes.
Thank you, regards, Heshan
|