easik.sketch.edge
Class SketchEdge

java.lang.Object
  extended by org.jgrapht.graph.DefaultEdge
      extended by easik.sketch.edge.SketchEdge
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class SketchEdge
extends org.jgrapht.graph.DefaultEdge

This is a class to represent an arrow between two nodes. It is a directed edge and has a boolean option to be injective. Every arrow has a unique identifier which is referred to by constraints when stored in XML.

Author:
Rob Fletcher 2005
See Also:
Serialized Form

Field Summary
private  boolean _isOneToOne
          Stores whether this edge is injective
private  EntityNode _sourceObj
          The entity node that acts as this edge's source
private  EntityNode _targetObj
          The entity node that acts as this edge's target
private  java.lang.String _uniqueName
          Stores the name of this edge
 
Constructor Summary
SketchEdge(EntityNode a, EntityNode b, java.lang.String unique, boolean oneone)
          Creates a new arrow and gives it a name indicative of its source and target.
 
Method Summary
 java.lang.Object clone()
           
 boolean getInjective()
          Accessor for the injective quality
 java.lang.String getName()
          Accessor for the unique ID
 java.lang.Object getSourceObj()
          Getter method for the source of this sketch edge
 java.lang.Object getTargetObj()
          Getter method for the target of this sketch edge
 void setName(java.lang.String inName)
          Sets the name of this edge.
 java.lang.String toString()
          toString method returns the common name.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_isOneToOne

private boolean _isOneToOne
Stores whether this edge is injective


_uniqueName

private java.lang.String _uniqueName
Stores the name of this edge


_sourceObj

private EntityNode _sourceObj
The entity node that acts as this edge's source


_targetObj

private EntityNode _targetObj
The entity node that acts as this edge's target

Constructor Detail

SketchEdge

public SketchEdge(EntityNode a,
                  EntityNode b,
                  java.lang.String unique,
                  boolean oneone)
Creates a new arrow and gives it a name indicative of its source and target.

Parameters:
a - The source
b - The target
unique - The unique identifier
oneone - Is it injective
Method Detail

getSourceObj

public java.lang.Object getSourceObj()
Getter method for the source of this sketch edge

Returns:
The source of this edge, defined to be an entityNode.

getTargetObj

public java.lang.Object getTargetObj()
Getter method for the target of this sketch edge

Returns:
The target of this edge, defined to be an entityNode.

toString

public java.lang.String toString()
toString method returns the common name.

Overrides:
toString in class org.jgrapht.graph.DefaultEdge
Returns:
Name of the edge

getName

public java.lang.String getName()
Accessor for the unique ID

Returns:
The unique ID

setName

public void setName(java.lang.String inName)
Sets the name of this edge.

Parameters:
inName - The unique name of the edge.

getInjective

public boolean getInjective()
Accessor for the injective quality

Returns:
Injectiveness of the arrow

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object