In the new MMCI 1.2 proposal, NodeManager (and thus RelationManager)
will extend Node.
This means that Nodemanagers and RelationManagers can be accessed (and
maintained) as nodes.
NodeManagers are represnted byu ndoes in TypeDef, RelationManagers by
nodes in either TypeRel or RelDef.
The problem in implementation is the method createRelation().
This method occurs in Node and RelationManager, but the functionality is
quite different.
In Node:
Adds a relation between this node and a specified node to the cloud.
@param destinationNode the node to which you want to relate this node
@param relationManager the relation manager you want to use
@return the added relation
@throws BridgeException if the relation manager is not the right one
for this type of relation
public Relation createRelation(Node destinationNode,
RelationManager relationManager);
In RelationManager:
Adds a relation from this type.
@param sourceNode the node from which you want to relate
@param destinationNode the node to which you want to relate
@return the added relation
public Relation createRelation(Node sourceNode, Node destinationNode);
This system causes problems when compiling the RMMCI, which cannot
differentiate between these methods.
My current implementation recasts teh craeteRealtion() method of Node to
accept two Node parameters:
public Relation createRelation(Node destinationNode,
Node relationManagerNode);
The second node should be castable to a RelationManager.
This solves the compile errors, but it keeps one problem:
RelationManager now overrides the createRelation() of Node, but in doing
so changes the workings of the method.
I.o.w. if you call createRelation() on a TypeRel or RelDef node, it will
call the RelationManager's method, whuich may not be what was intended.
Now, since in both cases two Nodes and one (creating) RelationManagers
are needed, it seems to me to be the best choice to make the Node call
deprecated or to remove it.
Ofcourse this flies in the face of the MMCI's claim that it would stay
backwards compatible, so iw oudl like feedback on this.
Note: this will have to be changes _somehow_.
For the moment, I will check in the changes I made in CVS, so the
project members can test and work on the 'NodeManager extends Node'
functionality (if the code proves to be unsatisfying we can roll it back).
In the mean time, I like your opinion on making createRelation() in Node
depercated or to remove it at all.
This is not a vote yet (I like to discuss and have the code tested FIRST).
--
Pierre van Rooden
Mediapark, C 107 tel. +31 (0)35 6772815
"So long, and thanks for all the fish"