Android Open Source - sunshine I Weather Data Parser






From Project

Back to project page sunshine.

License

The source code is released under:

Apache License

If you think the Android project sunshine listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.zmb.sunshine.data;
//from  w w w. j ava2  s  .c  o  m
import android.content.Context;

import java.net.MalformedURLException;
import java.net.URL;

/**
 * Parses weather data returned by a web service.
 */
public interface IWeatherDataParser {

    /**
     * Builds the URL to query for weather data.
     *
     * @param locationSetting the location to query for data
     * @param daysToFetch the number of days of data to query for
     * @return the URL to query
     * @throws MalformedURLException
     */
    public URL buildUrl(String locationSetting, int daysToFetch) throws MalformedURLException;

    /**
     * This method is responsible for parsing the API response
     * and inserting the resulting data into the database.
     *
     * @param c
     * @param data the API response
     * @param numberOfDays the number of days worth of data to parse
     * @throws WeatherParseException if an error occurs
     */
    public void parse(Context c, String data, int numberOfDays) throws WeatherParseException;

}




Java Source Code List

com.zmb.sunshine.ApplicationTest.java
com.zmb.sunshine.DetailActivity.java
com.zmb.sunshine.DetailFragment.java
com.zmb.sunshine.ForecastAdapter.java
com.zmb.sunshine.ForecastFragment.java
com.zmb.sunshine.MainActivity.java
com.zmb.sunshine.SettingsActivity.java
com.zmb.sunshine.SettingsFragment.java
com.zmb.sunshine.Sunshine.java
com.zmb.sunshine.data.AWeatherDataParser.java
com.zmb.sunshine.data.Convert.java
com.zmb.sunshine.data.DayForecast.java
com.zmb.sunshine.data.DayOfWeek.java
com.zmb.sunshine.data.IWeatherDataParser.java
com.zmb.sunshine.data.WeatherParseException.java
com.zmb.sunshine.data.WeatherProvider.java
com.zmb.sunshine.data.db.AndroidDatabaseManager.java
com.zmb.sunshine.data.db.WeatherContract.java
com.zmb.sunshine.data.db.WeatherDbHelper.java
com.zmb.sunshine.data.openweathermap.OpenWeatherMapParser.java
com.zmb.sunshine.data.worldweatheronline.WorldWeatherOnlineParser.java
com.zmb.sunshine.sync.DummyAuthenticatorService.java
com.zmb.sunshine.sync.DummyAuthenticator.java
com.zmb.sunshine.sync.SunshineSyncAdapter.java
com.zmb.sunshine.sync.SunshineSyncService.java
com.zmb.sunshine.widget.SunshineWidget.java
com.zmb.utils.IoUtils.java