|
|
@ -48,7 +48,7 @@ import de.srsoftware.web4rail.tiles.Turnout; |
|
|
|
* @author Stephan Richter, SRSoftware |
|
|
|
* @author Stephan Richter, SRSoftware |
|
|
|
* |
|
|
|
* |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public class Route extends BaseClass implements Comparable<Route>{ |
|
|
|
public class Route extends BaseClass { |
|
|
|
|
|
|
|
|
|
|
|
public enum State { |
|
|
|
public enum State { |
|
|
|
FREE, LOCKED, PREPARED, STARTED; |
|
|
|
FREE, LOCKED, PREPARED, STARTED; |
|
|
@ -106,7 +106,6 @@ public class Route extends BaseClass implements Comparable<Route>{ |
|
|
|
public void finish() { |
|
|
|
public void finish() { |
|
|
|
long timestamp2 = new Date().getTime(); |
|
|
|
long timestamp2 = new Date().getTime(); |
|
|
|
//int remainingSpeed = train.speed;
|
|
|
|
//int remainingSpeed = train.speed;
|
|
|
|
train.setSpeed(0); |
|
|
|
|
|
|
|
if (aborted) return; |
|
|
|
if (aborted) return; |
|
|
|
long runtime = timestamp2 - timestamp; |
|
|
|
long runtime = timestamp2 - timestamp; |
|
|
|
int quotient = startSpeed - ENDSPEED; |
|
|
|
int quotient = startSpeed - ENDSPEED; |
|
|
@ -144,6 +143,7 @@ public class Route extends BaseClass implements Comparable<Route>{ |
|
|
|
private HashMap<String,Integer> brakeTimes = new HashMap<String, Integer>(); |
|
|
|
private HashMap<String,Integer> brakeTimes = new HashMap<String, Integer>(); |
|
|
|
private ConditionList conditions; |
|
|
|
private ConditionList conditions; |
|
|
|
private Vector<Contact> contacts; |
|
|
|
private Vector<Contact> contacts; |
|
|
|
|
|
|
|
private Context context; // this context is passed to actions
|
|
|
|
private boolean disabled = false; |
|
|
|
private boolean disabled = false; |
|
|
|
private Block endBlock = null; |
|
|
|
private Block endBlock = null; |
|
|
|
public Direction endDirection; |
|
|
|
public Direction endDirection; |
|
|
@ -222,71 +222,6 @@ public class Route extends BaseClass implements Comparable<Route>{ |
|
|
|
conditions.add(condition); |
|
|
|
conditions.add(condition); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private Fieldset basicProperties() { |
|
|
|
|
|
|
|
Fieldset fieldset = new Fieldset(t("Route properties")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (isSet(train)) train.link("span",t("Train: {}",train)).addTo(fieldset); |
|
|
|
|
|
|
|
Tag list = new Tag("ul"); |
|
|
|
|
|
|
|
Plan.addLink(startBlock, t("Origin: {} to {}",startBlock.name,startDirection), list); |
|
|
|
|
|
|
|
Plan.addLink(endBlock, t("Destination: {} from {}",endBlock.name,endDirection.inverse()), list); |
|
|
|
|
|
|
|
list.addTo(fieldset); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!signals.isEmpty()) { |
|
|
|
|
|
|
|
new Tag("h4").content(t("Signals")).addTo(fieldset); |
|
|
|
|
|
|
|
list = new Tag("ul"); |
|
|
|
|
|
|
|
for (Signal s : signals) Plan.addLink(s,s.toString(),list); |
|
|
|
|
|
|
|
list.addTo(fieldset); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return fieldset; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Fieldset brakeTimes() { |
|
|
|
|
|
|
|
Fieldset fieldset = new Fieldset(t("Brake time table")); |
|
|
|
|
|
|
|
Table table = new Table(); |
|
|
|
|
|
|
|
table.addHead(t("Train"),t("Brake time¹, forward"),t("Brake time¹, reverse")); |
|
|
|
|
|
|
|
for (Train t : Train.list()) { |
|
|
|
|
|
|
|
Integer fTime = brakeTimes.get(t.brakeId()); |
|
|
|
|
|
|
|
Integer rTime = brakeTimes.get(t.brakeId(true)); |
|
|
|
|
|
|
|
table.addRow(t,isSet(fTime)? fTime+NBSP+"ms" : "–",isSet(rTime)? fTime+NBSP+"ms" : "–"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
table.clazz("brake-times").addTo(fieldset); |
|
|
|
|
|
|
|
new Tag("p").content(t("1) Duration between 5 {} steps during brake process.",speedUnit)).addTo(fieldset); |
|
|
|
|
|
|
|
return fieldset; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Fieldset contactsAndActions() { |
|
|
|
|
|
|
|
Fieldset win = new Fieldset(t("Actions and contacts")); |
|
|
|
|
|
|
|
Tag list = new Tag("ol"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Tag setup = new Tag("li").content(t("Setup actions")+NBSP); |
|
|
|
|
|
|
|
ActionList setupActions = triggeredActions.get(ROUTE_SETUP); |
|
|
|
|
|
|
|
if (isNull(setupActions)) { |
|
|
|
|
|
|
|
setupActions = new ActionList(this); |
|
|
|
|
|
|
|
triggeredActions.put(ROUTE_SETUP, setupActions); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
setupActions.list().addTo(setup).addTo(list); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Tag start = new Tag("li").content(t("Start actions")+NBSP); |
|
|
|
|
|
|
|
ActionList startActions = triggeredActions.get(ROUTE_START); |
|
|
|
|
|
|
|
if (isNull(startActions)) { |
|
|
|
|
|
|
|
startActions = new ActionList(this); |
|
|
|
|
|
|
|
triggeredActions.put(ROUTE_START, startActions); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
startActions.list().addTo(start).addTo(list); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (Contact c : contacts) { |
|
|
|
|
|
|
|
Tag item = c.link("span", c).addTo(new Tag("li")).content(NBSP); |
|
|
|
|
|
|
|
ActionList actions = triggeredActions.get(c.trigger()); |
|
|
|
|
|
|
|
if (isNull(actions)) { |
|
|
|
|
|
|
|
actions = new ActionList(this); |
|
|
|
|
|
|
|
triggeredActions.put(c.trigger(), actions); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
actions.list().addTo(item).addTo(list); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
list.addTo(win); |
|
|
|
|
|
|
|
return win; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void addPropertiesFrom(Route existingRoute) { |
|
|
|
public void addPropertiesFrom(Route existingRoute) { |
|
|
|
LOG.debug("addPropertiesFrom({})",existingRoute); |
|
|
|
LOG.debug("addPropertiesFrom({})",existingRoute); |
|
|
|
disabled = existingRoute.disabled; |
|
|
|
disabled = existingRoute.disabled; |
|
|
@ -302,8 +237,8 @@ public class Route extends BaseClass implements Comparable<Route>{ |
|
|
|
ActionList existingActionList = existingRoute.triggeredActions.get(trigger); |
|
|
|
ActionList existingActionList = existingRoute.triggeredActions.get(trigger); |
|
|
|
if (isSet(existingActionList)) { |
|
|
|
if (isSet(existingActionList)) { |
|
|
|
LOG.debug("found action list for {} on existing route {}: {}",trigger,existingRoute,existingActionList); |
|
|
|
LOG.debug("found action list for {} on existing route {}: {}",trigger,existingRoute,existingActionList); |
|
|
|
ActionList newActionList = entry.getValue(); |
|
|
|
existingActionList.forEach(action -> LOG.debug("OLD Action: {}",action)); |
|
|
|
newActionList.addActionsFrom(existingActionList); |
|
|
|
entry.getValue().merge(existingActionList); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
brakeTimes = new HashMap<String, Integer>(existingRoute.brakeTimes); |
|
|
|
brakeTimes = new HashMap<String, Integer>(existingRoute.brakeTimes); |
|
|
@ -316,17 +251,6 @@ public class Route extends BaseClass implements Comparable<Route>{ |
|
|
|
void addTurnout(Turnout t, Turnout.State s) { |
|
|
|
void addTurnout(Turnout t, Turnout.State s) { |
|
|
|
turnouts.put(t, s); |
|
|
|
turnouts.put(t, s); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private Fieldset turnouts() { |
|
|
|
|
|
|
|
Fieldset win = new Fieldset(t("Turnouts")); |
|
|
|
|
|
|
|
Tag list = new Tag("ul"); |
|
|
|
|
|
|
|
for (Entry<Turnout, Turnout.State> entry : turnouts.entrySet()) { |
|
|
|
|
|
|
|
Turnout turnout = entry.getKey(); |
|
|
|
|
|
|
|
Plan.addLink(turnout, turnout+": "+t(entry.getValue().toString()), list); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
list.addTo(win); |
|
|
|
|
|
|
|
return win; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* checks, whether the route may be used in a given context |
|
|
|
* checks, whether the route may be used in a given context |
|
|
@ -338,6 +262,38 @@ public class Route extends BaseClass implements Comparable<Route>{ |
|
|
|
return conditions.fulfilledBy(context); |
|
|
|
return conditions.fulfilledBy(context); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Fieldset basicProperties() { |
|
|
|
|
|
|
|
Fieldset fieldset = new Fieldset(t("Route properties")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (isSet(train)) train.link("span",t("Train: {}",train)).addTo(fieldset); |
|
|
|
|
|
|
|
Tag list = new Tag("ul"); |
|
|
|
|
|
|
|
Plan.addLink(startBlock, t("Origin: {} to {}",startBlock.name,startDirection), list); |
|
|
|
|
|
|
|
Plan.addLink(endBlock, t("Destination: {} from {}",endBlock.name,endDirection.inverse()), list); |
|
|
|
|
|
|
|
list.addTo(fieldset); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!signals.isEmpty()) { |
|
|
|
|
|
|
|
new Tag("h4").content(t("Signals")).addTo(fieldset); |
|
|
|
|
|
|
|
list = new Tag("ul"); |
|
|
|
|
|
|
|
for (Signal s : signals) Plan.addLink(s,s.toString(),list); |
|
|
|
|
|
|
|
list.addTo(fieldset); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return fieldset; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Fieldset brakeTimes() { |
|
|
|
|
|
|
|
Fieldset fieldset = new Fieldset(t("Brake time table")); |
|
|
|
|
|
|
|
Table table = new Table(); |
|
|
|
|
|
|
|
table.addHead(t("Train"),t("Brake time¹, forward"),t("Brake time¹, reverse")); |
|
|
|
|
|
|
|
for (Train t : Train.list()) { |
|
|
|
|
|
|
|
Integer fTime = brakeTimes.get(t.brakeId()); |
|
|
|
|
|
|
|
Integer rTime = brakeTimes.get(t.brakeId(true)); |
|
|
|
|
|
|
|
table.addRow(t,isSet(fTime)? fTime+NBSP+"ms" : "–",isSet(rTime)? fTime+NBSP+"ms" : "–"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
table.clazz("brake-times").addTo(fieldset); |
|
|
|
|
|
|
|
new Tag("p").content(t("1) Duration between 5 {} steps during brake process.",speedUnit)).addTo(fieldset); |
|
|
|
|
|
|
|
return fieldset; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public Route begin(Block block,Direction to) { |
|
|
|
public Route begin(Block block,Direction to) { |
|
|
|
// add those fields to clone, too!
|
|
|
|
// add those fields to clone, too!
|
|
|
|
contacts = new Vector<Contact>(); |
|
|
|
contacts = new Vector<Contact>(); |
|
|
@ -360,6 +316,7 @@ public class Route extends BaseClass implements Comparable<Route>{ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void brakeStop() { |
|
|
|
public void brakeStop() { |
|
|
|
|
|
|
|
train.setSpeed(0); |
|
|
|
if (isSet(brakeProcessor)) brakeProcessor.finish(); |
|
|
|
if (isSet(brakeProcessor)) brakeProcessor.finish(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -376,11 +333,6 @@ public class Route extends BaseClass implements Comparable<Route>{ |
|
|
|
clone.brakeTimes = new HashMap<String, Integer>(brakeTimes); |
|
|
|
clone.brakeTimes = new HashMap<String, Integer>(brakeTimes); |
|
|
|
return clone; |
|
|
|
return clone; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public int compareTo(Route other) { |
|
|
|
|
|
|
|
return name().compareTo(other.name()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Route complete() { |
|
|
|
public Route complete() { |
|
|
|
if (contacts.size()>1) { // mindestens 2 Kontakte: erster Kontakt aktiviert Block, vorletzter Kontakt leitet Bremsung ein
|
|
|
|
if (contacts.size()>1) { // mindestens 2 Kontakte: erster Kontakt aktiviert Block, vorletzter Kontakt leitet Bremsung ein
|
|
|
@ -411,8 +363,9 @@ public class Route extends BaseClass implements Comparable<Route>{ |
|
|
|
LOG.debug("{} on {} activated {}.",train,this,contact); |
|
|
|
LOG.debug("{} on {} activated {}.",train,this,contact); |
|
|
|
traceTrainFrom(contact); |
|
|
|
traceTrainFrom(contact); |
|
|
|
ActionList actions = triggeredActions.get(contact.trigger()); |
|
|
|
ActionList actions = triggeredActions.get(contact.trigger()); |
|
|
|
|
|
|
|
LOG.debug("Contact has id {} / trigger {} and is assigned with {}",contact.id(),contact.trigger(),actions); |
|
|
|
if (isNull(actions)) return; |
|
|
|
if (isNull(actions)) return; |
|
|
|
Context context = new Context(contact).route(this).train(train); |
|
|
|
context.contact(contact); |
|
|
|
actions.fire(context); |
|
|
|
actions.fire(context); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -420,12 +373,37 @@ public class Route extends BaseClass implements Comparable<Route>{ |
|
|
|
return new Vector<>(contacts); |
|
|
|
return new Vector<>(contacts); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String context() { |
|
|
|
private Fieldset contactsAndActions() { |
|
|
|
return REALM_ROUTE+":"+id(); |
|
|
|
Fieldset win = new Fieldset(t("Actions and contacts")); |
|
|
|
} |
|
|
|
Tag list = new Tag("ol"); |
|
|
|
|
|
|
|
|
|
|
|
public boolean isDisabled() { |
|
|
|
Tag setup = new Tag("li").content(t("Setup actions")+NBSP); |
|
|
|
return disabled; |
|
|
|
ActionList setupActions = triggeredActions.get(ROUTE_SETUP); |
|
|
|
|
|
|
|
if (isNull(setupActions)) { |
|
|
|
|
|
|
|
setupActions = new ActionList(this); |
|
|
|
|
|
|
|
triggeredActions.put(ROUTE_SETUP, setupActions); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
setupActions.list().addTo(setup).addTo(list); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Tag start = new Tag("li").content(t("Start actions")+NBSP); |
|
|
|
|
|
|
|
ActionList startActions = triggeredActions.get(ROUTE_START); |
|
|
|
|
|
|
|
if (isNull(startActions)) { |
|
|
|
|
|
|
|
startActions = new ActionList(this); |
|
|
|
|
|
|
|
triggeredActions.put(ROUTE_START, startActions); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
startActions.list().addTo(start).addTo(list); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (Contact c : contacts) { |
|
|
|
|
|
|
|
Tag item = c.link("span", c).addTo(new Tag("li")).content(NBSP); |
|
|
|
|
|
|
|
ActionList actions = triggeredActions.get(c.trigger()); |
|
|
|
|
|
|
|
if (isNull(actions)) { |
|
|
|
|
|
|
|
actions = new ActionList(this); |
|
|
|
|
|
|
|
triggeredActions.put(c.trigger(), actions); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
actions.list().addTo(item).addTo(list); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
list.addTo(win); |
|
|
|
|
|
|
|
return win; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public Block endBlock() { |
|
|
|
public Block endBlock() { |
|
|
@ -433,6 +411,7 @@ public class Route extends BaseClass implements Comparable<Route>{ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void finish() { |
|
|
|
public void finish() { |
|
|
|
|
|
|
|
context.clear(); // prevent delayed actions from firing after route has finished
|
|
|
|
setSignals(Signal.STOP); |
|
|
|
setSignals(Signal.STOP); |
|
|
|
for (Tile tile : path) tile.setRoute(null); |
|
|
|
for (Tile tile : path) tile.setRoute(null); |
|
|
|
Tile lastTile = path.lastElement(); |
|
|
|
Tile lastTile = path.lastElement(); |
|
|
@ -455,7 +434,7 @@ public class Route extends BaseClass implements Comparable<Route>{ |
|
|
|
triggeredContacts.clear(); |
|
|
|
triggeredContacts.clear(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public boolean fireSetupActions(Context context) { |
|
|
|
public boolean fireSetupActions() { |
|
|
|
ActionList setupActions = triggeredActions.get(ROUTE_SETUP); |
|
|
|
ActionList setupActions = triggeredActions.get(ROUTE_SETUP); |
|
|
|
if (isSet(setupActions) && !setupActions.fire(context)) return false; |
|
|
|
if (isSet(setupActions) && !setupActions.fire(context)) return false; |
|
|
|
state = State.PREPARED; |
|
|
|
state = State.PREPARED; |
|
|
@ -481,6 +460,10 @@ public class Route extends BaseClass implements Comparable<Route>{ |
|
|
|
if (isNull(id)) id = new Id(""+(generateName().hashCode())); |
|
|
|
if (isNull(id)) id = new Id(""+(generateName().hashCode())); |
|
|
|
return id; |
|
|
|
return id; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public boolean isDisabled() { |
|
|
|
|
|
|
|
return disabled; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public boolean isFreeFor(Train newTrain) { |
|
|
|
public boolean isFreeFor(Train newTrain) { |
|
|
|
for (int i=1; i<path.size(); i++) { |
|
|
|
for (int i=1; i<path.size(); i++) { |
|
|
@ -761,9 +744,6 @@ public class Route extends BaseClass implements Comparable<Route>{ |
|
|
|
LOG.debug("Removing route ({}) {}",id(),this); |
|
|
|
LOG.debug("Removing route ({}) {}",id(),this); |
|
|
|
if (isSet(train)) train.removeChild(this); |
|
|
|
if (isSet(train)) train.removeChild(this); |
|
|
|
for (Tile tile : path) { |
|
|
|
for (Tile tile : path) { |
|
|
|
if (tile.id().equals(Tile.id(4, 6))) { |
|
|
|
|
|
|
|
System.err.println(tile); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
tile.removeChild(this); |
|
|
|
tile.removeChild(this); |
|
|
|
} |
|
|
|
} |
|
|
|
conditions.remove(); |
|
|
|
conditions.remove(); |
|
|
@ -823,6 +803,12 @@ public class Route extends BaseClass implements Comparable<Route>{ |
|
|
|
file.write("]}"); |
|
|
|
file.write("]}"); |
|
|
|
file.close(); |
|
|
|
file.close(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Context set(Context newContext) { |
|
|
|
|
|
|
|
context = newContext; |
|
|
|
|
|
|
|
context.route(this); |
|
|
|
|
|
|
|
return context; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void setLast(Turnout.State state) { |
|
|
|
public void setLast(Turnout.State state) { |
|
|
|
if (isNull(state) || state == Turnout.State.UNDEF) return; |
|
|
|
if (isNull(state) || state == Turnout.State.UNDEF) return; |
|
|
@ -865,7 +851,7 @@ public class Route extends BaseClass implements Comparable<Route>{ |
|
|
|
if (newTrain != train) return false; // can't alter route's train
|
|
|
|
if (newTrain != train) return false; // can't alter route's train
|
|
|
|
} else train = newTrain; // set new train
|
|
|
|
} else train = newTrain; // set new train
|
|
|
|
ActionList startActions = triggeredActions.get(ROUTE_START); |
|
|
|
ActionList startActions = triggeredActions.get(ROUTE_START); |
|
|
|
if (isSet(startActions) && !startActions.fire(new Context(this).train(train))) return false; // start actions failed
|
|
|
|
if (isSet(startActions) && !startActions.fire(context)) return false; // start actions failed
|
|
|
|
state = State.STARTED; |
|
|
|
state = State.STARTED; |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
@ -896,6 +882,17 @@ public class Route extends BaseClass implements Comparable<Route>{ |
|
|
|
return train; |
|
|
|
return train; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Fieldset turnouts() { |
|
|
|
|
|
|
|
Fieldset win = new Fieldset(t("Turnouts")); |
|
|
|
|
|
|
|
Tag list = new Tag("ul"); |
|
|
|
|
|
|
|
for (Entry<Turnout, Turnout.State> entry : turnouts.entrySet()) { |
|
|
|
|
|
|
|
Turnout turnout = entry.getKey(); |
|
|
|
|
|
|
|
Plan.addLink(turnout, turnout+": "+t(entry.getValue().toString()), list); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
list.addTo(win); |
|
|
|
|
|
|
|
return win; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public Route unlock() throws IOException { |
|
|
|
public Route unlock() throws IOException { |
|
|
|
// TODO
|
|
|
|
// TODO
|
|
|
|
return this; |
|
|
|
return this; |
|
|
|