bass.visualisation.graph
Class BassNode

java.lang.Object
  extended by bass.visualisation.graph.BassGraphElement
      extended by bass.visualisation.graph.BassNode
Direct Known Subclasses:
BassCluster

public class BassNode
extends BassGraphElement

A BassNode is an Object that represents a band. Also it stores the edges (bond between two BassNodes) that are connected to this Node. The Node itself has a position, a radius, connected edges, amountOfFriends for the represented band and the amount of bandfriends.

Version:
0.4
Author:
Patrick Mai

Field Summary
private  int amountOfBandFriends
           
private  int amountOfFriends
           
private  int counter
           
private  BassEdgeList edges
           
private  javax.vecmath.Point3f position
           
private  float radius
           
 
Fields inherited from class bass.visualisation.graph.BassGraphElement
id, name, owner
 
Constructor Summary
BassNode()
          empty constructor
 
Method Summary
 void addEdge(BassEdge edge)
          Adds an BassEdge to this Node
 void delete()
          delete method inherited from BassGraphElement
 int getAmountOfBandFriends()
           
 int getAmountOfEdgesOfThisNode()
           
 int getAmountOfFriends()
           
 BassEdgeList getEdgesOfThisNode()
          Get all BassEdges of this BassNode as a List
 BassEdgeList getInEdges()
           
 float getMass()
          get the radius of this node
 BassEdgeList getOutEdges()
           
 javax.vecmath.Point3f getPosition()
          get the position of the node in space
protected  void removeEdge(BassEdge edge)
          remove a reference to an BassEdge from this BassNode
 void reposition(javax.vecmath.Vector3f delta)
          adjust the node's position by delta
 void setAmount(int amountOfBandFriends)
          Set the amount of bandfriends (got from the db) to this BassNode.
 void setFriendAmount(int amountOfFriends)
          Set the amount of friends (got from the db) to this BassNode.
 void setMass(float radius)
          set the radius of this node
 void setPosition(javax.vecmath.Point3f newPosition)
          set the position of the node in space
 
Methods inherited from class bass.visualisation.graph.BassGraphElement
getID, getName, getOwner, setID, setName, setOwner
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

edges

private BassEdgeList edges

position

private javax.vecmath.Point3f position

radius

private float radius

amountOfFriends

private int amountOfFriends

amountOfBandFriends

private int amountOfBandFriends

counter

private int counter
Constructor Detail

BassNode

public BassNode()
empty constructor

Method Detail

delete

public void delete()
delete method inherited from BassGraphElement

Specified by:
delete in class BassGraphElement

setAmount

public void setAmount(int amountOfBandFriends)
Set the amount of bandfriends (got from the db) to this BassNode.

Parameters:
amountOfFriends - Amount of just the bandfriends to set to this BassNode

setFriendAmount

public void setFriendAmount(int amountOfFriends)
Set the amount of friends (got from the db) to this BassNode.

Parameters:
amountOfFriends - Amount of all friends to set to this BassNode

getAmountOfBandFriends

public int getAmountOfBandFriends()
Returns:
The amount of bandfriends of this BassNode

getAmountOfFriends

public int getAmountOfFriends()
Returns:
The amount of all friends of this BassNode

addEdge

public void addEdge(BassEdge edge)
Adds an BassEdge to this Node

Parameters:
edge - BassEdge to be added

removeEdge

protected void removeEdge(BassEdge edge)
remove a reference to an BassEdge from this BassNode


getEdgesOfThisNode

public BassEdgeList getEdgesOfThisNode()
Get all BassEdges of this BassNode as a List

Returns:
The BassEdgeList of this BassNode

getAmountOfEdgesOfThisNode

public int getAmountOfEdgesOfThisNode()
Returns:
The amount of BassEdges connected to this BassNode

getInEdges

public BassEdgeList getInEdges()
Returns:
list of edges for which this is the end node

getOutEdges

public BassEdgeList getOutEdges()
Returns:
list of edges for which this is the start node

setPosition

public void setPosition(javax.vecmath.Point3f newPosition)
set the position of the node in space

Parameters:
newPosition -

reposition

public void reposition(javax.vecmath.Vector3f delta)
adjust the node's position by delta

Parameters:
delta - the adjustment to make to the node's position

getPosition

public javax.vecmath.Point3f getPosition()
get the position of the node in space


setMass

public void setMass(float radius)
set the radius of this node


getMass

public float getMass()
get the radius of this node