bass.visualisation.graph
Class DTOToLists
java.lang.Object
bass.visualisation.graph.DTOToLists
public class DTOToLists
- extends java.lang.Object
This class builds lists of edges and nodes for all inputdata from the db. It converts the DTO objects into specific
node and edgelists filled in arrays
- Version:
- 0.2
- Author:
- Patrick Mai
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
allNodes
BassNodeList[] allNodes
allEdges
BassEdgeList[] allEdges
DTOToLists
public DTOToLists()
writeLists
public boolean writeLists(java.lang.String bandId,
int depth,
int minFriends,
Gui theGui)
- converts the dto's of the linked list in nodes and edges. We have chosen arrays for storing each list cause this male it easier
to use each list. i.E. We don't have to iterate through each edgeoutlist of a node to get it's friends in the layout and in the view class.
- Parameters:
bandId - the user selected targetband from the guidepth - one level or twominFriends - the minimum amount of friends a band needs to get involved into the calculation
- Returns:
- true if everything went right, false if an error has occured
getDTO
public java.util.LinkedList<DTO_BandnameWithFList> getDTO(java.lang.String bandId,
int minFriends,
int depth,
Gui theGui)
- Returns:
- The LinkedList with the targetband incl. it's friends, names, id's etc...
getNodeList
public BassNodeList[] getNodeList()
- Returns:
- the complete BassNodeListArray with all BassNodes(Bands).
getEdgeList
public BassEdgeList[] getEdgeList()
- Returns:
- the complete BassEdgeListArray with all BassEdges(edges between bands).