
nl.pvanassen.ns.model.storingen.Storing Maven / Gradle / Ivy
package nl.pvanassen.ns.model.storingen;
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.Date;
/**
* For the exact meaning of all fields, see documentatie storingen en
* werkzaamheden
*
* @author Paul van Assen
*
*/
public class Storing implements Serializable {
private static final long serialVersionUID = 1L;
private final String id;
private final String traject;
private final String periode;
private final String reden;
private final String advies;
private final String bericht;
private final Date datum;
/**
* @param id ID generated by the NS
* @param traject Traject, textual explanation of a piece of track between two stations
* @param periode In case of planned maintenance, this contains a textual explanation of the period the maintenance
* is planned
* @param reden Reason for the disruption
* @param advies Alternative route advice
* @param bericht Unknown?
* @param datum Date and time of the disruption
*/
Storing(String id, String traject, String periode, String reden, String advies, String bericht, Date datum) {
super();
this.id = id;
this.traject = traject;
this.periode = periode;
this.reden = reden;
this.advies = advies;
this.bericht = bericht;
this.datum = datum;
}
/**
* @return ID generated by the NS
*/
public String getId() {
return id;
}
/**
* @return Traject, textual explanation of a piece of track between two stations
*/
public String getTraject() {
return traject;
}
/**
* @return In case of planned maintenance, this contains a textual explanation of the period the maintenance is
* planned
*/
public String getPeriode() {
return periode;
}
/**
* @return Reason for the disruption
*/
public String getReden() {
return reden;
}
/**
* @return Textual alternative route advice
*/
public String getAdvies() {
return advies;
}
/**
* @return Unknown and empty
*/
public String getBericht() {
return bericht;
}
/**
* @return Date and time of the disruption
*/
public Date getDatum() {
if (datum == null) {
return null;
}
return new Date(datum.getTime());
}
/**
* @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