We have a tree structure where a property can be defined at an interior node of the tree and if the property is not defined for a node, then the value of the property value of its nearest ancestor that defines the property is used. In other words, we have inherited attributes. The question is, what is the best way to model such inheritance.
One way is to model it directly with an attribute per node. When queried, the value of the attribute does NOT reflect the value of any proper ancestor. Additionally, we can provide a link or a non-writable relationship that returns a resource that encapsulates the value of the property in the nearest ancestor that defines the property.
Is this the best way to model such inheritance?