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

nl.pvanassen.ns.model.reisadvies.ReisDeel Maven / Gradle / Ivy

There is a newer version: 1.1.1
Show newest version
package nl.pvanassen.ns.model.reisadvies;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

import java.io.Serializable;
import java.util.Collections;
import java.util.List;

/**
 * See documentatie reisadviezen for the exact
 * meaning of all fields
 * 
 * @author Paul van Assen
 * 
 */
public class ReisDeel implements Serializable {
    private final String reisSoort;
    private final String vervoerder;
    private final String vervoerType;
    private final int ritNummer;
    private final String status;
    private final List reisStops;
    private final String ongeplandeStoringId;
    private final String geplandeStoringId;
    private final List reisDetails;

    ReisDeel(String reisSoort, String vervoerder, String vervoerType, int ritNummer, String status,
            List reisStops, String ongeplandeStoringId, String geplandeStoringId, List reisDetails) {
        super();
        this.reisSoort = reisSoort;
        this.vervoerder = vervoerder;
        this.vervoerType = vervoerType;
        this.ritNummer = ritNummer;
        this.status = status;
        this.reisStops = Collections.unmodifiableList(reisStops);
        this.ongeplandeStoringId = ongeplandeStoringId;
        this.geplandeStoringId = geplandeStoringId;
        this.reisDetails = Collections.unmodifiableList(reisDetails);
    }

    /**
     * @return Type of travel. Usually 'TRAIN' but this can contain other values
     */
    public String getReisSoort() {
        return reisSoort;
    }

    /**
     * @return Transportation company. This can be NS but other companies are also possible
     */
    public String getVervoerder() {
        return vervoerder;
    }

    /**
     * @return Type of transportation. The values include but are not limited to Intercity and Sprinter
     */
    public String getVervoerType() {
        return vervoerType;
    }

    /**
     * @return Number that uniquely identifies this ride.
     */
    public int getRitNummer() {
        return ritNummer;
    }

    /**
     * The status of a ride can consit of the following values:
     * 
    *
  • VOLGENS-PLAN: As planned
  • *
  • GEANNULEERD: Canceled
  • *
  • GEWIJZIGD: Small change in the schedule made on the day itself
  • *
  • OVERSTAP-NIET-MOGELIJK: No transfer possibke
  • *
  • VERTRAAGD: Delayed
  • *
  • NIEUW: Extra train
  • *
* * @return Status of this ride. */ public String getStatus() { return status; } /** * @return List of stops */ public List getReisStops() { return reisStops; } /** * @return Unplanned disruption ids or null if none */ public String getOngeplandeStoringId() { return ongeplandeStoringId; } /** * @return Planned disruption ids or null if none */ public String getGeplandeStoringId() { return geplandeStoringId; } /** * @return Any extra details about this trip. Mostly applies to foreign trains or rides which require special * tickets */ public List getReisDetails() { return reisDetails; } /** * @see java.lang.Object#hashCode() */ @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } /** * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object obj) { return EqualsBuilder.reflectionEquals(this, obj); } /** * @see java.lang.Object#toString() */ @Override public String toString() { return ToStringBuilder.reflectionToString(this); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy