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<EtdConfigurationLaneDPS> llanesDPS = new ArrayList<EtdConfigurationLaneDPS>();
|
|
|
@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<EtdConfigurationLaneDPS> getLaneEtd(String dps, int laneDps)
|
{
|
List<EtdConfigurationLaneDPS> result = new ArrayList<EtdConfigurationLaneDPS>();
|
|
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());
|
}
|
|
}
|