org.codeforamerica.open311.facade.data
Class ServiceDiscoveryInfo

java.lang.Object
  extended by org.codeforamerica.open311.facade.data.ServiceDiscoveryInfo
All Implemented Interfaces:
Serializable

public class ServiceDiscoveryInfo
extends Object
implements Serializable

Contains information regarding to a city (endpoints, allowed formats...).

Author:
Santiago MunĂ­n
See Also:
Serialized Form

Constructor Summary
ServiceDiscoveryInfo(Date changeset, String contact, String keyService, List<Endpoint> endpoints)
           
 
Method Summary
 Date getChangeset()
           
 String getContact()
           
 List<Endpoint> getEndpoints()
           
 String getKeyService()
           
 Endpoint getMoreSuitableEndpoint(EndpointType endpointType)
          Searches through the list of endpoints and tries to find a valid endpoint of the given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceDiscoveryInfo

public ServiceDiscoveryInfo(Date changeset,
                            String contact,
                            String keyService,
                            List<Endpoint> endpoints)
Method Detail

getChangeset

public Date getChangeset()

getContact

public String getContact()

getKeyService

public String getKeyService()

getEndpoints

public List<Endpoint> getEndpoints()

getMoreSuitableEndpoint

public Endpoint getMoreSuitableEndpoint(EndpointType endpointType)
Searches through the list of endpoints and tries to find a valid endpoint of the given type. Tries to get the GeoReport latest version (currently v2).

Parameters:
endpointType - Type of the desired endpoint.
Returns:
null if a suitable endpoint couldn't be found.


Copyright © 2013 Code for America. All Rights Reserved.