You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have verified that I am running the latest version of the CDP4-SDK
I have searched open and closed issues to ensure it has not already been reported
Description
Currently in the SDK it is possible to obtain containment information for a Thing via:
directly contained things through the this.ContainerLists property
containment tree through the QueryContainedThingsDeep() method
However, it is not possible to obtain objects referenced (but not contained) by a Thing. Additional helper properties/methods similar to the ones for containment are needed, possibly something like this:
directly referenced things through a new property: this.ReferenceLists
all referenced things from the containment tree through a new method: QueryReferencedThingsDeep()
this method would iterate through the QueryContainedThingsDeep() objects and create a list of all objects in the this.ReferenceLists
It is also needed to add a method that iterates both contained and referenced things, to have a complete tree of objects that are connected to a given thing, possibly named QueryConnectedThingsDeep().
As a summary (proposal only, names subject to change):
QueryContainedThingsDeep(): navigate recursively through this.ContainerLists and create a list of [these] contained objects
QueryReferencedThingsDeep(): navigate recursively through this.ContainerLists and create a list of referenced objects
QueryConnectedThingsDeep(): navigate recursively though this.ContainerLists joined with this.ReferenceLists, and create a list of these objects (both referenced and contained)
@alexatrhea or @lxatrhea: because I do not have access to the code generation code (and even though I am more than familiar with the codegen on OCDT, it would probably take a while to familiarise with the codegen here), I think one of you guys needs to take this one up.
The reason this is needed is that, in the Syncer tool, when "moving" certain objects from one model to another, you have to bring along all the connected things as well, and this includes references to objects that are not directly contained.
Is the expected return type of QueryContainedThingsDeep(), QueryReferencedThingsDeep() and QueryConnectedThingsDeep() an IEnumerable<Thing>
Yes, I would expect the new methods and properties to have the same return type as the already existing ones, so IEnumerable<Thing> for methods and IEnumerable<IEnumerable> for the properties.
Prerequisites
Description
Currently in the SDK it is possible to obtain containment information for a
Thing
via:this.ContainerLists
propertyQueryContainedThingsDeep()
methodHowever, it is not possible to obtain objects referenced (but not contained) by a
Thing
. Additional helper properties/methods similar to the ones for containment are needed, possibly something like this:this.ReferenceLists
QueryReferencedThingsDeep()
QueryContainedThingsDeep()
objects and create a list of all objects in thethis.ReferenceLists
It is also needed to add a method that iterates both contained and referenced things, to have a complete tree of objects that are connected to a given thing, possibly named
QueryConnectedThingsDeep()
.As a summary (proposal only, names subject to change):
QueryContainedThingsDeep()
: navigate recursively throughthis.ContainerLists
and create a list of [these] contained objectsQueryReferencedThingsDeep()
: navigate recursively throughthis.ContainerLists
and create a list of referenced objectsQueryConnectedThingsDeep()
: navigate recursively thoughthis.ContainerLists
joined withthis.ReferenceLists
, and create a list of these objects (both referenced and contained)As a few examples of referenced things:
DomainOfExpertise
: referencesCategory
DomainOfExpertise
: referencesDomain
ActualFiniteStateList
: referencesExcludeOption
,Owner
,PossibleFiniteStateList
The text was updated successfully, but these errors were encountered: