votorola.a.register.trust
Class TrustEdgeContext

java.lang.Object
  extended by TrustEdgeContext

public final class TrustEdgeContext
extends Object

A context for restricting a trust edge.


Constructor Summary
TrustEdgeContext(Register register, String residence0, String residence1, String voter0Email, String voter1Email)
          Constructs a TrustEdgeContext.
 
Method Summary
 Geocode geocode(String address)
          Deprecated. 
 Geocode geocode(String address, String ccTLD)
          Geocodes a residential address.
 Register register()
          The electoral register.
 String residence0()
          The source voter's primary residential address.
 String residence1()
          The destination voter's primary residential address.
 String voter0Email()
          The email address of the source voter.
 String voter1Email()
          The email address of the destination voter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrustEdgeContext

TrustEdgeContext(Register register,
                 String residence0,
                 String residence1,
                 String voter0Email,
                 String voter1Email)
Constructs a TrustEdgeContext.

Parameters:
residence0 - per residence0()
residence1 - per residence1()
voter0Email - per voter0Email()
voter1Email - per voter1Email()
Method Detail

geocode

@Deprecated
public Geocode geocode(String address)
                throws MisconfigurationException,
                       IOException,
                       SQLException
Deprecated. 

Use the other geocode method, instead.

Throws:
MisconfigurationException
IOException
SQLException

geocode

public Geocode geocode(String address,
                       String ccTLD)
                throws MisconfigurationException,
                       IOException,
                       SQLException
Geocodes a residential address. The address ought to be in its minimal, canonical form (such as a normalized postal code), otherwise your geocode cache table may grow very large.

Parameters:
address - the residential address to geocode, in a form that is minimal, canonical, and suitable for the configured geocoding method
ccTLD - the two-character, "top-level domain" country code of the address; or null to specify none
Returns:
geocoded address
Throws:
MisconfigurationException - if the geocode data is not cached, and no geocoding method is configured for the electoral register
IOException
SQLException
See Also:
Register.geocodingMethod()

register

public Register register()
The electoral register.


residence0

public String residence0()
The source voter's primary residential address.


residence1

public String residence1()
The destination voter's primary residential address.


voter0Email

public String voter0Email()
The email address of the source voter.


voter1Email

public String voter1Email()
The email address of the destination voter.