mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-07 12:51:02 +00:00
Merge branch 'master' of ssh://kielweek.web4sap.com/home/trac/git
This commit is contained in:
commit
ab5cd10b27
46 files changed
+513
-54
No files matched your search
+16
-9
@@ -4,22 +4,29 @@ import com.sap.sailing.domain.common.Color;
|
||||
import com.sap.sailing.domain.common.impl.RGBColor;
|
||||
|
||||
public enum FleetColors {
|
||||
GOLD (255, 215, 0),
|
||||
SILVER (201, 192, 187),
|
||||
BRONZE (205, 127, 50),
|
||||
EMERALD (0, 201, 87),
|
||||
BLUE (0, 0, 255),
|
||||
YELLOW (255,255,0),
|
||||
GREEN (0, 255, 0),
|
||||
RED (255, 0, 0);
|
||||
GOLD (255, 215, 0, 1),
|
||||
SILVER (201, 192, 187, 2),
|
||||
BRONZE (205, 127, 50, 3),
|
||||
EMERALD (0, 201, 87, 4),
|
||||
BLUE (0, 0, 255, 0),
|
||||
YELLOW (255,255,0, 0),
|
||||
GREEN (0, 255, 0, 0),
|
||||
RED (255, 0, 0, 0);
|
||||
|
||||
private Color color;
|
||||
|
||||
FleetColors(int red, int green, int blue) {
|
||||
private int defaultOrderNo;
|
||||
|
||||
FleetColors(int red, int green, int blue, int defaultOrderNo) {
|
||||
color = new RGBColor(red, green, blue);
|
||||
this.defaultOrderNo = defaultOrderNo;
|
||||
}
|
||||
|
||||
public Color getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public int getDefaultOrderNo() {
|
||||
return defaultOrderNo;
|
||||
}
|
||||
}
|
||||
+43
-39
@@ -48,7 +48,8 @@ public class RegattaWithSeriesAndFleetsCreateDialog extends DataEntryDialog<Rega
|
||||
public String getErrorMessage(RegattaDTO regattaToValidate) {
|
||||
String errorMessage = null;
|
||||
boolean nameNotEmpty = regattaToValidate.name != null && regattaToValidate.name.length() > 0;
|
||||
boolean boatClassNotEmpty = regattaToValidate.boatClass != null && regattaToValidate.boatClass.name.length() > 0;
|
||||
boolean boatClassNotEmpty = regattaToValidate.boatClass != null
|
||||
&& regattaToValidate.boatClass.name.length() > 0;
|
||||
|
||||
boolean unique = true;
|
||||
for (RegattaDTO regatta : existingRegattas) {
|
||||
@@ -66,14 +67,14 @@ public class RegattaWithSeriesAndFleetsCreateDialog extends DataEntryDialog<Rega
|
||||
errorMessage = stringConstants.regattaWithThisNameAlreadyExists();
|
||||
}
|
||||
|
||||
if(errorMessage == null) {
|
||||
if (errorMessage == null) {
|
||||
List<SeriesDTO> seriesToValidate = regattaToValidate.series;
|
||||
int index = 0;
|
||||
boolean seriesNameNotEmpty = true;
|
||||
|
||||
for (SeriesDTO series : seriesToValidate) {
|
||||
seriesNameNotEmpty = series.name != null && series.name.length() > 0;
|
||||
if(!seriesNameNotEmpty) {
|
||||
if (!seriesNameNotEmpty) {
|
||||
break;
|
||||
}
|
||||
index++;
|
||||
@@ -81,10 +82,10 @@ public class RegattaWithSeriesAndFleetsCreateDialog extends DataEntryDialog<Rega
|
||||
|
||||
int index2 = 0;
|
||||
boolean seriesUnique = true;
|
||||
|
||||
|
||||
HashSet<String> setToFindDuplicates = new HashSet<String>();
|
||||
for (SeriesDTO series : seriesToValidate) {
|
||||
if(!setToFindDuplicates.add(series.name)) {
|
||||
if (!setToFindDuplicates.add(series.name)) {
|
||||
seriesUnique = false;
|
||||
break;
|
||||
}
|
||||
@@ -92,21 +93,23 @@ public class RegattaWithSeriesAndFleetsCreateDialog extends DataEntryDialog<Rega
|
||||
}
|
||||
|
||||
if (!seriesNameNotEmpty) {
|
||||
errorMessage = stringConstants.series() + " " + (index + 1) + ": " + stringConstants.pleaseEnterNonEmptyName();
|
||||
errorMessage = stringConstants.series() + " " + (index + 1) + ": "
|
||||
+ stringConstants.pleaseEnterNonEmptyName();
|
||||
} else if (!seriesUnique) {
|
||||
errorMessage = stringConstants.series() + " " + (index2 + 1) + ": " + stringConstants.seriesWithThisNameAlreadyExists();
|
||||
errorMessage = stringConstants.series() + " " + (index2 + 1) + ": "
|
||||
+ stringConstants.seriesWithThisNameAlreadyExists();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
return errorMessage;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public RegattaWithSeriesAndFleetsCreateDialog(Collection<RegattaDTO> existingRegattas, StringMessages stringConstants,
|
||||
AsyncCallback<RegattaDTO> callback) {
|
||||
super(stringConstants.regatta(), null, stringConstants.ok(), stringConstants.cancel(),
|
||||
public RegattaWithSeriesAndFleetsCreateDialog(Collection<RegattaDTO> existingRegattas,
|
||||
StringMessages stringConstants, AsyncCallback<RegattaDTO> callback) {
|
||||
super(stringConstants.regatta(), null, stringConstants.ok(), stringConstants.cancel(),
|
||||
new RegattaParameterValidator(stringConstants, existingRegattas), callback);
|
||||
this.stringConstants = stringConstants;
|
||||
this.regatta = new RegattaDTO();
|
||||
@@ -140,67 +143,68 @@ public class RegattaWithSeriesAndFleetsCreateDialog extends DataEntryDialog<Rega
|
||||
}
|
||||
Grid formGrid = new Grid(2, 2);
|
||||
panel.add(formGrid);
|
||||
|
||||
formGrid.setWidget(0, 0, new Label(stringConstants.name() + ":"));
|
||||
|
||||
formGrid.setWidget(0, 0, new Label(stringConstants.name() + ":"));
|
||||
formGrid.setWidget(0, 1, nameEntryField);
|
||||
formGrid.setWidget(1, 0, new Label(stringConstants.boatClass() + ":"));
|
||||
formGrid.setWidget(1, 1, boatClassEntryField);
|
||||
|
||||
|
||||
panel.add(createHeadlineLabel(stringConstants.series()));
|
||||
panel.add(seriesGrid);
|
||||
|
||||
|
||||
Button addSeriesButton = new Button("Add series");
|
||||
addSeriesButton.addClickHandler(new ClickHandler() {
|
||||
|
||||
|
||||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
RegattaDTO result = getResult();
|
||||
|
||||
SeriesWithFleetsCreateDialog dialog = new SeriesWithFleetsCreateDialog(Collections.unmodifiableCollection(result.series), stringConstants,
|
||||
new AsyncCallback<SeriesDTO>() {
|
||||
@Override
|
||||
public void onFailure(Throwable t) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(SeriesDTO newSeries) {
|
||||
createdSeries.add(newSeries);
|
||||
updateSeriesGrid(panel);
|
||||
}
|
||||
});
|
||||
SeriesWithFleetsCreateDialog dialog = new SeriesWithFleetsCreateDialog(Collections
|
||||
.unmodifiableCollection(result.series), stringConstants, new AsyncCallback<SeriesDTO>() {
|
||||
@Override
|
||||
public void onFailure(Throwable t) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(SeriesDTO newSeries) {
|
||||
createdSeries.add(newSeries);
|
||||
updateSeriesGrid(panel);
|
||||
}
|
||||
});
|
||||
dialog.show();
|
||||
}
|
||||
});
|
||||
panel.add(addSeriesButton);
|
||||
|
||||
|
||||
return panel;
|
||||
}
|
||||
|
||||
private void updateSeriesGrid(VerticalPanel parentPanel) {
|
||||
int widgetIndex = parentPanel.getWidgetIndex(seriesGrid);
|
||||
parentPanel.remove(seriesGrid);
|
||||
|
||||
|
||||
int seriesCount = createdSeries.size();
|
||||
seriesGrid = new Grid(seriesCount * 2, 3);
|
||||
seriesGrid.setCellSpacing(3);
|
||||
|
||||
for(int i = 0; i < seriesCount; i++) {
|
||||
for (int i = 0; i < seriesCount; i++) {
|
||||
SeriesDTO seriesDTO = createdSeries.get(i);
|
||||
Label seriesLabel = new Label((i+1) + ". " + stringConstants.series() + ":");
|
||||
Label seriesLabel = new Label((i + 1) + ". " + stringConstants.series() + ":");
|
||||
seriesLabel.setWordWrap(false);
|
||||
seriesLabel.getElement().getStyle().setFontWeight(FontWeight.BOLD);
|
||||
seriesGrid.setWidget(i*2, 0, seriesLabel);
|
||||
seriesGrid.setHTML(i*2, 1, seriesDTO.name);
|
||||
if(seriesDTO.getFleets() != null && seriesDTO.getFleets().size() > 0) {
|
||||
seriesGrid.setHTML(i*2+1, 1, seriesDTO.getFleets().size() + " fleets: " + seriesDTO.getFleets().toString());
|
||||
seriesGrid.setWidget(i * 2, 0, seriesLabel);
|
||||
seriesGrid.setHTML(i * 2, 1, seriesDTO.name);
|
||||
if (seriesDTO.getFleets() != null && seriesDTO.getFleets().size() > 0) {
|
||||
seriesGrid.setHTML(i * 2 + 1, 1, seriesDTO.getFleets().size() + " fleets: "
|
||||
+ seriesDTO.getFleets().toString());
|
||||
} else {
|
||||
seriesGrid.setHTML(i*2+1, 1, seriesDTO.getFleets().size() + " No fleets defined.");
|
||||
seriesGrid.setHTML(i * 2 + 1, 1, seriesDTO.getFleets().size() + " No fleets defined.");
|
||||
}
|
||||
}
|
||||
|
||||
parentPanel.insert(seriesGrid, widgetIndex);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void show() {
|
||||
super.show();
|
||||
|
||||
+39
-4
@@ -5,6 +5,8 @@ import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gwt.event.dom.client.ChangeEvent;
|
||||
import com.google.gwt.event.dom.client.ChangeHandler;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.event.dom.client.ClickHandler;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
@@ -90,7 +92,7 @@ public class SeriesWithFleetsCreateDialog extends DataEntryDialog<SeriesDTO> {
|
||||
}
|
||||
index2++;
|
||||
}
|
||||
|
||||
|
||||
if (!fleetNameNotEmpty) {
|
||||
errorMessage = stringConstants.fleet() + " " + (index + 1) + ": " + stringConstants.pleaseEnterNonEmptyName();
|
||||
} else if (!fleetUnique) {
|
||||
@@ -136,10 +138,38 @@ public class SeriesWithFleetsCreateDialog extends DataEntryDialog<SeriesDTO> {
|
||||
}
|
||||
|
||||
private Widget createFleetColorWidget(Color defaultColor) {
|
||||
ListBox listBox = createListBox(false);
|
||||
final ListBox listBox = createListBox(false);
|
||||
final int fleetIndex = fleetNameEntryFields.size();
|
||||
listBox.addChangeHandler(new ChangeHandler() {
|
||||
@Override
|
||||
public void onChange(ChangeEvent event) {
|
||||
// set default order no of the selected color
|
||||
int selIndex = listBox.getSelectedIndex();
|
||||
IntegerBox orderNoBox = fleetOrderNoEntryFields.get(fleetIndex-1);
|
||||
if(selIndex == 0) {
|
||||
orderNoBox.setValue(0);
|
||||
} else {
|
||||
String value = listBox.getValue(selIndex);
|
||||
for(FleetColors color: FleetColors.values()) {
|
||||
if(color.name().equals(value)) {
|
||||
orderNoBox.setValue(color.getDefaultOrderNo());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
listBox.addItem(stringConstants.noColor());
|
||||
for(FleetColors value: FleetColors.values())
|
||||
listBox.addItem(value.name());
|
||||
|
||||
if(defaultColor == null) {
|
||||
listBox.setSelectedIndex(0);
|
||||
}
|
||||
|
||||
fleetColorEntryFields.add(listBox);
|
||||
|
||||
return listBox;
|
||||
}
|
||||
|
||||
@@ -160,7 +190,11 @@ public class SeriesWithFleetsCreateDialog extends DataEntryDialog<SeriesDTO> {
|
||||
FleetDTO fleetDTO = new FleetDTO();
|
||||
fleetDTO.name = fleetNameEntryFields.get(i).getValue();
|
||||
fleetDTO.setColor(getSelectedColor(fleetColorEntryFields.get(i)));
|
||||
fleetDTO.setOrderNo(fleetOrderNoEntryFields.get(i).getValue());
|
||||
int orderNo = -1;
|
||||
if(fleetOrderNoEntryFields.get(i).getValue() != null) {
|
||||
orderNo = fleetOrderNoEntryFields.get(i).getValue();
|
||||
}
|
||||
fleetDTO.setOrderNo(orderNo);
|
||||
fleets.add(fleetDTO);
|
||||
}
|
||||
|
||||
@@ -172,7 +206,8 @@ public class SeriesWithFleetsCreateDialog extends DataEntryDialog<SeriesDTO> {
|
||||
private Color getSelectedColor(ListBox colorListBox) {
|
||||
Color result = null;
|
||||
int selIndex = colorListBox.getSelectedIndex();
|
||||
if(selIndex >= 0) {
|
||||
// the zero index represents the 'no color' option
|
||||
if(selIndex > 0) {
|
||||
String value = colorListBox.getValue(selIndex);
|
||||
for(FleetColors color: FleetColors.values()) {
|
||||
if(color.name().equals(value)) {
|
||||
|
||||
+1
@@ -317,4 +317,5 @@ public interface StringMessages extends Messages {
|
||||
String splitFleet();
|
||||
String color();
|
||||
String medalSeries();
|
||||
String noColor();
|
||||
}
|
||||
+1
@@ -315,3 +315,4 @@ series=Series
|
||||
splitFleet=Split fleet
|
||||
color=Color
|
||||
medalSeries=Medal Series
|
||||
noColor=No color
|
||||
+1
@@ -316,3 +316,4 @@ fleets=Flotten
|
||||
splitFleet=Aufteilung in Gruppen
|
||||
color=Farbe
|
||||
medalSeries=Medal Series
|
||||
noColor=Keine Farbe
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="resources"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.sap.sailing.kiworesultimport.test</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
eclipse.preferences.version=1
|
||||
pluginProject.extensions=false
|
||||
resolve.requirebundle=false
|
||||
@@ -0,0 +1,9 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Test
|
||||
Bundle-SymbolicName: com.sap.sailing.kiworesultimport.test
|
||||
Bundle-Version: 1.0.0.qualifier
|
||||
Bundle-Vendor: SAP
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
Require-Bundle: org.junit4;bundle-version="4.8.2",
|
||||
com.sap.sailing.kiworesultimport
|
||||
@@ -0,0 +1,5 @@
|
||||
source.. = src/,\
|
||||
resources/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>root</artifactId>
|
||||
<groupId>com.sap.sailing</groupId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>com.sap.sailing.kiworesultimport.test</artifactId>
|
||||
<packaging>eclipse-test-plugin</packaging>
|
||||
</project>
|
||||
BIN
Binary file not shown.
+10
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<erg:ergebnisliste xmlns:erg="http://www.bmiag.de/KWSailing/Ergebnisliste">
|
||||
<bootsklasse>2.4 mR</bootsklasse>
|
||||
<datum>2011-06-18+02:00</datum>
|
||||
<uhrzeit>14:38:22.547+02:00</uhrzeit>
|
||||
<status>vorlauefig</status>
|
||||
<veranstaltung>Kieler Woche 2011</veranstaltung>
|
||||
<wettfahrtanzahl>1</wettfahrtanzahl>
|
||||
<pdfDateiname>2011-06-18_2 4 mR_Wettfahrt_1.pdf</pdfDateiname>
|
||||
</erg:ergebnisliste>
|
||||
Executable
+2
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<ResultList date="18. Juni 2011" time="16:26" event="Kieler Woche 2011" class="49er" status="preliminary results" imagePfad="D:\Programme\KWSailing\eventlogos\KielerWoche_Ergebnislistenkopf_2011.jpg" legende=" "><Verteilung><Boat preis="" position="1" sailingnumber="SWE 1196" name=" " ><Crew><Skipper name="von Geijer, Jonas (1981) GKSS" isaf="" /><Crewmember name="Düring, Niclas (1990) GKSS" /></Crew><Races totalpoints="4,00" ><Race number="1" points="1,00" /><Race number="2" points="3,00" /></Races></Boat><Boat preis="" position="2" sailingnumber="AUT 084" name=" " ><Crew><Skipper name="Delle Karth, Nico Luca Marc (1984) KYK" isaf="http://www.sailing.org/biog.php?id=autnd1" /><Crewmember name="Resch, Nikolaus Leopold (1984) YCV" /></Crew><Races totalpoints="5,00" ><Race number="1" points="2,00" /><Race number="2" points="3,00" /></Races></Boat><Boat preis="" position="3" sailingnumber="AUS 1134" name=" " ><Crew><Skipper name="Phillips, Sam (1991) SSCBC" isaf="http://www.sailing.org/biog.php?id=AUSSP11" /><Crewmember name="Phillips, Will (1987) SSCBC" /></Crew><Races totalpoints="6,00" ><Race number="1" points="1,00" /><Race number="2" points="5,00" /></Races></Boat><Boat preis="" position="4" sailingnumber="DEN 1114" name=" " ><Crew><Skipper name="Krüger Andersen, Peter (1980) KDY" isaf="http://www.sailing.org/biog.php?id=DENPK1" /><Crewmember name="Nicolai, Thorsell (1984) KDY" /></Crew><Races totalpoints="7,00" ><Race number="1" points="3,00" /><Race number="2" points="4,00" /></Races></Boat><Boat preis="" position="5" sailingnumber="SWE 1184" name=" " ><Crew><Skipper name="Charlie, Ekberg (1989) KSSS" isaf="http://www.sailing.org/biog.php?id=SWECE1" /><Crewmember name="Torlén, Kalle (1985) KSSS" /></Crew><Races totalpoints="8,00" ><Race number="1" points="6,00" /><Race number="2" points="2,00" /></Races></Boat><Boat preis="" position="6" sailingnumber="GER 1164" name=" " ><Crew><Skipper name="Rieger, Max (1986) WYC" isaf="" /><Crewmember name="Rieger, Moritz (1986) WYC" /></Crew><Races totalpoints="8,00" ><Race number="1" points="2,00" /><Race number="2" points="6,00" /></Races></Boat><Boat preis="" position="7" sailingnumber="DEN 9" name=" " ><Crew><Skipper name="Norregaard, Allan (1981) Kolding" isaf="http://www.sailing.org/biog.php?id=DENAN1" /><Crewmember name="Lang, Peter (1989) Kolding Sejlklub" /></Crew><Races totalpoints="10,00" ><Race number="1" points="9,00" /><Race number="2" points="1,00" /></Races></Boat><Boat preis="" position="8" sailingnumber="AUS 1140" name=" " ><Crew><Skipper name="Thomas, Steven (1988) RPYC" isaf="http://www.sailing.org/biog.php?id=AUSST5" /><Crewmember name="Brownie, Nick (1989) RPYC" /></Crew><Races totalpoints="10,00" ><Race number="1" points="8,00" /><Race number="2" points="2,00" /></Races></Boat><Boat preis="" position="9" sailingnumber="GER 961" name=" " ><Crew><Skipper name="Schadewaldt, Tobias (1984) nrv" isaf="http://www.sailing.org/biog.php?id=gerts04" /><Crewmember name="Baumann, Hannes (1982) nrv" /></Crew><Races totalpoints="10,00" ><Race number="1" points="4,00" /><Race number="2" points="6,00" /></Races></Boat><Boat preis="" position="10" sailingnumber="GER 074" name=" " ><Crew><Skipper name="Fricke, Leopold (1985) CYC" isaf="http://www.sailing.org/biog.php?id=GERLF1" /><Crewmember name="Huber, Lorenz (1986) CYC" /></Crew><Races totalpoints="12,00" ><Race number="1" points="3,00" /><Race number="2" points="9,00" /></Races></Boat><Boat preis="" position="11" sailingnumber="BEL 1152" name=" " ><Crew><Skipper name="Lefebvre, Yannick (1988) RNSYC" isaf="http://www.sailing.org/biog.php?id=BELYL5" /><Crewmember name="Janssens, Matthieu (1984) RBSC" /></Crew><Races totalpoints="13,00" ><Race number="1" points="12,00" /><Race number="2" points="1,00" /></Races></Boat><Boat preis="" position="12" sailingnumber="FRA 090" name=" " ><Crew><Skipper name="berthez, vincent (1990) SRR" isaf="" /><Crewmember name="mallaret, marco (1990) SRR" /></Crew><Races totalpoints="13,00" ><Race number="1" points="9,00" /><Race number="2" points="4,00" /></Races></Boat><Boat preis="" position="13" sailingnumber="AUS 1192" name=" " ><Crew><Skipper name="Johnson, Thomas (1991) rfbyc" isaf="" /><Crewmember name="mara, rhys (1990) chyc" /></Crew><Races totalpoints="13,00" ><Race number="1" points="5,00" /><Race number="2" points="8,00" /></Races></Boat><Boat preis="" position="14" sailingnumber="GER 1208" name=" " ><Crew><Skipper name="Ramm, Julian (1983) KYC" isaf="http://www.sailing.org/biog.php?id=GERJR2" /><Crewmember name="Lewin, Oliver (1985) KYC" /></Crew><Races totalpoints="15,00" ><Race number="1" points="7,00" /><Race number="2" points="8,00" /></Races></Boat><Boat preis="" position="15" sailingnumber="AUT 070" name=" " ><Crew><Skipper name="Zajac, Thomas (1985) BYC" isaf="http://www.sailing.org/biog.php?id=AUTTZ1" /><Crewmember name="Czajka, Thomas (1985) BYC" /></Crew><Races totalpoints="16,0Line truncated
|
||||
BIN
Binary file not shown.
+10
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<erg:ergebnisliste xmlns:erg="http://www.bmiag.de/KWSailing/Ergebnisliste">
|
||||
<bootsklasse>49er</bootsklasse>
|
||||
<datum>2011-06-18+02:00</datum>
|
||||
<uhrzeit>17:30:21.390+02:00</uhrzeit>
|
||||
<status>vorlauefig</status>
|
||||
<veranstaltung>Kieler Woche 2011</veranstaltung>
|
||||
<wettfahrtanzahl>3</wettfahrtanzahl>
|
||||
<pdfDateiname>2011-06-18_49er_Wettfahrt_3.pdf</pdfDateiname>
|
||||
</erg:ergebnisliste>
|
||||
Executable
+2
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<ResultList date="18. Juni 2011" time="17:30" event="Kieler Woche 2011" class="49er" status="preliminary results" imagePfad="D:\Programme\KWSailing\eventlogos\KielerWoche_Ergebnislistenkopf_2011.jpg" legende=" "><Verteilung><Boat preis="" position="1" sailingnumber="AUS 1134" name=" " ><Crew><Skipper name="Phillips, Sam (1991) SSCBC" isaf="http://www.sailing.org/biog.php?id=AUSSP11" /><Crewmember name="Phillips, Will (1987) SSCBC" /></Crew><Races totalpoints="7,00" ><Race number="1" points="1,00" /><Race number="2" points="5,00" /><Race number="3" points="1,00" /></Races></Boat><Boat preis="" position="2" sailingnumber="SWE 1184" name=" " ><Crew><Skipper name="Charlie, Ekberg (1989) KSSS" isaf="http://www.sailing.org/biog.php?id=SWECE1" /><Crewmember name="Torlén, Kalle (1985) KSSS" /></Crew><Races totalpoints="10,00" ><Race number="1" points="6,00" /><Race number="2" points="2,00" /><Race number="3" points="2,00" /></Races></Boat><Boat preis="" position="3" sailingnumber="SWE 1196" name=" " ><Crew><Skipper name="von Geijer, Jonas (1981) GKSS" isaf="" /><Crewmember name="Düring, Niclas (1990) GKSS" /></Crew><Races totalpoints="11,00" ><Race number="1" points="1,00" /><Race number="2" points="3,00" /><Race number="3" points="7,00" /></Races></Boat><Boat preis="" position="4" sailingnumber="DEN 1114" name=" " ><Crew><Skipper name="Krüger Andersen, Peter (1980) KDY" isaf="http://www.sailing.org/biog.php?id=DENPK1" /><Crewmember name="Nicolai, Thorsell (1984) KDY" /></Crew><Races totalpoints="12,00" ><Race number="1" points="3,00" /><Race number="2" points="4,00" /><Race number="3" points="5,00" /></Races></Boat><Boat preis="" position="5" sailingnumber="DEN 9" name=" " ><Crew><Skipper name="Norregaard, Allan (1981) Kolding" isaf="http://www.sailing.org/biog.php?id=DENAN1" /><Crewmember name="Lang, Peter (1989) Kolding Sejlklub" /></Crew><Races totalpoints="13,00" ><Race number="1" points="9,00" /><Race number="2" points="1,00" /><Race number="3" points="3,00" /></Races></Boat><Boat preis="" position="6" sailingnumber="GER 961" name=" " ><Crew><Skipper name="Schadewaldt, Tobias (1984) nrv" isaf="http://www.sailing.org/biog.php?id=gerts04" /><Crewmember name="Baumann, Hannes (1982) nrv" /></Crew><Races totalpoints="13,00" ><Race number="1" points="4,00" /><Race number="2" points="6,00" /><Race number="3" points="3,00" /></Races></Boat><Boat preis="" position="7" sailingnumber="GER 1208" name=" " ><Crew><Skipper name="Ramm, Julian (1983) KYC" isaf="http://www.sailing.org/biog.php?id=GERJR2" /><Crewmember name="Lewin, Oliver (1985) KYC" /></Crew><Races totalpoints="16,00" ><Race number="1" points="7,00" /><Race number="2" points="8,00" /><Race number="3" points="1,00" /></Races></Boat><Boat preis="" position="8" sailingnumber="GER 1164" name=" " ><Crew><Skipper name="Rieger, Max (1986) WYC" isaf="" /><Crewmember name="Rieger, Moritz (1986) WYC" /></Crew><Races totalpoints="16,00" ><Race number="1" points="2,00" /><Race number="2" points="6,00" /><Race number="3" points="8,00" /></Races></Boat><Boat preis="" position="9" sailingnumber="GER 074" name=" " ><Crew><Skipper name="Fricke, Leopold (1985) CYC" isaf="http://www.sailing.org/biog.php?id=GERLF1" /><Crewmember name="Huber, Lorenz (1986) CYC" /></Crew><Races totalpoints="17,00" ><Race number="1" points="3,00" /><Race number="2" points="9,00" /><Race number="3" points="5,00" /></Races></Boat><Boat preis="" position="10" sailingnumber="AUT 084" name=" " ><Crew><Skipper name="Delle Karth, Nico Luca Marc (1984) KYK" isaf="http://www.sailing.org/biog.php?id=autnd1" /><Crewmember name="Resch, Nikolaus Leopold (1984) YCV" /></Crew><Races totalpoints="18,00" ><Race number="1" points="2,00" /><Race number="2" points="3,00" /><Race number="3" points="13,00" /></Races></Boat><Boat preis="" position="11" sailingnumber="AUT 070" name=" " ><Crew><Skipper name="Zajac, Thomas (1985) BYC" isaf="http://www.sailing.org/biog.php?id=AUTTZ1" /><Crewmember name="Czajka, Thomas (1985) BYC" /></Crew><Races totalpoints="20,00" ><Race number="1" points="11,00" /><Race number="2" points="5,00" /><Race number="3" points="4,00" /></Races></Boat><Boat preis="" position="12" sailingnumber="AUS 1192" name=" " ><Crew><Skipper name="Johnson, Thomas (1991) rfbyc" isaf="" /><Crewmember name="mara, rhys (1990) chyc" /></Crew><Races totalpoints="21,00" ><Race number="1" points="5,00" /><Race number="2" points="8,00" /><Race number="3" points="8,00" /></Races></Boat><Boat preis="" position="13" sailingnumber="BRA 1137" name=" " ><Crew><Skipper name="Andre, Fonseca (1978) CDJ" isaf="http://www.sailing.org/biog.php?id=braff1" /><Crewmember name="Grael, Marco (1989) CBVM" /></Crew><Races totalpoints="26,00" ><Race number="1" points="8,00" /><Race number="2" points="11,00" /><Race number="3" points="7,00" /></Races></Boat><Boat preis="" position="14" sailingnumber="FRA 1048" name=" " ><Crew><Skipper name="GOURON, Glenn (1990) CNBLine truncated
|
||||
BIN
Binary file not shown.
+10
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<erg:ergebnisliste xmlns:erg="http://www.bmiag.de/KWSailing/Ergebnisliste">
|
||||
<bootsklasse>49er</bootsklasse>
|
||||
<datum>2011-06-18+02:00</datum>
|
||||
<uhrzeit>21:23:41.577+02:00</uhrzeit>
|
||||
<status>vorlauefig</status>
|
||||
<veranstaltung>Kieler Woche 2011</veranstaltung>
|
||||
<wettfahrtanzahl>4</wettfahrtanzahl>
|
||||
<pdfDateiname>2011-06-18_49er_Wettfahrt_4.pdf</pdfDateiname>
|
||||
</erg:ergebnisliste>
|
||||
Executable
+2
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<ResultList date="18. Juni 2011" time="21:23" event="Kieler Woche 2011" class="49er" status="preliminary results" imagePfad="D:\Programme\KWSailing\eventlogos\KielerWoche_Ergebnislistenkopf_2011.jpg" legende=" "><Verteilung><Boat preis="" position="1" sailingnumber="AUS 1134" name=" " ><Crew><Skipper name="Phillips, Sam (1991) SSCBC" isaf="http://www.sailing.org/biog.php?id=AUSSP11" /><Crewmember name="Phillips, Will (1987) SSCBC" /></Crew><Races totalpoints="9,00" ><Race number="1" points="1,00" /><Race number="2" points="5,00" /><Race number="3" points="1,00" /><Race number="4" points="2,00" /></Races></Boat><Boat preis="" position="2" sailingnumber="SWE 1184" name=" " ><Crew><Skipper name="Charlie, Ekberg (1989) KSSS" isaf="http://www.sailing.org/biog.php?id=SWECE1" /><Crewmember name="Torlén, Kalle (1985) KSSS" /></Crew><Races totalpoints="11,00" ><Race number="1" points="6,00" /><Race number="2" points="2,00" /><Race number="3" points="2,00" /><Race number="4" points="1,00" /></Races></Boat><Boat preis="" position="3" sailingnumber="DEN 1114" name=" " ><Crew><Skipper name="Krüger Andersen, Peter (1980) KDY" isaf="http://www.sailing.org/biog.php?id=DENPK1" /><Crewmember name="Nicolai, Thorsell (1984) KDY" /></Crew><Races totalpoints="15,00" ><Race number="1" points="3,00" /><Race number="2" points="4,00" /><Race number="3" points="4,00" /><Race number="4" points="4,00" /></Races></Boat><Boat preis="" position="4" sailingnumber="DEN 9" name=" " ><Crew><Skipper name="Norregaard, Allan (1981) Kolding" isaf="http://www.sailing.org/biog.php?id=DENAN1" /><Crewmember name="Lang, Peter (1989) Kolding Sejlklub" /></Crew><Races totalpoints="16,00" ><Race number="1" points="9,00" /><Race number="2" points="1,00" /><Race number="3" points="3,00" /><Race number="4" points="3,00" /></Races></Boat><Boat preis="" position="5" sailingnumber="GER 074" name=" " ><Crew><Skipper name="Fricke, Leopold (1985) CYC" isaf="http://www.sailing.org/biog.php?id=GERLF1" /><Crewmember name="Huber, Lorenz (1986) CYC" /></Crew><Races totalpoints="20,00" ><Race number="1" points="3,00" /><Race number="2" points="9,00" /><Race number="3" points="5,00" /><Race number="4" points="3,00" /></Races></Boat><Boat preis="" position="6" sailingnumber="SWE 1196" name=" " ><Crew><Skipper name="von Geijer, Jonas (1981) GKSS" isaf="" /><Crewmember name="Düring, Niclas (1990) GKSS" /></Crew><Races totalpoints="22,00" ><Race number="1" points="1,00" /><Race number="2" points="3,00" /><Race number="3" points="6,00" /><Race number="4" points="12,00" /></Races></Boat><Boat preis="" position="7" sailingnumber="GER 961" name=" " ><Crew><Skipper name="Schadewaldt, Tobias (1984) nrv" isaf="http://www.sailing.org/biog.php?id=gerts04" /><Crewmember name="Baumann, Hannes (1982) nrv" /></Crew><Races totalpoints="22,00" ><Race number="1" points="4,00" /><Race number="2" points="6,00" /><Race number="3" points="3,00" /><Race number="4" points="9,00" /></Races></Boat><Boat preis="" position="8" sailingnumber="GER 1208" name=" " ><Crew><Skipper name="Ramm, Julian (1983) KYC" isaf="http://www.sailing.org/biog.php?id=GERJR2" /><Crewmember name="Lewin, Oliver (1985) KYC" /></Crew><Races totalpoints="25,00" ><Race number="1" points="7,00" /><Race number="2" points="8,00" /><Race number="3" points="1,00" /><Race number="4" points="9,00" /></Races></Boat><Boat preis="" position="9" sailingnumber="GER 1164" name=" " ><Crew><Skipper name="Rieger, Max (1986) WYC" isaf="" /><Crewmember name="Rieger, Moritz (1986) WYC" /></Crew><Races totalpoints="25,00" ><Race number="1" points="2,00" /><Race number="2" points="6,00" /><Race number="3" points="7,00" /><Race number="4" points="10,00" /></Races></Boat><Boat preis="" position="10" sailingnumber="AUS 1192" name=" " ><Crew><Skipper name="Johnson, Thomas (1991) rfbyc" isaf="" /><Crewmember name="mara, rhys (1990) chyc" /></Crew><Races totalpoints="25,00" ><Race number="1" points="5,00" /><Race number="2" points="8,00" /><Race number="3" points="8,00" /><Race number="4" points="4,00" /></Races></Boat><Boat preis="" position="11" sailingnumber="SWE 1219" name=" " ><Crew><Skipper name="P Sylvan, Carl (1987) GKSS" isaf="" /><Crewmember name="Hamel, Otto (1989) GKSS" /></Crew><Races totalpoints="31,00" ><Race number="1" points="12,00" /><Race number="2" points="7,00" /><Race number="3" points="10,00" /><Race number="4" points="2,00" /></Races></Boat><Boat preis="" position="12" sailingnumber="BRA 1137" name=" " ><Crew><Skipper name="Andre, Fonseca (1978) CDJ" isaf="http://www.sailing.org/biog.php?id=braff1" /><Crewmember name="Grael, Marco (1989) CBVM" /></Crew><Races totalpoints="32,00" ><Race number="1" points="8,00" /><Race number="2" points="11,00" /><Race number="3" points="7,00" /><Race number="4" points="6,00" /></Races></Boat><Boat preis="" position="13" sailingnumber="FRA 1048" name=" " ><Crew><Skipper name="GOURON, Glenn (1990) CNBPP" isaf="http://www.sailinLine truncated
|
||||
java/com.sap.sailing.kiworesultimport.test/src/com/sap/sailing/kiworesultimport/test/ParserTest.java
Executable
+38
@@ -0,0 +1,38 @@
|
||||
package com.sap.sailing.kiworesultimport.test;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Node;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
public class ParserTest {
|
||||
private static final String RESOURCES = "resources/";
|
||||
|
||||
private InputStream getInputStream(String filename) throws FileNotFoundException, IOException {
|
||||
return new FileInputStream(getFile(filename));
|
||||
}
|
||||
|
||||
private File getFile(String filename) {
|
||||
return new File(RESOURCES + filename);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testLoadingSampleXML() throws SAXException, IOException, ParserConfigurationException {
|
||||
Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder()
|
||||
.parse(getInputStream("2011-06-18_49er_Wettfahrt_2_Extra.xml"));
|
||||
assertNotNull(doc);
|
||||
Node resultList = doc.getElementsByTagName("ResultList").item(0);
|
||||
assertNotNull(resultList);
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.sap.sailing.kiworesultimport</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -0,0 +1,7 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
||||
@@ -0,0 +1,3 @@
|
||||
eclipse.preferences.version=1
|
||||
pluginProject.extensions=false
|
||||
resolve.requirebundle=false
|
||||
@@ -0,0 +1,9 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Kiworesultimport
|
||||
Bundle-SymbolicName: com.sap.sailing.kiworesultimport
|
||||
Bundle-Version: 1.0.0.qualifier
|
||||
Bundle-Vendor: SAP
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
Require-Bundle: com.sap.sailing.server
|
||||
Export-Package: com.sap.sailing.kiworesultimport
|
||||
@@ -0,0 +1,4 @@
|
||||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>root</artifactId>
|
||||
<groupId>com.sap.sailing</groupId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>com.sap.sailing.kiworesultimport</artifactId>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
</project>
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package com.sap.sailing.kiworesultimport;
|
||||
|
||||
public interface Boat extends Named {
|
||||
String getSailingNumber();
|
||||
|
||||
Integer getPosition();
|
||||
|
||||
String getPreis();
|
||||
}
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
package com.sap.sailing.kiworesultimport;
|
||||
|
||||
public interface Crewmember extends Named {
|
||||
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package com.sap.sailing.kiworesultimport;
|
||||
|
||||
public interface Named {
|
||||
String getName();
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package com.sap.sailing.kiworesultimport;
|
||||
|
||||
public interface Race {
|
||||
Double getPoints();
|
||||
|
||||
Double getNumber();
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package com.sap.sailing.kiworesultimport;
|
||||
|
||||
public interface Races {
|
||||
Double getTotalPoints();
|
||||
}
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
package com.sap.sailing.kiworesultimport;
|
||||
|
||||
public interface ResultList {
|
||||
String getLegende();
|
||||
|
||||
String getImagePfad();
|
||||
|
||||
String getStatus();
|
||||
|
||||
String getBoatClass();
|
||||
|
||||
String getEvent();
|
||||
|
||||
String getTime();
|
||||
|
||||
String getDate();
|
||||
}
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
package com.sap.sailing.kiworesultimport;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
public interface ResultListParser {
|
||||
ResultList parse(InputStream inputStream) throws SAXException, IOException, ParserConfigurationException;
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package com.sap.sailing.kiworesultimport;
|
||||
|
||||
import com.sap.sailing.kiworesultimport.impl.ResultListParserFactoryImpl;
|
||||
|
||||
public interface ResultListParserFactory {
|
||||
ResultListParserFactory INSTANCE = new ResultListParserFactoryImpl();
|
||||
|
||||
ResultListParser createResultListParser();
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package com.sap.sailing.kiworesultimport;
|
||||
|
||||
import java.net.URL;
|
||||
|
||||
public interface Skipper extends Named {
|
||||
URL getIsaf();
|
||||
}
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
package com.sap.sailing.kiworesultimport;
|
||||
|
||||
public interface Verteilung {
|
||||
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.sap.sailing.kiworesultimport.impl;
|
||||
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
public class AbstractNodeWrapper {
|
||||
private final Node node;
|
||||
|
||||
public AbstractNodeWrapper(Node node) {
|
||||
super();
|
||||
this.node = node;
|
||||
}
|
||||
|
||||
protected Node getNode() {
|
||||
return node;
|
||||
}
|
||||
}
|
||||
Executable
+53
@@ -0,0 +1,53 @@
|
||||
package com.sap.sailing.kiworesultimport.impl;
|
||||
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import com.sap.sailing.kiworesultimport.ResultList;
|
||||
|
||||
public class ResultListImpl extends AbstractNodeWrapper implements ResultList {
|
||||
public ResultListImpl(Node node) {
|
||||
super(node);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLegende() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getImagePfad() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getStatus() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBoatClass() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEvent() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTime() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDate() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package com.sap.sailing.kiworesultimport.impl;
|
||||
|
||||
import com.sap.sailing.kiworesultimport.ResultListParser;
|
||||
import com.sap.sailing.kiworesultimport.ResultListParserFactory;
|
||||
|
||||
public class ResultListParserFactoryImpl implements ResultListParserFactory {
|
||||
|
||||
@Override
|
||||
public ResultListParser createResultListParser() {
|
||||
return new ResultListParserImpl();
|
||||
}
|
||||
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.sap.sailing.kiworesultimport.impl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import com.sap.sailing.kiworesultimport.ResultList;
|
||||
import com.sap.sailing.kiworesultimport.ResultListParser;
|
||||
|
||||
public class ResultListParserImpl implements ResultListParser {
|
||||
private Document parseDocument(InputStream inputStream) throws SAXException, IOException, ParserConfigurationException {
|
||||
return DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(inputStream);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultList parse(InputStream inputStream) throws SAXException, IOException, ParserConfigurationException {
|
||||
Document doc = parseDocument(inputStream);
|
||||
ResultList result = new ResultListImpl(doc.getElementsByTagName("ResultList").item(0));
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
+4
-2
@@ -185,7 +185,9 @@ public class TestStoringAndLoadingEventsAndRegattas extends AbstractMongoDBTest
|
||||
rlbrcNames.append("; ");
|
||||
rlbrcNames.append(rlbrc.getName());
|
||||
}
|
||||
logger.info("columns in regatta leaderboard: "+rlbrcNames);
|
||||
logger.info("columns in regatta leaderboard for regatta "+regattaLeaderboard.getRegatta().getName()+" ("+
|
||||
regattaLeaderboard.getRegatta().hashCode()+"): "+rlbrcNames);
|
||||
logColumnsInRegatta(regattaLeaderboard.getRegatta());
|
||||
}
|
||||
|
||||
private void logColumnsInRegatta(Regatta regatta) {
|
||||
@@ -196,7 +198,7 @@ public class TestStoringAndLoadingEventsAndRegattas extends AbstractMongoDBTest
|
||||
rrcNames.append(raceColumn.getName());
|
||||
}
|
||||
}
|
||||
logger.info("columns in regatta: "+rrcNames);
|
||||
logger.info("columns in regatta "+regatta.getName()+" ("+regatta.hashCode()+") : "+rrcNames);
|
||||
}
|
||||
|
||||
private RacingEventServiceImpl createRacingEventServiceWithOneMockedTrackedRace(final TrackedRace q2YellowTrackedRace) {
|
||||
|
||||
@@ -53,6 +53,8 @@
|
||||
<module>com.sap.sailing.feature.runtime</module>
|
||||
<module>com.sap.sailing.feature.p2build</module>
|
||||
<module>org.moxieapps.gwt.highcharts</module>
|
||||
<module>com.sap.sailing.kiworesultimport</module>
|
||||
<module>com.sap.sailing.kiworesultimport.test</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
|
||||
Reference in new issue
Block a user