Page MenuHomePhabricator

GetPropertyKeys() in DataNode should also return propertyKeys of BaseData
Open, NormalPublic

Description

As it is the case in GetConstProperty, where the BaseData is searched for a property, we should find a solution with GetPropertyKeys() to return keys of BaseData and DataNode.

Event Timeline

hentsch triaged this task as Normal priority.Apr 27 2018, 10:54 AM
hentsch created this task.

Because GetPropertyKeys is part of the Provider interface, I would implement it exactly the same way like the getter of the interface.
The problem/risk arises with the setter and they are part of the PropertyOwner interface. Therefore I would propose the following:

  1. extend the Owner interface by a method IsOwnedProperty (see below)
  2. Add the documentation to the DataNode, that 1) one should use it to check via this method if the property is realy part oft the node (this method does not pass through to the data) and 2) that one should be carefull if modifying props that are realy owned by the node. Otherwise one would accidentally overwrite/hide base date props.
IsOwnedProperty(const std::string &propertyKey, const std::string &contextName = "", bool fallBackOnDefaultContext = true)

@kislinsk: what do you think?

Have discussed the topic with @kislinsk. My proposal (see above) is fine.

Hotfix T24728 is redundant after this task is done

kislinsk added a project: Auto-closed.

Hi there! ๐Ÿ™‚

This task was auto-closed according to our Task Lifecycle Management.
Please follow this link for more information and don't forget that you are encouraged to reasonable re-open tasks to revive them. ๐Ÿš‘

Best wishes,
The MITK devs

floca removed a project: Auto-closed.
kislinsk added a project: Auto-closed.

Hi there! ๐Ÿ™‚

This task was auto-closed according to our Task Lifecycle Management.
Please follow this link for more information and don't forget that you are encouraged to reasonable re-open tasks to revive them. ๐Ÿš‘

Best wishes,
The MITK devs