venice
Interface VRelationship

All Superinterfaces:
VModelElement
All Known Subinterfaces:
VDependency, VGeneralization, VRealization
All Known Implementing Classes:
ZRelationship

public interface VRelationship
extends VModelElement

VRelationship is an visual model element representing an relationship between other two model elements in the architecture.

Note that altought it is syntactically possible, you should NOT use another relationships as source or target of a relationship

Author:
Hannu Laurila

Method Summary
 void addVRelationshipAsSubrelationship(VRelationship inRel)
          Add the given VRelationship as a subrelationship for this VRelationship.
 VModelElement getDestination()
          Returns the destination of the relationship
 boolean getIsRepresentedBySomeoneElse()
          Tells whether this relationship is represented by some other relationship or not.
 VModelElement getSource()
          Returns the source of the relationship
 java.util.LinkedList getSubrelationships()
          Returns the list of subrelationships if this VRelationship is a composite relationship.
 boolean isCompositeRelationship()
          Tells whether this VRelationship is a composite relationship representing one or more other relationships.
 boolean leavesVPackage(VPackage inPackage)
          Tells whether this relationship leaves the given VPackage.
 void removeSubrelationship(VRelationship inRelationshipToRemove)
          Removes the given relationship from this relationship's list of subrelationships.
 void setDestination(VModelElement inElement)
          Sets the destination end of the relationship Arrow end is targeted towards the destination
 void setIsRepresentedBySomeoneElse(boolean inValue)
          Sets whether this relationship is represented by some other relationship or not.
 void setLabelVisible(boolean inLabelVisible)
          Set whether relationships draw their labels or not.
 void setSource(VModelElement inElement)
          sets the source end of the relationship
 
Methods inherited from interface venice.VModelElement
addRelationship, addToCompositeRelationshipList, debugDump, getCompositeRelationships, getId, getName, getRelationshipConnectPoint, getRelationships, getType, getVisible, getVParent, intersectWithLine, setName, setType, setVisible
 

Method Detail

getDestination

public VModelElement getDestination()
Returns the destination of the relationship

getSource

public VModelElement getSource()
Returns the source of the relationship

setDestination

public void setDestination(VModelElement inElement)
Sets the destination end of the relationship Arrow end is targeted towards the destination

setSource

public void setSource(VModelElement inElement)
sets the source end of the relationship

leavesVPackage

public boolean leavesVPackage(VPackage inPackage)
Tells whether this relationship leaves the given VPackage. If inPackage is null, this function returns true.
Parameters:
inPackage - the package to check for leaving, can be null
Returns:
whether this relationship leaves given package

isCompositeRelationship

public boolean isCompositeRelationship()
Tells whether this VRelationship is a composite relationship representing one or more other relationships. Composite relationships are used when nodes move their dependencies to their parent packages to minimize screen clutter.
Returns:
whether this is a composite relationship

getSubrelationships

public java.util.LinkedList getSubrelationships()
Returns the list of subrelationships if this VRelationship is a composite relationship. If this relationship is not a composite relationship, null is returned.
Returns:
the list of subrelationships for this VRelationship

addVRelationshipAsSubrelationship

public void addVRelationshipAsSubrelationship(VRelationship inRel)
Add the given VRelationship as a subrelationship for this VRelationship. This function does not check if the given relationships is already in the list. If it is, then that relationship will be twice in the list which is not wanted behaviour. The given relationships is removed from visualization.
Parameters:
inRel - the relationship to add as subrelationship

setIsRepresentedBySomeoneElse

public void setIsRepresentedBySomeoneElse(boolean inValue)
Sets whether this relationship is represented by some other relationship or not.
Parameters:
inValue - whether this relationship is represented by some other relationship or not

getIsRepresentedBySomeoneElse

public boolean getIsRepresentedBySomeoneElse()
Tells whether this relationship is represented by some other relationship or not.
Returns:
whether this relationship is represented by some other relationship or not

removeSubrelationship

public void removeSubrelationship(VRelationship inRelationshipToRemove)
Removes the given relationship from this relationship's list of subrelationships. If the relationships does not exist in this relationships subrelationship list, nothing happens.
Parameters:
inRelationshipToRemove - the relationship to remove from subrelationships

setLabelVisible

public void setLabelVisible(boolean inLabelVisible)
Set whether relationships draw their labels or not. Initial mode is to have the label invisible.
Parameters:
inLabelVisible - whether to draw label or not