All Downloads are FREE. Search and download functionalities are using the official Maven repository.

at.gridgears.held.internal.parser.SuccessResultParser Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
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