mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-09 13:50:57 +00:00
hasResults... implemented and tested
This commit is contained in:
1 parent
3261d49d92
commit
cd432f8a1d
12 files changed
+190
-62
No files matched your search
+36
@@ -1,12 +1,17 @@
|
||||
package com.sap.sailing.odf.resultimport.test;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
@@ -16,14 +21,19 @@ import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Node;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import com.sap.sailing.domain.common.TimePoint;
|
||||
import com.sap.sailing.domain.common.impl.Util.Pair;
|
||||
import com.sap.sailing.odf.resultimport.Competition;
|
||||
import com.sap.sailing.odf.resultimport.CumulativeResult;
|
||||
import com.sap.sailing.odf.resultimport.CumulativeResultDocumentProvider;
|
||||
import com.sap.sailing.odf.resultimport.OdfBody;
|
||||
import com.sap.sailing.odf.resultimport.OdfBodyParser;
|
||||
import com.sap.sailing.odf.resultimport.ParserFactory;
|
||||
import com.sap.sailing.odf.resultimport.impl.ScoreCorrectionProviderImpl;
|
||||
|
||||
public class ParserTest {
|
||||
private static final String SAMPLE_INPUT_NAME = "SAM004000_DT_CUMULATIVE_RESULT_SAM004000_1.0.xml";
|
||||
private static final String SAMPLE_INPUT_NAME2 = "SAM007000_DT_CUMULATIVE_RESULT_SAM007000_1.0.xml";
|
||||
private static final String RESOURCES = "resources/";
|
||||
|
||||
private InputStream getInputStream(String filename) throws FileNotFoundException, IOException {
|
||||
@@ -33,6 +43,19 @@ public class ParserTest {
|
||||
private File getFile(String filename) {
|
||||
return new File(RESOURCES + filename);
|
||||
}
|
||||
|
||||
private CumulativeResultDocumentProvider getTestDocumentProvider() {
|
||||
return new CumulativeResultDocumentProvider() {
|
||||
@Override
|
||||
public Iterable<InputStream> getAllAvailableCumulativeResultDocuments() {
|
||||
try {
|
||||
return Arrays.asList(new InputStream[] { getInputStream(SAMPLE_INPUT_NAME), getInputStream(SAMPLE_INPUT_NAME2) });
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testLoadingSampleXML() throws SAXException, IOException, ParserConfigurationException {
|
||||
@@ -53,11 +76,24 @@ public class ParserTest {
|
||||
OdfBody body = parser.parse(getSampleInputStream(), SAMPLE_INPUT_NAME);
|
||||
assertNotNull(body);
|
||||
Iterable<Competition> competitions = body.getCompetitions();
|
||||
final Map<String, CumulativeResult> results = new HashMap<>();
|
||||
for (Competition competition : competitions) {
|
||||
for (CumulativeResult cumulativeResult : competition.getCumulativeResults()) {
|
||||
System.out.println(cumulativeResult);
|
||||
results.put(cumulativeResult.getCompetitorCode(), cumulativeResult);
|
||||
}
|
||||
}
|
||||
assertTrue(results.containsKey("1094919"));
|
||||
assertTrue(results.containsKey("262797"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testScoreCorrectionProviderFeeding() throws IOException, SAXException, ParserConfigurationException {
|
||||
ScoreCorrectionProviderImpl scoreCorrectionProvider = new ScoreCorrectionProviderImpl(getTestDocumentProvider(),
|
||||
ParserFactory.INSTANCE);
|
||||
Map<String, Set<Pair<String, TimePoint>>> hasResultsFor = scoreCorrectionProvider.getHasResultsForBoatClassFromDateByEventName();
|
||||
assertTrue(hasResultsFor.containsKey("Star"));
|
||||
assertTrue(hasResultsFor.containsKey("Laser"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,5 +8,6 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
Import-Package: org.osgi.framework;version="1.6.0",
|
||||
org.w3c.dom
|
||||
Require-Bundle: com.sap.sailing.domain.common,
|
||||
com.sap.sailing.domain
|
||||
com.sap.sailing.domain,
|
||||
com.sap.sailing.domain.swisstimingadapter
|
||||
Bundle-Activator: com.sap.sailing.odf.resultimport.impl.Activator
|
||||
+1
-1
@@ -19,7 +19,7 @@ public interface CumulativeResult {
|
||||
* Somewhat like the sail number, however prefixed by the competition ID, e.g., "SAM007CRO01" meaning
|
||||
* "Sailing, boat class 007 (Star), country code CRO, boat 01"
|
||||
*/
|
||||
String getCode();
|
||||
String getCompetitorCode();
|
||||
|
||||
CountryCode getCountryCode();
|
||||
|
||||
|
||||
+18
@@ -1,5 +1,23 @@
|
||||
package com.sap.sailing.odf.resultimport;
|
||||
|
||||
import com.sap.sailing.domain.common.TimePoint;
|
||||
|
||||
public interface OdfBody {
|
||||
Iterable<Competition> getCompetitions();
|
||||
|
||||
String getDocumentSubtype();
|
||||
|
||||
String getResultStatus();
|
||||
|
||||
String getVersion();
|
||||
|
||||
String getFeedFlag();
|
||||
|
||||
TimePoint getTimePoint();
|
||||
|
||||
String getVenue();
|
||||
|
||||
String getEventName();
|
||||
|
||||
String getBoatClassName();
|
||||
}
|
||||
+2
-1
@@ -1,9 +1,10 @@
|
||||
package com.sap.sailing.odf.resultimport;
|
||||
|
||||
import com.sap.sailing.domain.swisstimingadapter.DomainFactory;
|
||||
import com.sap.sailing.odf.resultimport.impl.ParserFactoryImpl;
|
||||
|
||||
public interface ParserFactory {
|
||||
ParserFactory INSTANCE = new ParserFactoryImpl();
|
||||
ParserFactory INSTANCE = new ParserFactoryImpl(DomainFactory.INSTANCE);
|
||||
|
||||
OdfBodyParser createOdfBodyParser();
|
||||
}
|
||||
+2
-1
@@ -8,6 +8,7 @@ import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.sap.sailing.domain.common.ScoreCorrectionProvider;
|
||||
import com.sap.sailing.odf.resultimport.CumulativeResultDocumentProvider;
|
||||
import com.sap.sailing.odf.resultimport.ParserFactory;
|
||||
|
||||
public class Activator implements BundleActivator {
|
||||
private static final Logger logger = Logger.getLogger(Activator.class.getName());
|
||||
@@ -27,7 +28,7 @@ public class Activator implements BundleActivator {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
});
|
||||
}, ParserFactory.INSTANCE);
|
||||
context.registerService(ScoreCorrectionProvider.class,
|
||||
service, /* properties */ null);
|
||||
logger.info("Scanning "+scanDirPath+" for official result lists of "+service.getName());
|
||||
|
||||
+2
-2
@@ -49,7 +49,7 @@ public class CumulativeResultImpl extends AbstractNodeWrapper implements Cumulat
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCode() {
|
||||
public String getCompetitorCode() {
|
||||
return competitor.getCode();
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ public class CumulativeResultImpl extends AbstractNodeWrapper implements Cumulat
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Cumulative Results for competitor "+getCode()+" ("+getCountryCode()+") "+getAthletes()+": Rank: "+getRank()+", Result: "+getResult()+", sort order "+getSortOrder()
|
||||
return "Cumulative Results for competitor "+getCompetitorCode()+" ("+getCountryCode()+") "+getAthletes()+": Rank: "+getRank()+", Result: "+getResult()+", sort order "+getSortOrder()
|
||||
+", race results: "+getPointsAndRanksAfterEachRace()+", medal race results: "+getPointsInMedalRace();
|
||||
}
|
||||
|
||||
|
||||
+15
-42
@@ -1,32 +1,29 @@
|
||||
package com.sap.sailing.odf.resultimport.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.sap.sailing.domain.common.MaxPointsReason;
|
||||
import com.sap.sailing.domain.common.RegattaScoreCorrections;
|
||||
import com.sap.sailing.domain.common.ScoreCorrectionProvider;
|
||||
import com.sap.sailing.odf.resultimport.Boat;
|
||||
import com.sap.sailing.odf.resultimport.BoatResultInRace;
|
||||
import com.sap.sailing.odf.resultimport.Crewmember;
|
||||
import com.sap.sailing.odf.resultimport.RaceSummary;
|
||||
import com.sap.sailing.odf.resultimport.RegattaSummary;
|
||||
import com.sap.sailing.odf.resultimport.Competition;
|
||||
import com.sap.sailing.odf.resultimport.OdfBody;
|
||||
|
||||
public class RegattaSummaryAsScoreCorrections implements RegattaScoreCorrections {
|
||||
private final RegattaSummary regattaSummary;
|
||||
public class OdfBodyAsScoreCorrections implements RegattaScoreCorrections {
|
||||
private final OdfBody body;
|
||||
private final ScoreCorrectionProvider provider;
|
||||
|
||||
public RegattaSummaryAsScoreCorrections(RegattaSummary regattaSummary, ScoreCorrectionProvider provider) {
|
||||
public OdfBodyAsScoreCorrections(OdfBody body, ScoreCorrectionProvider provider) {
|
||||
super();
|
||||
this.regattaSummary = regattaSummary;
|
||||
this.body = body;
|
||||
this.provider = provider;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRegattaName() {
|
||||
return regattaSummary.getEventName()+" ("+regattaSummary.getBoatClassName()+")";
|
||||
return body.getEventName()+" ("+body.getBoatClassName()+")";
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -37,56 +34,32 @@ public class RegattaSummaryAsScoreCorrections implements RegattaScoreCorrections
|
||||
@Override
|
||||
public Iterable<ScoreCorrectionsForRace> getScoreCorrectionsForRaces() {
|
||||
List<ScoreCorrectionsForRace> result = new ArrayList<ScoreCorrectionsForRace>();
|
||||
for (RaceSummary raceSummary : regattaSummary.getRaces()) {
|
||||
result.add(new ZipFileScoreCorrectionsForRace(raceSummary));
|
||||
for (Competition competition : body.getCompetitions()) {
|
||||
result.add(new ZipFileScoreCorrectionsForRace(competition));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private class ZipFileScoreCorrectionsForRace implements ScoreCorrectionsForRace {
|
||||
private final RaceSummary raceSummary;
|
||||
private final Competition competition;
|
||||
|
||||
public ZipFileScoreCorrectionsForRace(RaceSummary raceSummary) {
|
||||
this.raceSummary = raceSummary;
|
||||
public ZipFileScoreCorrectionsForRace(Competition competition) {
|
||||
this.competition = competition;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRaceNameOrNumber() {
|
||||
return ""+raceSummary.getRaceNumber();
|
||||
return null; // TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> getSailIDs() {
|
||||
Set<String> result = new HashSet<String>();
|
||||
for (Boat boat : raceSummary.getBoats()) {
|
||||
result.add(boat.getSailingNumber());
|
||||
}
|
||||
return result;
|
||||
return null; // TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScoreCorrectionForCompetitorInRace getScoreCorrectionForCompetitor(String sailID) {
|
||||
ScoreCorrectionForCompetitorInRace result = null;
|
||||
final Boat boat = raceSummary.getBoat(sailID);
|
||||
if (boat != null) {
|
||||
String boatName = getNameForBoat(boat);
|
||||
result = new ZipFileScoreCorrectionForCompetitorInRace(raceSummary.getBoatResults(boat), sailID, boatName);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private String getNameForBoat(Boat boat) {
|
||||
String result = boat.getName(); // often empty
|
||||
if (result == null || result.trim().length() == 0) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(boat.getCrew().getSkipper().getName());
|
||||
for (Crewmember crewmember : boat.getCrew().getCrewmembers()) {
|
||||
sb.append(" + ");
|
||||
sb.append(crewmember.getName());
|
||||
}
|
||||
result = sb.toString();
|
||||
}
|
||||
return result;
|
||||
return null; // TODO
|
||||
}
|
||||
}
|
||||
|
||||
+70
-1
@@ -1,18 +1,31 @@
|
||||
package com.sap.sailing.odf.resultimport.impl;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
||||
import com.sap.sailing.domain.base.impl.MillisecondsTimePoint;
|
||||
import com.sap.sailing.domain.common.TimePoint;
|
||||
import com.sap.sailing.domain.swisstimingadapter.DomainFactory;
|
||||
import com.sap.sailing.odf.resultimport.Competition;
|
||||
import com.sap.sailing.odf.resultimport.OdfBody;
|
||||
|
||||
public class OdfBodyImpl extends AbstractNodeWrapper implements OdfBody {
|
||||
public OdfBodyImpl(Node node) {
|
||||
private static final Logger logger = Logger.getLogger(OdfBodyImpl.class.getName());
|
||||
|
||||
private final DomainFactory swissTimingDomainFactory;
|
||||
private static final DateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmssSSS");
|
||||
|
||||
public OdfBodyImpl(Node node, DomainFactory swissTimingDomainFactory) {
|
||||
super(node);
|
||||
this.swissTimingDomainFactory = swissTimingDomainFactory;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -25,4 +38,60 @@ public class OdfBodyImpl extends AbstractNodeWrapper implements OdfBody {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDocumentSubtype() {
|
||||
return getNode().getAttributes().getNamedItem("DocumentSubtype").getNodeValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getResultStatus() {
|
||||
return getNode().getAttributes().getNamedItem("ResultStatus").getNodeValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getVersion() {
|
||||
return getNode().getAttributes().getNamedItem("Version").getNodeValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFeedFlag() {
|
||||
return getNode().getAttributes().getNamedItem("FeedFlag").getNodeValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TimePoint getTimePoint() {
|
||||
TimePoint result;
|
||||
String timeString = getNode().getAttributes().getNamedItem("Time").getNodeValue();
|
||||
String dateString = getNode().getAttributes().getNamedItem("Date").getNodeValue();
|
||||
try {
|
||||
result = new MillisecondsTimePoint(dateFormat.parse(dateString+timeString));
|
||||
} catch (ParseException e) {
|
||||
logger.throwing(OdfBodyImpl.class.getName(), "getTimePoint", e);
|
||||
result = null;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getVenue() {
|
||||
return getNode().getAttributes().getNamedItem("Venue").getNodeValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEventName() {
|
||||
return getDocumentSubtype()+"@"+getVenue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBoatClassName() {
|
||||
return swissTimingDomainFactory.getOrCreateBoatClassFromRaceID(getDocumentSubtype()).getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "OdfBody for event "+getEventName()+", result status "+getResultStatus()+
|
||||
"@"+getTimePoint()+", version "+getVersion()+" for boat class "+getBoatClassName()+
|
||||
". Competitions: "+getCompetitions();
|
||||
}
|
||||
}
|
||||
+8
-1
@@ -9,11 +9,18 @@ import javax.xml.parsers.ParserConfigurationException;
|
||||
import org.w3c.dom.Document;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import com.sap.sailing.domain.swisstimingadapter.DomainFactory;
|
||||
import com.sap.sailing.odf.resultimport.OdfBodyParser;
|
||||
import com.sap.sailing.odf.resultimport.OdfBody;
|
||||
|
||||
public class OdfBodyParserImpl implements OdfBodyParser {
|
||||
|
||||
private final DomainFactory swissTimingDomainFactory;
|
||||
|
||||
public OdfBodyParserImpl(DomainFactory swissTimingDomainFactory) {
|
||||
this.swissTimingDomainFactory = swissTimingDomainFactory;
|
||||
}
|
||||
|
||||
private Document parseDocument(InputStream inputStream) throws SAXException, IOException, ParserConfigurationException {
|
||||
return DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(inputStream);
|
||||
}
|
||||
@@ -21,7 +28,7 @@ public class OdfBodyParserImpl implements OdfBodyParser {
|
||||
@Override
|
||||
public OdfBody parse(InputStream inputStream, String sourceName) throws SAXException, IOException, ParserConfigurationException {
|
||||
Document doc = parseDocument(inputStream);
|
||||
OdfBody result = new OdfBodyImpl(doc.getElementsByTagName("OdfBody").item(0));
|
||||
OdfBody result = new OdfBodyImpl(doc.getElementsByTagName("OdfBody").item(0), swissTimingDomainFactory);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
+8
-1
@@ -1,12 +1,19 @@
|
||||
package com.sap.sailing.odf.resultimport.impl;
|
||||
|
||||
import com.sap.sailing.domain.swisstimingadapter.DomainFactory;
|
||||
import com.sap.sailing.odf.resultimport.OdfBodyParser;
|
||||
import com.sap.sailing.odf.resultimport.ParserFactory;
|
||||
|
||||
public class ParserFactoryImpl implements ParserFactory {
|
||||
private final DomainFactory swissTimingDomainFactory;
|
||||
|
||||
public ParserFactoryImpl(DomainFactory swissTimingDomainFactory) {
|
||||
super();
|
||||
this.swissTimingDomainFactory = swissTimingDomainFactory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OdfBodyParser createOdfBodyParser() {
|
||||
return new OdfBodyParserImpl();
|
||||
return new OdfBodyParserImpl(swissTimingDomainFactory);
|
||||
}
|
||||
}
|
||||
+26
-11
@@ -2,7 +2,10 @@ package com.sap.sailing.odf.resultimport.impl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -17,7 +20,7 @@ import com.sap.sailing.domain.common.impl.Util.Pair;
|
||||
import com.sap.sailing.odf.resultimport.CumulativeResultDocumentProvider;
|
||||
import com.sap.sailing.odf.resultimport.OdfBody;
|
||||
import com.sap.sailing.odf.resultimport.OdfBodyParser;
|
||||
import com.sap.sailing.odf.resultimport.RegattaSummary;
|
||||
import com.sap.sailing.odf.resultimport.ParserFactory;
|
||||
|
||||
public class ScoreCorrectionProviderImpl implements ScoreCorrectionProvider {
|
||||
private static final long serialVersionUID = -4596215011753860781L;
|
||||
@@ -29,9 +32,12 @@ public class ScoreCorrectionProviderImpl implements ScoreCorrectionProvider {
|
||||
* {@link ZipFileParser} for analysis.
|
||||
*/
|
||||
private final CumulativeResultDocumentProvider documentProvider;
|
||||
|
||||
private final ParserFactory parserFactory;
|
||||
|
||||
public ScoreCorrectionProviderImpl(CumulativeResultDocumentProvider documentProvider) {
|
||||
public ScoreCorrectionProviderImpl(CumulativeResultDocumentProvider documentProvider, ParserFactory parserFactory) {
|
||||
this.documentProvider = documentProvider;
|
||||
this.parserFactory = parserFactory;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -43,7 +49,15 @@ public class ScoreCorrectionProviderImpl implements ScoreCorrectionProvider {
|
||||
public Map<String, Set<Pair<String, TimePoint>>> getHasResultsForBoatClassFromDateByEventName()
|
||||
throws IOException, SAXException, ParserConfigurationException {
|
||||
Map<String, Set<Pair<String, TimePoint>>> result = new HashMap<String, Set<Pair<String, TimePoint>>>();
|
||||
// TODO find out how we can tell "all" available ODF results
|
||||
for (OdfBody body : getAllOdfBodies()) {
|
||||
String boatClassName = body.getBoatClassName();
|
||||
Set<Pair<String, TimePoint>> set = result.get(boatClassName);
|
||||
if (set == null) {
|
||||
set = new HashSet<>();
|
||||
result.put(boatClassName, set);
|
||||
}
|
||||
set.add(new Pair<String, TimePoint>(body.getEventName(), body.getTimePoint()));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -51,22 +65,23 @@ public class ScoreCorrectionProviderImpl implements ScoreCorrectionProvider {
|
||||
public RegattaScoreCorrections getScoreCorrections(String eventName, String boatClassName,
|
||||
TimePoint timePointPublished) throws IOException, SAXException, ParserConfigurationException {
|
||||
// TODO find out
|
||||
for (RegattaSummary regattaSummary : getAllRegattaSummaries()) {
|
||||
if (regattaSummary.getEventName().equals(eventName) && regattaSummary.getBoatClassName().equals(boatClassName) &&
|
||||
regattaSummary.getTimePointPublished().equals(timePointPublished)) {
|
||||
return new RegattaSummaryAsScoreCorrections(regattaSummary, this);
|
||||
for (OdfBody body : getAllOdfBodies()) {
|
||||
if (body.getEventName().equals(eventName) && body.getBoatClassName().equals(boatClassName) &&
|
||||
body.getTimePoint().equals(timePointPublished)) {
|
||||
return new OdfBodyAsScoreCorrections(body, this);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private Iterable<RegattaSummary> getAllRegattaSummaries() throws SAXException, IOException, ParserConfigurationException {
|
||||
private Iterable<OdfBody> getAllOdfBodies() throws SAXException, IOException, ParserConfigurationException {
|
||||
List<OdfBody> result = new ArrayList<>();
|
||||
for (InputStream is : documentProvider.getAllAvailableCumulativeResultDocuments()) {
|
||||
OdfBodyParser parser = new OdfBodyParserImpl();
|
||||
OdfBodyParser parser = parserFactory.createOdfBodyParser();
|
||||
OdfBody body = parser.parse(is, getName());
|
||||
result.add(body);
|
||||
}
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user