bjorncole/pyMBE

Inspect Relationship ends and derive attributes for source and target Elements

Closed this issue · 1 comments

If we are loading only primary data for elements, this leaves out important attributes such as ownedElement or owner. Develop a way to inspect the Relationship source and target (and their subsetting / redefining properties) to generate the derived attribute values.

An example: OwningMembership.
OwningMembership has the owningRelatedElement (source) and ownedMemberElement (target) properties. The Element which is on the source end should have a derived property of "ownedElement" that has within its value (a list) the ownedMemberElement value. The Element which is on the target end should have a derived property of "owner" that has as its value the owningRelatedElement value.

Of course, we want this as general as possible. Try to look at base Relationships, such as OwningMembership (owningRelatedElement and ownedRelatedElement from Relationship), Specialization (general and specific) to get good base properties from which to work rather than having special code for every metatype.