Page MenuHomePhabricator

rename DataTreeNode
Closed, ResolvedPublic

Description

The class DataTreeNode is named after the now deprecated DataTree class. Currently, DataTreeNode is only used together with DataStorage. Renaming the class would avoid confusion for new users. If the 1.0 release should provide stable interfaces, then the renaming should be done before the release.

Event Timeline

The new name for DataTreeNode should be discussed. CC'ing MITK developers.

Sugestions:

  • DataNode
  • Node

Data is everything ;-)

another suggestion: BaseDataNode

I also considered BaseDataNode, but DataNode is obviously shorter and I don't think "Base" adds information. But another question: is it still a node?

Data is not good: BaseData is the super-class of all our data classes

BaseDataNode is not good because there are no subclasses

DataNode is nice, but Marco is right about "node"

How about "DataStorageItem" or "DataStorageEntry"? Or perhaps my favorite "mitk::DataStorage::Item"?

(In reply to comment #4)

How about "DataStorageItem" or "DataStorageEntry"? Or perhaps my favorite
"mitk::DataStorage::Item"?

mitk::DataStorage::Item::Pointer newItem = mitk::DataStorage::Item::New() ?

looks a bit like java with :: instead of . ;)

It is a composite object that links the data object (BaseData) with associated
interactor, mappers and meta data (property lists). So from a pure
functionality view, it is not a node. Rather a connector object.

But then, the DataTreeNode objects are stored both in the DataStorage and
DataTree classes. They use a graph/tree structure, so in that sense it is a
node of the dependency graph/tree.

(Also remember, that two nodes can contain the same BaseData object.)

(In reply to comment #6)

But then, the DataTreeNode objects are stored both in the DataStorage and
DataTree classes. They use a graph/tree structure, so in that sense it is a

I just opened a bug about removing DataTree (#3293).

I like the idea of a mitk::DataStorage::Item class, but can we make it an abstract interface, please?

Then we could have something like

mitk::DataSorage::Item::Pointer = mitk::DataStorageItem::New()

where mitk::DataStorageItem is an implementation of mitk::DataStorage::Item.

(In reply to comment #8)

mitk::DataSorage::Item::Pointer = mitk::DataStorageItem::New()

where mitk::DataStorageItem is an implementation of mitk::DataStorage::Item.

I wouldn't like to explain this every second day ;-)

After a short discussion Marco, Sascha, Jochen and I decided on

mitk::DataNode

I'll announce this on mitk-users.

[SVN revision 21732]
CHG (#3291): renamed DataTreeNode to DataNode (branch commit)

[SVN revision 21745]
CHG (#3291): rename DataTreeNode to DataNode

Some names still contain "TreeNode", but sometimes on purpose (e.g. VesselTree). A preliminary list is in treeNodeList.txt in the top-level dir. I will try to resolve a few more and the post the remaining ones here for discussion.

can we close this and transfer all renaming discussions to T3669

[SVN revision 23881]
CHG (#3291): renamed a few variables from dataTreeNode to dataNode