
at.gridgears.held.internal.parser.SuccessResultParser Maven / Gradle / Ivy
package at.gridgears.held.internal.parser;
import at.gridgears.held.CivicAddress;
import at.gridgears.held.Location;
import at.gridgears.held.LocationReference;
import at.gridgears.schemas.held.LocationResponseType;
import org.apache.commons.lang3.tuple.Triple;
import java.util.List;
class SuccessResultParser {
private final LocationParser locationParser = new LocationParser();
private final CivicAddressParser civicAddressParser = new CivicAddressParser();
private final LocationReferenceParser locationReferenceParser = new LocationReferenceParser();
Triple, List, List> parse(LocationResponseType locationResponseType) throws ResponseParsingException {
try {
List resultLocations = locationParser.parse(locationResponseType);
List resultCivicAddresses = civicAddressParser.parse(locationResponseType);
List resultReferences = locationReferenceParser.parse(locationResponseType);
return Triple.of(resultLocations, resultCivicAddresses, resultReferences);
} catch (Exception e) {
throw new ResponseParsingException("Error parsing LocationResponseType", e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy