All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.satori.mods.suite.gtfs.GtfsFeedMessage Maven / Gradle / Ivy

There is a newer version: 0.1.7
Show newest version
package com.satori.mods.suite.gtfs;

import java.util.*;

import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.annotation.JsonInclude.*;


/**
 * The contents of a feed message.
 * A feed is a continuous stream of feed messages. Each message in the stream is
 * obtained as a response to an appropriate HTTP GET request.
 * A realtime feed is always defined with relation to an existing GTFS feed.
 * All the entity ids are resolved with respect to the GTFS feed.
 * 

* A feed depends on some external configuration: * - The corresponding GTFS feed. * - Feed application (updates, positions or alerts). A feed should contain only * items of one specified application; all the other entities will be ignored. * - Polling frequency */ @JsonInclude(Include.NON_NULL) public class GtfsFeedMessage extends GtfsObject { /** * Metadata about this feed and feed message. */ @JsonProperty("header") public GtfsFeedHeader header; /** * Contents of the feed. */ @JsonProperty("entity") public GtfsFeedEntity[] entity; @Override public boolean equals(Object o) { if (this == o) { return true; } if ((o == null) || (getClass() != o.getClass())) { return false; } GtfsFeedMessage that = ((GtfsFeedMessage) o); if (!super.equals(o)) { return false; } if (!Objects.equals(this.header, that.header)) { return false; } if (!Arrays.equals(this.entity, that.entity)) { return false; } return true; } @Override public int hashCode() { int result = (super.hashCode()); result = ((result * 31) + (this.header != null ? this.header.hashCode() : 0)); result = ((result * 31) + Arrays.hashCode(this.entity)); return result; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy