package art.servers.etdserver.configuration; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonRootName; import java.util.ArrayList; import java.util.List; @JsonRootName(value = "Configuration etd") public class ConfigurationEtd { @JsonProperty("Identifier") public String identifier = null; @JsonProperty("DPS") public String dpsIdentifier = null; @JsonProperty("Lanes") public List llanesDPS = new ArrayList(); @JsonIgnore public EtdConfigurationLaneDPS getLaneDPS(int lane) { try { for (EtdConfigurationLaneDPS laneDPS : llanesDPS) { if (laneDPS.lane == lane) return(laneDPS); } } catch (Exception e) { } return(null); } @JsonIgnore public List getLaneEtd(String dps, int laneDps) { List result = new ArrayList(); try { for (EtdConfigurationLaneDPS laneDPS : llanesDPS) { if ((laneDPS.dps.equalsIgnoreCase(dps) == true) && (laneDPS.dpsLane == laneDps)) result.add(laneDPS); } } catch (Exception e) { } return(result); } @JsonIgnore public String toString() { try { String result = ""; for (EtdConfigurationLaneDPS laneDPS : llanesDPS) { result += " Dps=" + laneDPS.dps + " - LaneDps=" + laneDPS.dpsLane + " - Lane=" + laneDPS.lane + "\r\n"; } return(result); } catch (Exception e) { } return(super.toString()); } }