iut-ibk / DynaMind-ToolBox

DynaMind-ToolBox
www.dance4water.org
GNU General Public License v2.0
9 stars 6 forks source link

Viewlinks #227

Closed zacharias2k closed 11 years ago

zacharias2k commented 11 years ago

I'm currently doing a lot of conceptional thinking on view structure, data structure, implementation etc, when the question arised why do we need linked views.

In fact, a linked view has to be in the same system as the view it has been linked to.

SystemA
    ViewA
       attributeX
    ViewB
       attributeY
       ViewA

So, why not define the ViewA and ViewB to be read in a module? It seems to be a bypass of a missing optional view - feature. If so, i would rather suggest creating that, instead of this bypass.

christianurich commented 11 years ago

The views are not linked it's the attribute that points to a component from type "view"

ViewA attributeX attributeY -> Points to components in View B attributeZ -> Points to components in View B

e.g.

ViewA: Household

ViewB: Person

ViewA

I don't get what you mean with optional view feature

zacharias2k commented 11 years ago

Ok, i see, makes sense. Why does the view have it's own methods for links? -> addLink instead of getAttribute? Why not change getAttribute(name) to getAttribute(name, type) to achieve this?

christianurich commented 11 years ago

Is a workaround. addLink directly sets the attribute type to LINK. (since this is not mandatory yet) so this can be used later e.g. in the Attribute calculator to use the links. The whole link system is more a prototype that needs a clean up https://github.com/iut-ibk/DynaMind-ToolBox/issues/108

zacharias2k commented 11 years ago

Ok, since the original question is answered, let's stick to #108.