org.kite9.diagram.builders
Class Relationship

java.lang.Object
  extended by org.kite9.diagram.builders.Relationship
All Implemented Interfaces:
AliasEnabled
Direct Known Subclasses:
HasRelationship, MethodCallRelationship

public class Relationship
extends Object
implements AliasEnabled

Models the relationship between a subject and an object. e.g. has, uses, etc. i.e. a verb.

Author:
moffatr

Nested Class Summary
static class Relationship.RelationshipType
           
 
Field Summary
protected  Relationship activeRelationship
           
static Relationship CALLED_BY
           
static Relationship CALLS
           
static Relationship EXTENDED_BY
           
static Relationship EXTENDS
           
static Relationship IMPLEMENTED_BY
           
static Relationship IMPLEMENTS
           
static Relationship REFERENCED_BY
           
static Relationship REFERENCES
           
static Relationship REQUIRED_BY
           
static Relationship REQUIRES
           
static Relationship RETURNED_BY
           
static Relationship RETURNS
           
 
Constructor Summary
Relationship(String name)
          Creates the active voice relationship
Relationship(String name, Direction d)
          Creates a relationship where there is a natural diagrammatic direction required for from and to.
Relationship(String name, Relationship active)
          Creates a passive voice relationship.
 
Method Summary
 Relationship getActiveRelationship()
           
 Direction getDirection()
           
 String getName()
           
 Object getObjectForAlias()
           
 Relationship.RelationshipType getType()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RETURNS

public static final Relationship RETURNS

EXTENDS

public static final Relationship EXTENDS

IMPLEMENTS

public static final Relationship IMPLEMENTS

CALLS

public static final Relationship CALLS

REFERENCES

public static final Relationship REFERENCES

REQUIRES

public static final Relationship REQUIRES

RETURNED_BY

public static final Relationship RETURNED_BY

EXTENDED_BY

public static final Relationship EXTENDED_BY

IMPLEMENTED_BY

public static final Relationship IMPLEMENTED_BY

CALLED_BY

public static final Relationship CALLED_BY

REFERENCED_BY

public static final Relationship REFERENCED_BY

REQUIRED_BY

public static final Relationship REQUIRED_BY

activeRelationship

protected Relationship activeRelationship
Constructor Detail

Relationship

public Relationship(String name)
Creates the active voice relationship


Relationship

public Relationship(String name,
                    Relationship active)
Creates a passive voice relationship. Note that when a builder comes to render the relationship on the diagram, it will be converted to the active voice.


Relationship

public Relationship(String name,
                    Direction d)
Creates a relationship where there is a natural diagrammatic direction required for from and to. e.g. inheritance relationships usually go downwards

Method Detail

getName

public String getName()

getObjectForAlias

public Object getObjectForAlias()
Specified by:
getObjectForAlias in interface AliasEnabled

getActiveRelationship

public Relationship getActiveRelationship()

getType

public Relationship.RelationshipType getType()

getDirection

public Direction getDirection()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.