votorola.a.register.trust
Class TrustEdge.Table

java.lang.Object
  extended by TrustEdge.Table
Enclosing class:
TrustEdge

@ThreadSafe
public static final class TrustEdge.Table
extends Object

The relational store of trust edges that (in part) backs a compiled voter list.

See Also:
ListNodeC.Table

Constructor Summary
TrustEdge.Table(ReadyDirectory readyDirectory, Database database)
          Constructs a Table.
 
Method Summary
 void create()
          Creates this table in the database.
(package private)  Database database()
          Returns the database in which this table is stored.
 void drop()
          Drops this table from the database.
 boolean exists()
          Returns true if this table exists in the database; false otherwise.
 List<TrustEdgeNode> getEdgeNodesTo(String voter1Email, ListNodeC.Table listNodeTable)
          Retrieves all edges extending to the specified destination node, together with their source nodes.
(package private)  List<TrustEdge> getEdgesFrom(String voter0Email)
          Retrieves all edges that extend from the specified source voter.
 void init_bars(Register register, ListNodeC.Table nodeTable)
          For each trust edge in the table, calculate and store its edge-bar, if any.
(package private)  void put(TrustEdge edge)
          Stores an edge in this table.
(package private)  ReadyDirectory readyDirectory()
          The file-based counterpart to this table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrustEdge.Table

public TrustEdge.Table(ReadyDirectory readyDirectory,
                       Database database)
                throws IOException
Constructs a Table.

Parameters:
readyDirectory - per readyDirectory()
database - per database()
Throws:
IOException
Method Detail

init_bars

public void init_bars(Register register,
                      ListNodeC.Table nodeTable)
               throws ScriptException,
                      SQLException
For each trust edge in the table, calculate and store its edge-bar, if any.

Parameters:
nodeTable - containing all registered voters
Throws:
ScriptException
SQLException

create

public void create()
            throws SQLException
Creates this table in the database.

Throws:
SQLException

database

Database database()
Returns the database in which this table is stored.


drop

public void drop()
          throws SQLException
Drops this table from the database.

Throws:
SQLException

exists

public boolean exists()
               throws SQLException
Returns true if this table exists in the database; false otherwise.

Throws:
SQLException

getEdgesFrom

List<TrustEdge> getEdgesFrom(String voter0Email)
                       throws SQLException
Retrieves all edges that extend from the specified source voter.

Throws:
SQLException

getEdgeNodesTo

public List<TrustEdgeNode> getEdgeNodesTo(String voter1Email,
                                          ListNodeC.Table listNodeTable)
                                   throws SQLException
Retrieves all edges extending to the specified destination node, together with their source nodes.

Throws:
SQLException

put

void put(TrustEdge edge)
   throws SQLException
Stores an edge in this table.

Throws:
SQLException

readyDirectory

ReadyDirectory readyDirectory()
The file-based counterpart to this table.