diff --git a/enabler/src/de/schildbach/pte/AbstractTsiProvider.java b/enabler/src/de/schildbach/pte/AbstractTsiProvider.java new file mode 100644 index 00000000..06853752 --- /dev/null +++ b/enabler/src/de/schildbach/pte/AbstractTsiProvider.java @@ -0,0 +1,813 @@ +/* + * Copyright 2014 Kjell Braden + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.schildbach.pte; + +import java.io.IOException; +import java.text.DateFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Collection; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Set; +import java.util.TimeZone; + +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import de.schildbach.pte.dto.Line; +import de.schildbach.pte.dto.Location; +import de.schildbach.pte.dto.LocationType; +import de.schildbach.pte.dto.NearbyStationsResult; +import de.schildbach.pte.dto.Point; +import de.schildbach.pte.dto.Product; +import de.schildbach.pte.dto.QueryDeparturesResult; +import de.schildbach.pte.dto.QueryTripsContext; +import de.schildbach.pte.dto.QueryTripsResult; +import de.schildbach.pte.dto.ResultHeader; +import de.schildbach.pte.dto.Stop; +import de.schildbach.pte.dto.Trip; +import de.schildbach.pte.exception.ParserException; +import de.schildbach.pte.util.ParserUtils; + +/** + * @author Kjell Braden + */ +public abstract class AbstractTsiProvider extends AbstractNetworkProvider +{ + private static class Context implements QueryTripsContext + { + private static final long serialVersionUID = -6847355540229473013L; + + public final Accessibility accessibility; + public final Location from; + public final Set