|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectListNodeC
@ThreadRestricted(value="single writer, readers touch") public class ListNodeC
A committable node in a compiled voter list.
| Nested Class Summary | |
|---|---|
static interface |
ListNodeC.Runner
A routine that runs in the context of a list node. |
static class |
ListNodeC.Table
The relational store of voters, that (in part) backs a compiled voter list. |
| Constructor Summary | |
|---|---|
ListNodeC(ListNodeC.Table table,
String voterEmail)
Creates a ListNodeC, with all variable items at default values. |
|
ListNodeC(ListNodeC.Table table,
String voterEmail,
String bar,
int doubterCount,
String neighbourhoodPath,
String residence,
int[] trustEdgeCountArray)
Constructs a ListNodeC. |
|
| Method Summary | |
|---|---|
void |
attachTrustEdge(int trustLevel0)
Attaches a trust edge to this node. |
void |
commit()
Writes this node to the table, if it has uncommitted changes. |
(package private) static String |
defaultRootNeighbourhoodBar(String voterEmail)
Returns an un-localized bar, complaining that the voter's residential address cannot be parsed to a local neighbourhood. |
void |
detachTrustEdge(int trustLevel0)
Detaches a trust edge from this node. |
int |
doubterCount()
The number of doubt signals extended to this voter, from unbarred voters. |
String |
getBar()
The list bar against the voter, if any. |
String |
getNeighbourhoodPath()
The path to the voter's leaf neighbourhood, where she resides. |
String |
getResidence()
The primary residential address of the voter. |
(package private) void |
incrementDoubterCount()
Increments the doubter count. |
String |
leafRegisterPath()
Returns the slash-delimited (/) path to the voter's leaf register, within the sub-hierarchy of electoral offices. |
int |
primaryTrustEdgeCount()
The number of primary trust extending to this node. |
void |
setBar(String newBar)
Sets a list bar against the voter. |
void |
setNeighbourhoodPath(String newNeighbourhoodPath)
|
void |
setResidence(String newResidence)
|
ListNodeC.Table |
table()
The table in which this node is stored. |
String |
toString()
Returns the voter email address. |
int |
trustLevel()
Calculates the trust level of this node. |
String |
voterEmail()
Identifies the voter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
ListNodeC(ListNodeC.Table table,
String voterEmail)
table - per table()voterEmail - per voterEmail()
public ListNodeC(ListNodeC.Table table,
String voterEmail,
String bar,
int doubterCount,
String neighbourhoodPath,
String residence,
int[] trustEdgeCountArray)
table - per table()voterEmail - per voterEmail()bar - per getBar()doubterCount - per doubterCount()neighbourhoodPath - per getNeighbourhoodPath()residence - per getResidence()trustEdgeCountArray - defining
attached trust edges()| Method Detail |
|---|
public final void attachTrustEdge(int trustLevel0)
trustLevel0 - trust level of source node,
or Integer.MAX_VALUE for infinitydetachTrustEdge(int),
trustLevel()public final void detachTrustEdge(int trustLevel0)
trustLevel0 - trust level of source nodeattachTrustEdge(int)
public final void commit()
throws SQLException
SQLExceptionstatic String defaultRootNeighbourhoodBar(String voterEmail)
public final ListNodeC.Table table()
public int doubterCount()
ListNode
doubterCount in interface ListNodeincrementDoubterCount()final void incrementDoubterCount()
doubterCount()public final String getBar()
ListNodeThe bar is intended for voters to read. It ought to include the email address of the barred voter. It ought to provide information that will be helpful in allowing the voter to overcome the bar, where possible (for instance, by correcting a registration error).
getBar in interface ListNodesetBar(String)public final void setBar(String newBar)
getBar()public final String getNeighbourhoodPath()
ListNodeIf the path is empty (root leaf), then the bar is guaranteed to be non-null, barring the voter from the list. Because the list browsing facilities cannot display voters at the root leaf, we avoid confusion by barring them from the outset.
getNeighbourhoodPath in interface ListNodesetNeighbourhoodPath(String)public final void setNeighbourhoodPath(String newNeighbourhoodPath)
getNeighbourhoodPath()public final String getResidence()
ListNode
getResidence in interface ListNodesetResidence(String)public final void setResidence(String newResidence)
getResidence()public final String leafRegisterPath()
ListNoderegister@v4ontario.ca/register@v2toronto.ca
If the trace register is the leaf register (if this is the Toronto office, for example), then a dot (.) is returned.
leafRegisterPath in interface ListNodepublic final int primaryTrustEdgeCount()
ListNode
primaryTrustEdgeCount in interface ListNodepublic final int trustLevel()
ListNode
trustLevel in interface ListNodeattachTrustEdge(int)public final String voterEmail()
ListNode
voterEmail in interface ListNodeRegistration.voterEmail()public final String toString()
toString in class Object
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||