TrustGrapher  r52
A playabale simulator for modelling trust between agents
cu.trustGrapher.loading.GraphConfig Class Reference
Collaboration diagram for cu.trustGrapher.loading.GraphConfig:

List of all members.

Public Member Functions

 GraphConfig (int index, boolean display, int base, int classIndex, String classPath, File propertyFile)
String toString ()
int getIndex ()
String getKey ()
int getBaseIndex ()
File getClassFile ()
String getDisplayName ()
boolean isDisplayed ()
Object getAlgorithm ()
File getProperties ()
boolean isFeedbackGraph ()
boolean isReputationGraph ()
boolean isTrustGraph ()
void setBase (int base)
final void setProperties (File propertyFile)
void setDisplay (boolean display)

Static Public Member Functions

static Object newAlgorithm (String classPath)

Static Public Attributes

static String NO_BASE = "noBase"

Protected Attributes

Object algorithm
PropertyManager properties

Package Attributes

static String NO_CONFIG = "noConfig"
static String NO_CLASS = "noClass"
int base
int classIndex

Detailed Description

Contains all of the configurations for a graph. Instances of this class are used to create the GraphViewers and graphs. GraphConfigs are generated by the AlgorithmLoader when a graph is added.

Author:
Andrew O'Hara

Definition at line 16 of file GraphConfig.java.


Constructor & Destructor Documentation

cu.trustGrapher.loading.GraphConfig.GraphConfig ( int  index,
boolean  display,
int  base,
int  classIndex,
String  classPath,
File  propertyFile 
)

Creates a new GraphConfig.

Parameters:
indexThe index for the GraphConfig automatically assigned by the AlgorithmLoader
displayWhether or not the graphPair is to be shown in the simulator
baseThe index of the graphConfig that this graph depends on
classpathThe path to the algorithm class that this graph will use. The feedbackHistory is set to NO_CLASS
propertyFileThe optional property file that contains the configurations for this algorithm

Definition at line 34 of file GraphConfig.java.

Here is the call graph for this function:


Member Function Documentation

Object cu.trustGrapher.loading.GraphConfig.getAlgorithm ( )
Returns:
The algorithm attached to this GraphConfig

Definition at line 105 of file GraphConfig.java.

Here is the caller graph for this function:

int cu.trustGrapher.loading.GraphConfig.getBaseIndex ( )
Returns:
the index of the graph that this graph depends on

Definition at line 77 of file GraphConfig.java.

File cu.trustGrapher.loading.GraphConfig.getClassFile ( )
Returns:
the classFile that this graph will use in the simulation

Definition at line 84 of file GraphConfig.java.

String cu.trustGrapher.loading.GraphConfig.getDisplayName ( )
Returns:
the diaplay name of this graph

Definition at line 91 of file GraphConfig.java.

Here is the caller graph for this function:

int cu.trustGrapher.loading.GraphConfig.getIndex ( )
Returns:
the index

Definition at line 66 of file GraphConfig.java.

Here is the caller graph for this function:

String cu.trustGrapher.loading.GraphConfig.getKey ( )

Definition at line 70 of file GraphConfig.java.

File cu.trustGrapher.loading.GraphConfig.getProperties ( )
Returns:
The optional properties file for the algorithm

Definition at line 112 of file GraphConfig.java.

boolean cu.trustGrapher.loading.GraphConfig.isDisplayed ( )
Returns:
Whether this graph will be shown in the Simulator

Definition at line 98 of file GraphConfig.java.

Here is the caller graph for this function:

boolean cu.trustGrapher.loading.GraphConfig.isFeedbackGraph ( )
Returns:
Whether or not the GraphPair represented by this is the FeedbackHistory Graph

Definition at line 119 of file GraphConfig.java.

boolean cu.trustGrapher.loading.GraphConfig.isReputationGraph ( )
Returns:
Whether or not the attached algorithm is a ReputationAlgortihm

Definition at line 126 of file GraphConfig.java.

boolean cu.trustGrapher.loading.GraphConfig.isTrustGraph ( )
Returns:
Whether or not the attached algorithm is a TrustAlgortihm

Definition at line 133 of file GraphConfig.java.

static Object cu.trustGrapher.loading.GraphConfig.newAlgorithm ( String  classPath) [static]

Takes a path and tries to load an object from it. If it is a valid algorithm, it returns it as an Object.

Parameters:
classPathThe path to the algorithm class file
Returns:
The algorithm as an Object

Definition at line 170 of file GraphConfig.java.

Here is the caller graph for this function:

void cu.trustGrapher.loading.GraphConfig.setBase ( int  base)
Parameters:
baseIndexThe new index of the graph that this graph will depend on

Definition at line 142 of file GraphConfig.java.

void cu.trustGrapher.loading.GraphConfig.setDisplay ( boolean  display)
Parameters:
displayWhether or not the graph represented by this will be displayed in the Simulator

Definition at line 160 of file GraphConfig.java.

final void cu.trustGrapher.loading.GraphConfig.setProperties ( File  propertyFile)
Parameters:
propertyFilethe configFile to set

Definition at line 149 of file GraphConfig.java.

Here is the caller graph for this function:

String cu.trustGrapher.loading.GraphConfig.toString ( )

Returns the string representation of this GraphConfig that is saved the the properties file. This String can then be used to create an equivalent GraphConfig.

Returns:
the string representation to save as a property

Definition at line 56 of file GraphConfig.java.


Member Data Documentation

Definition at line 22 of file GraphConfig.java.

Definition at line 20 of file GraphConfig.java.

Definition at line 20 of file GraphConfig.java.

String cu.trustGrapher.loading.GraphConfig.NO_BASE = "noBase" [static]

Definition at line 18 of file GraphConfig.java.

String cu.trustGrapher.loading.GraphConfig.NO_CLASS = "noClass" [package]

Definition at line 18 of file GraphConfig.java.

String cu.trustGrapher.loading.GraphConfig.NO_CONFIG = "noConfig" [package]

Definition at line 18 of file GraphConfig.java.

Definition at line 23 of file GraphConfig.java.


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