at.gridgears.held.internal.parser.SuccessResultParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of held-api Show documentation
Show all versions of held-api Show documentation
API for Http Enabled Location Discovery (HELD)
package at.gridgears.held.internal.parser;
import at.gridgears.held.Location;
import at.gridgears.held.LocationReference;
import at.gridgears.schemas.held.LocationResponseType;
import org.apache.commons.lang3.tuple.Pair;
import java.util.List;
class SuccessResultParser {
private final LocationParser locationParser = new LocationParser();
private final LocationReferenceParser locationReferenceParser = new LocationReferenceParser();
Pair, List> parse(LocationResponseType locationResponseType) throws ResponseParsingException {
try {
List resultLocations = locationParser.parse(locationResponseType);
List resultReferences = locationReferenceParser.parse(locationResponseType);
return Pair.of(resultLocations, resultReferences);
} catch (Exception e) {
throw new ResponseParsingException("Error parsing LocationResponseType", e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy