added status ("MaxPointsReason") to Race in Kieler Woche result service

This commit is contained in:
Axel Uhl
2012-06-08 16:59:30 +02:00
parent 09d747e763
commit 36b79c844b
3 changed files with 24 additions and 0 deletions
@@ -1,6 +1,8 @@
package com.sap.sailing.kiworesultimport;
public interface Race {
String getStatus();
Double getPoints();
Integer getNumber();
@@ -20,4 +20,10 @@ public class RaceImpl extends AbstractNodeWrapper implements Race {
return Integer.valueOf(getNode().getAttributes().getNamedItem("number").getNodeValue());
}
@Override
public String getStatus() {
final Node namedItem = getNode().getAttributes().getNamedItem("status");
return namedItem == null || namedItem.getNodeValue() == null || namedItem.getNodeValue().trim().length() == 0 ? null : namedItem.getNodeValue();
}
}