From 8aecb3bef965bc603e0be833b6eefd4c857f06c1 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Wed, 15 Apr 2015 23:29:24 +0200 Subject: javadoc Taize --- app/src/main/java/com/camilstaps/taize/Taize.java | 52 ++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/src/main/java/com/camilstaps/taize/Taize.java b/app/src/main/java/com/camilstaps/taize/Taize.java index 9ab91af..1f902e0 100644 --- a/app/src/main/java/com/camilstaps/taize/Taize.java +++ b/app/src/main/java/com/camilstaps/taize/Taize.java @@ -36,7 +36,7 @@ public class Taize { private static final int MAX_DIFFDATE_READING = 10; /** - * Fetch the bible text corresponding to the daily reading + * Get the bible text corresponding to the daily reading of a certain date * @param context * @param listener */ @@ -51,6 +51,12 @@ public class Taize { fetchDailyReadingBibleText(context, listener, date); } + /** + * Fetch the bible text corresponding to the daily reading of a certain date + * @param context + * @param listener + * @param date + */ private static void fetchDailyReadingBibleText(final Context context, final Listener listener, final Date date) { DatedStringPreferenceSet.add(context, "dailyreadingbibletexts", new DatedString(date, "Fetching bible text...")); @@ -104,6 +110,12 @@ public class Taize { fetchEnglishDailyReading(context, listener, date); } + /** + * Fetch the English daily reading (needed for the English Bible reference) + * @param context + * @param listener + * @param date + */ private static void fetchEnglishDailyReading(final Context context, final Listener listener, final Date date) { RetrieveFeedTask retrieve = new RetrieveFeedTask(); @@ -138,6 +150,12 @@ public class Taize { } + /** + * Get the daily reading of a Date + * @param context + * @param listener + * @param date + */ public static void getDailyReading(final Context context, final Listener listener, Date date) { Set dailyReadings = (Set) DatedStringPreferenceSet.get(context, "dailyreadings", DailyReading.class); @@ -153,6 +171,12 @@ public class Taize { } + /** + * Fetch the daily reading of a Date + * @param context + * @param listener + * @param date + */ private static void fetchDailyReading(final Context context, final Listener listener, final Date date) { RetrieveFeedTask retrieve = new RetrieveFeedTask(); @@ -190,6 +214,12 @@ public class Taize { } + /** + * Get the daily meditation of a date + * @param context + * @param listener + * @param date + */ public static void getDailyMeditation(final Context context, final Listener listener, Date date) { Set dailyMeditations = (Set) DatedStringPreferenceSet.get(context, "dailymeditations", DailyMeditation.class); @@ -205,6 +235,12 @@ public class Taize { } + /** + * Fetch the daily meditation of a date + * @param context + * @param listener + * @param date + */ private static void fetchDailyMeditation(final Context context, final Listener listener, final Date date) { RetrieveFeedTask retrieve = new RetrieveFeedTask(); @@ -244,6 +280,11 @@ public class Taize { } + /** + * Get the podcasts + * @param context + * @param listener + */ public static void getPodcasts(final Context context, final Listener> listener) { RetrieveFeedTask retrieve = new RetrieveFeedTask(); @@ -283,12 +324,21 @@ public class Taize { } + /** + * Clean text sets to remove texts related to dates too far away + * @param context + */ public static void cleanTextSets(Context context) { cleanDailyReadingsSet(context, "dailyreadings"); cleanDailyReadingsSet(context, "englishdailyreadings"); //DatedStringPreferenceSet.clear(context, "dailyreadingbibletexts"); } + /** + * Clean a specific DatedStringPreferenceSet to remove duplicate items and items related to dates too far away + * @param context + * @param key + */ public static void cleanDailyReadingsSet(Context context, String key) { Set set = (Set) DatedStringPreferenceSet.get(context, key, DailyReading.class); Iterator iterator = set.iterator(); -- cgit v1.2.3