RelationStorage Class Reference

Collaboration diagram for RelationStorage:

Collaboration graph
[legend]

List of all members.


Detailed Description

Complex storage for Relation objects.

Simple (effective) lookups can be done on this storage. Implemeted as set of containers with associative access.

Definition at line 19 of file RelationStorage.java.


Public Member Functions

 RelationStorage ()
 RelationStorage (RelationStorage ref)
 Deep copy constructor.
RelationStorage clone () throws CloneNotSupportedException
 Deep clone method.
void add (Relation relation)
 Add relation to storage.
void add (Iterable< Relation > relationList)
 Add all relation to storage from given container.
IContainer< Relation > getAllFrom (URL from)
 Return container of relations, which has desired source URL.
IContainer< Relation > getAllTo (URL to)
 Return container of relations, which has desired target URL.
IContainer< Relation > getAllIncidents (URL url)
 Lookup for all relations incidenting with desired url.
IContainer< Relation > getAllOfEdgeType (String edgeType)
 Lookup for all relations of desired type.
Iterator< Relation > iterator ()
Iterable< URL > getUrls ()
 
Returns:
Returns container containing all URLs managed by storage.

Iterable< URL > getUrls (String host)
 Lookup for URLs belonging to desired host.
Iterable< String > getHosts ()
 
Returns:
Returns container containing all hosts managed by storage.

Statistics getStatistics ()
 
Returns:
Returns commons statistics for storage.


Static Public Member Functions

static RelationStorage fromRelationList (RelationList relationList)
 Create storage from list of Relation objects.
static String urlToHost (URL url)
 Convert URL address to host name.

Constructor & Destructor Documentation

RelationStorage (  ) 

Definition at line 50 of file RelationStorage.java.

Referenced by RelationStorage.clone(), and RelationStorage.fromRelationList().

Here is the caller graph for this function:

RelationStorage ( RelationStorage  ref  ) 

Deep copy constructor.

Parameters:
ref Other storage object to copy from.

Definition at line 63 of file RelationStorage.java.

References RelationStorage.all, RelationStorage.edgeTypeMap, RelationStorage.fromMap, RelationStorage.toMap, RelationStorage.urlSet, and RelationStorage.urlToHostMap.


Member Function Documentation

static RelationStorage fromRelationList ( RelationList  relationList  )  [static]

Create storage from list of Relation objects.

Parameters:
relationList List of objects to create storage from.
Returns:
Returns filled storage object.

Definition at line 35 of file RelationStorage.java.

References RelationStorage.add(), and RelationStorage.RelationStorage().

Here is the call graph for this function:

static String urlToHost ( URL  url  )  [static]

Convert URL address to host name.

Parameters:
url URL adderess to convert.
Returns:
Returns string containing host name.

Definition at line 46 of file RelationStorage.java.

RelationStorage clone (  )  throws CloneNotSupportedException

Deep clone method.

Definition at line 75 of file RelationStorage.java.

References RelationStorage.RelationStorage().

Here is the call graph for this function:

void add ( Relation  relation  ) 

Add relation to storage.

Parameters:
relation Relation object to add to storage.

Definition at line 83 of file RelationStorage.java.

References RelationSet.add().

Referenced by RelationStorage.fromRelationList(), and GraphView.handleResponse().

Here is the call graph for this function:

Here is the caller graph for this function:

void add ( Iterable< Relation >  relationList  ) 

Add all relation to storage from given container.

Parameters:
relationList Container to add relations from.

Definition at line 96 of file RelationStorage.java.

IContainer<Relation> getAllFrom ( URL  from  ) 

Return container of relations, which has desired source URL.

Parameters:
from Source URL of desired set of relations.
Returns:
Returns filled container with desired relations.

Definition at line 106 of file RelationStorage.java.

Referenced by RelationStorage.getAllIncidents().

Here is the caller graph for this function:

IContainer<Relation> getAllTo ( URL  to  ) 

Return container of relations, which has desired target URL.

Parameters:
to Target URL of desired set of relations.
Returns:
Returns filled container with desired relations.

Definition at line 115 of file RelationStorage.java.

Referenced by RelationStorage.getAllIncidents().

Here is the caller graph for this function:

IContainer<Relation> getAllIncidents ( URL  url  ) 

Lookup for all relations incidenting with desired url.

Parameters:
url Source/target URL of desired set of relations.
Returns:
Returns filled container with desired raletions.

Definition at line 124 of file RelationStorage.java.

References RelationList.add(), RelationStorage.getAllFrom(), and RelationStorage.getAllTo().

Here is the call graph for this function:

IContainer<Relation> getAllOfEdgeType ( String  edgeType  ) 

Lookup for all relations of desired type.

Parameters:
edgeType Type of desired set of relations.
Returns:
Returns filled container with desired relations.

Definition at line 136 of file RelationStorage.java.

Iterator<Relation> iterator (  ) 

Definition at line 140 of file RelationStorage.java.

References RelationSet.iterator().

Here is the call graph for this function:

Iterable<URL> getUrls (  ) 

Returns:
Returns container containing all URLs managed by storage.

Definition at line 147 of file RelationStorage.java.

Iterable<URL> getUrls ( String  host  ) 

Lookup for URLs belonging to desired host.

Parameters:
host Host name to look for URLs.
Returns:
Returns filled container with desired set of relations.

Definition at line 156 of file RelationStorage.java.

Iterable<String> getHosts (  ) 

Returns:
Returns container containing all hosts managed by storage.

Definition at line 163 of file RelationStorage.java.

Referenced by GraphView.handleResponse().

Here is the caller graph for this function:

Statistics getStatistics (  ) 

Returns:
Returns commons statistics for storage.

See also:
Statistics

Definition at line 171 of file RelationStorage.java.

References RelationSet.size(), and UrlSet.size().

Here is the call graph for this function:


The documentation for this class was generated from the following file:
Generated on Sat May 3 22:56:10 2008 for SGVis by  doxygen 1.5.4