@ThreadRestricted(value="single writer, readers touch") public final class Registration extends Object implements TraceNode
Modifier and Type | Class and Description |
---|---|
static class |
Registration.SnapshotContext
A context for taking a snapshot of a registration.
|
Constructor and Description |
---|
Registration(IDPair _registrant)
Creates a Registration with all variable items at default values.
|
Registration(XMLStreamReader r)
Constructs a Registration from its XML serialization.
|
Modifier and Type | Method and Description |
---|---|
void |
addDivision(String div)
Adds a division.
|
void |
addTruster(IDPair newTruster)
Adds a new trust source, if not already present.
|
void |
addTrusterByUsername(String u)
Adds a new trust source by username, if not already present.
|
Set<String> |
divisions()
The set of divisions of which the registrant is a member.
|
String |
getArea()
The registrant's local area of residence, or null if unspecified.
|
String |
getCountryCode()
The registrant's country of residence in ISO_3166-1 alpha-2
form, or null if unspecified.
|
String |
getGeohandle()
The normalized, geo-locatable address string for the registrant's primary
residential address.
|
String |
getOtherProperties()
Other registration properties.
|
int |
primaryTrustEdgeCount()
Throws UnsupportedOperationException.
|
IDPair |
registrant()
The registrant.
|
void |
removeTruster(IDPair oldTruster)
Removes a trust source, if found.
|
void |
setArea(String newArea) |
void |
setCountryCode(String newCountryCode) |
void |
setGeohandle(String newGeohandle) |
void |
setOtherProperties(String newOtherProperties)
Sets the other registration properties.
|
(package private) static void |
toCommonXMLAttributes(TraceNode node,
VoterInputTable.XMLColumnAppender aC)
Serializes the common attributes of a registration in XML format.
|
(package private) static void |
toCommonXMLElements(Set<String> divisions,
VoterInputTable.XMLColumnAppender aC)
Serializes the common elements of a registration in XML format.
|
String |
toString()
Returns the registrant's username.
|
void |
toXML(VoterInputTable.XMLColumnAppender aC)
Serializes this registration in XML format.
|
List<IDPair> |
trusters()
The list of trust sources for the registrant (destination).
|
int |
trustLevel()
Throws UnsupportedOperationException.
|
public Registration(IDPair _registrant)
Registration(XMLStreamReader r) throws AddressException, XMLStreamException
r
- the reader having just read the 'in' start element.AddressException
XMLStreamException
toXML(votorola.a.VoterInputTable.XMLColumnAppender)
public Set<String> divisions()
addDivision(String)
,
zelea.com/w/Property:Division@ThreadRestricted(value="constructor") public void addDivision(String div)
divisions()
@ThreadSafe static void toCommonXMLAttributes(TraceNode node, VoterInputTable.XMLColumnAppender aC) throws IOException
BadInputException
IOException
@ThreadSafe static void toCommonXMLElements(Set<String> divisions, VoterInputTable.XMLColumnAppender aC) throws IOException
BadInputException
IOException
public void toXML(VoterInputTable.XMLColumnAppender aC) throws IOException
BadInputException
IOException
public List<IDPair> trusters()
TrustEdge
public void addTruster(IDPair newTruster)
newTruster
- the trust source.trusters()
public void addTrusterByUsername(String u) throws AddressException
AddressException
addTruster(IDPair)
public void removeTruster(IDPair oldTruster)
oldTruster
- the trust source.trusters()
public final String getArea()
TraceNode
getArea
in interface TraceNode
setArea(String)
public final String getCountryCode()
TraceNode
getCountryCode
in interface TraceNode
setCountryCode(String)
public final void setCountryCode(String newCountryCode)
getCountryCode()
public final String getGeohandle()
TraceNode
getGeohandle
in interface TraceNode
setGeohandle(String)
public final void setGeohandle(String newGeohandle)
getGeohandle()
public final String getOtherProperties()
TraceNode
votrace.js
script.getOtherProperties
in interface TraceNode
setOtherProperties(String)
public final void setOtherProperties(String newOtherProperties)
getOtherProperties()
public final int primaryTrustEdgeCount()
primaryTrustEdgeCount
in interface TraceNode
public IDPair registrant()
TraceNode
registrant
in interface TraceNode
public final int trustLevel()
trustLevel
in interface TraceNode