org.molwind.graph
Class DefaultEntityEdge

java.lang.Object
  extended by org.molwind.graph.DefaultEntityEdge
All Implemented Interfaces:
EntityEdge

public class DefaultEntityEdge
extends java.lang.Object
implements EntityEdge

DefaultEntityEdge represents an edge in the entity graph.

Version:
1.0
Author:
Oliver Karch

Constructor Summary
DefaultEntityEdge(DefaultEntityVertex vertex1, DefaultEntityVertex vertex2)
          DefaultEntityEdge constructor.
DefaultEntityEdge(EntityVertex vertex1, EntityVertex vertex2, int edgeWeight)
          DefaultEntityEdge constructor.
 
Method Summary
 int getEdgeWeight()
          Get the EdgeWeight value.
 Relationship getRelationship()
          Get the Relationship value.
 EntityVertex getV1()
          Get the V1 value.
 EntityVertex getV2()
          Get the V2 value.
 edu.uci.ics.jung.graph.util.Pair<EntityVertex> getVerticePair()
          Returns the vertices
 boolean isVertexIncluded(EntityVertex v)
          Checks if the vertex is part of this Edge
 void setEdgeWeight(int newEdgeWeight)
          Set the EdgeWeight value.
 void setRelationship(Relationship newRelation)
          Set the Relationship value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultEntityEdge

public DefaultEntityEdge(EntityVertex vertex1,
                         EntityVertex vertex2,
                         int edgeWeight)
DefaultEntityEdge constructor.

Parameters:
vertex1 - first Vertex
vertex2 - second Vertex
edgeWeight - edgeweight

DefaultEntityEdge

public DefaultEntityEdge(DefaultEntityVertex vertex1,
                         DefaultEntityVertex vertex2)
DefaultEntityEdge constructor.

Parameters:
vertex1 - first Vertex
vertex2 - second Vertex
Method Detail

getEdgeWeight

public int getEdgeWeight()
Get the EdgeWeight value.

Specified by:
getEdgeWeight in interface EntityEdge
Returns:
the EdgeWeight value.

getV1

public EntityVertex getV1()
Get the V1 value.

Specified by:
getV1 in interface EntityEdge
Returns:
the V1 value.

getV2

public EntityVertex getV2()
Get the V2 value.

Specified by:
getV2 in interface EntityEdge
Returns:
the V2 value.

setEdgeWeight

public void setEdgeWeight(int newEdgeWeight)
Set the EdgeWeight value.

Parameters:
newEdgeWeight - The new EdgeWeight value.

getVerticePair

public edu.uci.ics.jung.graph.util.Pair<EntityVertex> getVerticePair()
Returns the vertices

Specified by:
getVerticePair in interface EntityEdge
Returns:
Pair of Vertices

isVertexIncluded

public boolean isVertexIncluded(EntityVertex v)
Checks if the vertex is part of this Edge

Parameters:
the - vertex to checked

getRelationship

public Relationship getRelationship()
Get the Relationship value.

Specified by:
getRelationship in interface EntityEdge
Returns:
the Relationship value

setRelationship

public void setRelationship(Relationship newRelation)
Set the Relationship value.

Specified by:
setRelationship in interface EntityEdge
Parameters:
newRelation - the new Relationship value


Copyright © 2008-2010. All Rights Reserved.