Point_Collection a subclass of Automation_Collection or not? - #792
Merged
gtfierro merged 1 commit intoJul 24, 2026
Merged
Conversation
Member
|
We discussed briefly at the meeting and decided that these should be separate, i.e. that Point Collection is not a subclass of Automation Collection. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brick 1.5.0-rc1 defines:
Automation_Collectionas a collection class and a SHACL shape that constraints the collection members to be of typeEquipment,Point, orAutomation_Collection.Point_Collectionas a collection class and a SHACL shape that constraints the collection members to be of typePointorPoint_Collection.Point_Collectionas a subclass ofAutomation_Collection.Clearly, any instance of the
Point_Collectionclass that satisfies the constraints of thePoint_Collectionshape also satisfies the constraints of theAutomation_Collectionclass:Point_Collectionmember is of typePoint, then thePointconstraint ofAutomation_Collectionis satisfied.Point_Collectionmember is of typePoint_Collectionand the reasoner infers that thePoint_Collectioninstance is also anAutomation_Collectioninstance (rdfs9), then theAutomation_Collectionconstraint ofAutomation_Collectionis satisfied.So, from the RDF perspective, the set of all
Point_Collections can be seen a subset of the set of allAutomation_Collections.However, any software dealing with these collections will most likely perform the operations on them that are typical for collections – such as reading and adding elements.
Reading is no problem:
Automation_Collectionwhere the software expects aAutomation_Collectionwill yield elements of typeEquipment,Point, andAutomation_Collection– as expected. ✅Point_Collectionwhere the software expects aPoint_Collectionwill yield elements of typePointandPoint_Collection– as expected. ✅Automation_Collectionwhere the software expects aPoint_Collectionis problematic but can be prevented with a simple type check. ✅Point_Collectionwhere the software expects aAutomation_Collectionwill yield elements of typePointandPoint_Collection– there will never be anyEquipmentyielded and all of the yieldedAutomation_Collectioninstances will bePoint_Collectioninstances, but that's perfectly fine. ✅Adding elements has a problem though:
Automation_Collectionwhere the software expects aAutomation_Collectionis fine. ✅Point_Collectionwhere the software expects aPoint_Collectionis fine. ✅Automation_Collectionwhere the software expects aPoint_Collectionis fine. ✅Point_Collectionwhere the software expects aAutomation_Collectionbreaks – the software might addEquipmentor anAutomation_Collectionthat is not aPoint_Collection, meaning thePoint_Collectioninstance will not satisfy the constraints of thePoint_Collectionshape. ❌Therefore, if the SHACL shapes are not only intended to be used for validation, but also to guide software to construct collection instances that will pass the validation, then
Point_Collectionshould not be a subclass ofAutomation_Collection.What do you think?