Bridges-Java-2.3.2  2.3.2
Bridges(JavaAPI)
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
bridges.connect.Bridges< K, E > Class Template Reference

Public Member Functions

 Bridges ()
 
 Bridges (int assignment, String appl_id, String username)
 
void setTitle (String title)
 
void setDescription (String descr)
 
ADTVisualizer< K, E > getVisualizer ()
 
void setVisualizer (ADTVisualizer< K, E > visualizer)
 
void setDataStructure (Element< E >[] el_array, int size)
 
void setDataStructure (Array< E > arr)
 
void setDataStructure (SLelement< E > head)
 
void setDataStructure (DLelement< E > head)
 
void setDataStructure (CircSLelement< E > head)
 
void setDataStructure (CircDLelement< E > head)
 
void setDataStructure (TreeElement< E > tree_root)
 
void setDataStructure (BinTreeElement< E > tree_root)
 
void setDataStructure (BSTElement< K, E > tree_root)
 
void setDataStructure (AVLTreeElement< K, E > tree_root)
 
void setDataStructure (GraphAdjList< K, E > graph)
 
void setDataStructure (GraphAdjMatrix< K, E > graph)
 
void visualize ()
 
Element< E > getRoot ()
 
void setRoot (Element< E > root)
 

Static Public Member Functions

static List< TweetgetAssociations (TwitterAccount name, int maxElements)
 
static List< EarthquakeUSGSgetAssociations (USGSaccount name, int maxElements)
 
static List< EarthquakeUSGSgetEarthquakeUSGSData (USGSaccount name, int maxElements) throws Exception
 
static List< ActorMovieIMDBgetActorMovieIMDBData (String name, int maxElements) throws Exception
 
static List< GutenbergBookgetGutenbergBookMetaData () throws Exception
 
static List< GamegetGameData () throws Exception
 
static List< ShakespearegetShakespeareData () throws Exception
 
static String getAssignment ()
 
static void setAssignment (int assignment)
 
static String getUserName ()
 
static void setUserName (String userName)
 
static String getKey ()
 
static void setKey (String key)
 

Protected Member Functions

void visualizeLinkedList ()
 
void visualizeDoublyLinkedList ()
 
void visualizeArrayObj ()
 
void visualizeArray ()
 
void visualizeTree ()
 
void visualizeBinarySearchTree ()
 
void visualizeGraphAdjacencyList ()
 
void visualizeGraphAdjacencyMatrix ()
 

Protected Attributes

ADTVisualizer< K, E > visualizer
 

Constructor & Destructor Documentation

Constructors

Exceptions
Exception
bridges.connect.Bridges< K, E >.Bridges ( int  assignment,
String  appl_id,
String  username 
)
Parameters
assignmentthis is an integer value;
key
username
Exceptions
Exception

Member Function Documentation

static List<ActorMovieIMDB> bridges.connect.Bridges< K, E >.getActorMovieIMDBData ( String  name,
int  maxElements 
) throws Exception
static
static String bridges.connect.Bridges< K, E >.getAssignment ( )
static
static List<Tweet> bridges.connect.Bridges< K, E >.getAssociations ( TwitterAccount  name,
int  maxElements 
)
static
static List<EarthquakeUSGS> bridges.connect.Bridges< K, E >.getAssociations ( USGSaccount  name,
int  maxElements 
)
static
static List<EarthquakeUSGS> bridges.connect.Bridges< K, E >.getEarthquakeUSGSData ( USGSaccount  name,
int  maxElements 
) throws Exception
static
static List<Game> bridges.connect.Bridges< K, E >.getGameData ( ) throws Exception
static
static List<GutenbergBook> bridges.connect.Bridges< K, E >.getGutenbergBookMetaData ( ) throws Exception
static
static String bridges.connect.Bridges< K, E >.getKey ( )
static
Element<E> bridges.connect.Bridges< K, E >.getRoot ( )
Returns
the root
static List<Shakespeare> bridges.connect.Bridges< K, E >.getShakespeareData ( ) throws Exception
static
static String bridges.connect.Bridges< K, E >.getUserName ( )
static
ADTVisualizer<K, E> bridges.connect.Bridges< K, E >.getVisualizer ( )

This method returns the current visualizer

Returns
visualizer
static void bridges.connect.Bridges< K, E >.setAssignment ( int  assignment)
static

set the assignment id

Parameters
assignmentnumber (int)
void bridges.connect.Bridges< K, E >.setDataStructure ( Element< E >[]  el_array,
int  size 
)

This method sets the array data type and infers the data structure from the handle that is passed in, which may be one of SinglyLinkedList, DoublyLinkedList,Tree, BinaryTree, BinarySearchTree, AVLTree, GraphAdjacencyList, GraphAdjacencyMatrix

Parameters
eThe array of elements, Element<E>[]
sizeThe size of the array
void bridges.connect.Bridges< K, E >.setDataStructure ( Array< E >  arr)

This method sets the array data type(1D, 2D and 3D arrays supported)

Parameters
ArrayThe array of elements, of type Element<E>[]
void bridges.connect.Bridges< K, E >.setDataStructure ( SLelement< E >  head)

This method sets the first element of the singly linked list

Parameters
head- is a SLelement<E>
void bridges.connect.Bridges< K, E >.setDataStructure ( DLelement< E >  head)

This method sets the first element of the doubly linked list

Parameters
head- is a DLelement<E>
void bridges.connect.Bridges< K, E >.setDataStructure ( CircSLelement< E >  head)

This method sets the first element of the singly linked circular list

Parameters
head- start node of the circular singly linked list
void bridges.connect.Bridges< K, E >.setDataStructure ( CircDLelement< E >  head)

This method sets the first element of the doubly linked circular list

Parameters
head- is a CircDLelement<E>
void bridges.connect.Bridges< K, E >.setDataStructure ( TreeElement< E >  tree_root)

This method sets the root of a general tree (can have any number of children at each node

Parameters
tree_rootThe root of the tree
void bridges.connect.Bridges< K, E >.setDataStructure ( BinTreeElement< E >  tree_root)

This method sets the first element of the binary tree data structure.

Parameters
tree_rootThe root of the binary tree
void bridges.connect.Bridges< K, E >.setDataStructure ( BSTElement< K, E >  tree_root)

This method sets the first element of the binary search tree data structure.

Parameters
tree_root- The root of the binary search tree
void bridges.connect.Bridges< K, E >.setDataStructure ( AVLTreeElement< K, E >  tree_root)

This method sets the first element of an AVL tree data structure.

Parameters
tree_rootThe root of the AVL tree
void bridges.connect.Bridges< K, E >.setDataStructure ( GraphAdjList< K, E >  graph)

This method passes the handle to the input graph (represented using adjacency lists)

Parameters
inputgraph
void bridges.connect.Bridges< K, E >.setDataStructure ( GraphAdjMatrix< K, E >  graph)

This method passes the handle to the input graph (represented using adjacency matrix)

Parameters
inputgraph
void bridges.connect.Bridges< K, E >.setDescription ( String  descr)
Parameters
descrdescription to annotate the visualization;
static void bridges.connect.Bridges< K, E >.setKey ( String  key)
static
void bridges.connect.Bridges< K, E >.setRoot ( Element< E >  root)
Parameters
rootthe root to set
void bridges.connect.Bridges< K, E >.setTitle ( String  title)
Parameters
titletitle used in the visualization;
static void bridges.connect.Bridges< K, E >.setUserName ( String  userName)
static
void bridges.connect.Bridges< K, E >.setVisualizer ( ADTVisualizer< K, E >  visualizer)

This method sets the new DataFormatter visualizer

Parameters
visualizer
void bridges.connect.Bridges< K, E >.visualize ( )

This method calls the updateGraph() or updateSL() methods depending upon the type of ADT being created. These methods send the JSON to post() which ultimately executes the http request from the server

Exceptions
InvocationTargetException
IllegalAccessException
NoSuchMethodException
void bridges.connect.Bridges< K, E >.visualizeArray ( )
protected

Visualize an array

void bridges.connect.Bridges< K, E >.visualizeArrayObj ( )
protected

Visualize an array

void bridges.connect.Bridges< K, E >.visualizeBinarySearchTree ( )
protected

Visualize a binary searchtree

void bridges.connect.Bridges< K, E >.visualizeDoublyLinkedList ( )
protected

Visualization a doubly linked list.

void bridges.connect.Bridges< K, E >.visualizeGraphAdjacencyList ( )
protected

Update visualization metadata of Graph with Adjacency List. This may be called many times. This is usually an expensive operation and involves connecting to the network. Calling this method is optional provided you call complete()

void bridges.connect.Bridges< K, E >.visualizeGraphAdjacencyMatrix ( )
protected
void bridges.connect.Bridges< K, E >.visualizeLinkedList ( )
protected

visualize a singly linked list.

void bridges.connect.Bridges< K, E >.visualizeTree ( )
protected

Visualize a binary tree

Member Data Documentation

ADTVisualizer<K, E> bridges.connect.Bridges< K, E >.visualizer
protected

The documentation for this class was generated from the following file: