org.codeforamerica.open311.facade.data
Class Endpoint
java.lang.Object
org.codeforamerica.open311.facade.data.Endpoint
- All Implemented Interfaces:
- Serializable
public class Endpoint
- extends Object
- implements Serializable
Wraps the information relative to a single endpoint.
- Author:
- Santiago MunĂn
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Endpoint
public Endpoint(String specificationUrl,
String url,
Date changeset,
EndpointType type,
List<Format> formats)
getSpecificationUrl
public String getSpecificationUrl()
getUrl
public String getUrl()
getChangeset
public Date getChangeset()
getType
public EndpointType getType()
getBestFormat
public Format getBestFormat()
- Returns the more suitable format. Tries JSON before XML.
- Returns:
- A format allowed by the endpoint.
isCompatibleWithFormat
public boolean isCompatibleWithFormat(Format format)
- Returns whether it allows the given format or not.
- Parameters:
format
- Desired format.
- Returns:
true
if it allows the given format, else
false
.
Copyright © 2013 Code for America. All Rights Reserved.