|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sunlightlabs.entities.JSONEntity
com.sunlightlabs.entities.District
public class District
represents a Legislative (?or Congressional) district com.sunlightlabs.entities.District steve Jul 22, 2009
Field Summary | |
---|---|
static District[] |
EMPTY_ARRAY
|
static java.lang.String[] |
KNOWN_PROPERTIES
|
static java.lang.String |
name
|
static java.lang.Class<District> |
THIS_CLASS
|
Constructor Summary | |
---|---|
District(JSONObject data)
constructor |
|
District(java.util.Map data)
constructor |
Method Summary | |
---|---|
static District[] |
allDistricts(com.sunlightlabs.api.ApiCall call)
|
static District |
getDistrictFromLatLon(com.sunlightlabs.api.ApiCall call,
java.lang.String lat,
java.lang.String lon)
read a district from a lat lon |
static District[] |
getDistrictsForZipCode(com.sunlightlabs.api.ApiCall call,
java.lang.String zipcode)
get all districts in a zip code ( usually one) |
java.lang.String |
getEntityName()
JSON Tag for this |
java.lang.String[] |
getKnownProperties()
unofficial list of properties |
java.lang.String |
getName()
|
static java.lang.String |
getPluralEntityName()
|
static java.lang.String[] |
getZipsFromDistricts(com.sunlightlabs.api.ApiCall call,
java.lang.String state,
java.lang.String district)
return all zip codes in the district |
Methods inherited from class com.sunlightlabs.entities.JSONEntity |
---|
equivalent, getAllKeys, getArrayItems, getArrayStringItems, getContainedJSONObject, getJSONObject, getJSONObjects, getJSONStrings, getNameValuePairs, getProperties, getProperty, show, show, showProperties, showProperties |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.Class<District> THIS_CLASS
public static District[] EMPTY_ARRAY
public static final java.lang.String[] KNOWN_PROPERTIES
public static final java.lang.String name
Constructor Detail |
---|
public District(JSONObject data)
data
- non-nulljson object with propertiespublic District(java.util.Map data)
data
- non-null map with propertiesMethod Detail |
---|
public static java.lang.String getPluralEntityName()
public static District[] allDistricts(com.sunlightlabs.api.ApiCall call)
call
- call non-null api caller
public static District[] getDistrictsForZipCode(com.sunlightlabs.api.ApiCall call, java.lang.String zipcode)
call
- call non-null api callerzipcode
- non-null zip code
public static java.lang.String[] getZipsFromDistricts(com.sunlightlabs.api.ApiCall call, java.lang.String state, java.lang.String district)
call
- call non-null api callerstate
- non-null existing statedistrict
- non-null existing district number
public static District getDistrictFromLatLon(com.sunlightlabs.api.ApiCall call, java.lang.String lat, java.lang.String lon)
call
- non-null api callerlat
- district latitude as a decimal string i.e "47.67898"lon
- district longitude as a decimal string i.e "-121.67453"
public java.lang.String getEntityName()
getEntityName
in class JSONEntity
public java.lang.String[] getKnownProperties()
getKnownProperties
in class JSONEntity
public java.lang.String getName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |