nz.ac.waikato.mcennis.rat.graph.path
Interface PathSet

All Superinterfaces:
Model
All Known Implementing Classes:
BasicPathSet

public interface PathSet
extends Model

Class for grouping sets of path into a single unit with a single id.


Field Summary
static int ADD_PATH
           
static int SET_TYPE
           
 
Method Summary
 void addPath(Path p)
          Add a new path to this PathSet
 double getGeodesicLength(java.lang.String source, java.lang.String destination)
          Return the smallest cost path between the source and destination.
 Path[] getPath()
          Return all paths in this object.
 Path[] getPath(java.lang.String source, java.lang.String destination)
          Return all paths that start with actor source and end with actor destination.
 Path[] getPathByDestination(java.lang.String destination)
          Return all paths that end with an actor with this ID or null if none exist FIXME: should be by actor - not ID - as actors can have the same id if they differ in type.
 Path[] getPathBySource(java.lang.String source)
          Return all paths that start with an actor with this ID or null if none exist.
 java.lang.String getType()
          Returns the ID of this PathSet
 void setType(java.lang.String name)
          Set the PathSet's ID
 int size()
          Return total number of paths in this dataset
 
Methods inherited from interface nz.ac.waikato.mcennis.rat.graph.model.Model
addListener
 

Field Detail

ADD_PATH

static final int ADD_PATH
See Also:
Constant Field Values

SET_TYPE

static final int SET_TYPE
See Also:
Constant Field Values
Method Detail

getPath

Path[] getPath()
Return all paths in this object. Returns null if this path set contains no paths.

Returns:
array of all paths in this object

getPathBySource

Path[] getPathBySource(java.lang.String source)
Return all paths that start with an actor with this ID or null if none exist. FIXME: should be by actor - not ID - as actors can have the same id if they differ in type.

Parameters:
source - string ID of actor used to select paths
Returns:
all paths starting with actor given by ID source

getPathByDestination

Path[] getPathByDestination(java.lang.String destination)
Return all paths that end with an actor with this ID or null if none exist FIXME: should be by actor - not ID - as actors can have the same id if they differ in type.

Parameters:
destination - string ID of actor used to select paths
Returns:
paths that end with an actor with the given ID.

getPath

Path[] getPath(java.lang.String source,
               java.lang.String destination)
Return all paths that start with actor source and end with actor destination. FIXME: should be by actor - not ID - as actors can have the same id if they differ in type.

Parameters:
source - string ID of actor used to select paths
destination - string ID of actor used to select paths
Returns:
paths that start with actor source and end with actor destination

addPath

void addPath(Path p)
             throws NotConstructedError
Add a new path to this PathSet

Parameters:
p - path to be added
Throws:
NotConstructedError

getGeodesicLength

double getGeodesicLength(java.lang.String source,
                         java.lang.String destination)
Return the smallest cost path between the source and destination.

Parameters:
source - string ID that of actor used to select paths
destination - string ID that of actor used to select paths
Returns:
smallest cost of any path in the PathSet between the source and destination

setType

void setType(java.lang.String name)
Set the PathSet's ID

Parameters:
name - new ID of this PathSet

getType

java.lang.String getType()
Returns the ID of this PathSet

Returns:
PathSet ID

size

int size()
Return total number of paths in this dataset

Returns:
size of the PathSet