// Path: GreekReference/src/main/java/com/benlinskey/greekreference/data/appdata/AppDataContract.java
// public final class AppDataContract {
// 
//     /**
//      * Empty private constructor to prevent instantiation.
//      */
//     private AppDataContract() {}
// 
//     /**
//      * A contract class for the lexicon history table.
//      */
//     public static abstract class LexiconHistory implements BaseColumns {
//         public static final String TABLE_NAME = "lexicon_history";
//         public static final String COLUMN_NAME_LEXICON_ID = "lexiconID";
//         public static final String COLUMN_NAME_WORD = "word";
//         public static final Uri CONTENT_URI = LexiconHistoryProvider.CONTENT_URI;
//     }
// 
//     /**
//      * A contract class for the lexicon favorites table.
//      */
//     public static abstract class LexiconFavorites implements BaseColumns {
//         public static final String TABLE_NAME = "lexicon_favorites";
//         public static final String COLUMN_NAME_LEXICON_ID = "lexiconID";
//         public static final String COLUMN_NAME_WORD = "word";
//         public static final Uri CONTENT_URI = LexiconFavoritesProvider.CONTENT_URI;
//     }
// 
//     /**
//      * A contract class for the syntax bookmarks table.
//      */
//     public static abstract class SyntaxBookmarks implements BaseColumns {
//         public static final String TABLE_NAME = "syntax_bookmarks";
//         public static final String COLUMN_NAME_SYNTAX_ID = "syntax_id";
//         public static final String COLUMN_NAME_SYNTAX_SECTION = "syntax_section";
//         public static final Uri CONTENT_URI = SyntaxBookmarksProvider.CONTENT_URI;
//     }
// }
// 
// Path: GreekReference/src/main/java/com/benlinskey/greekreference/data/syntax/SyntaxContract.java
// public final class SyntaxContract implements BaseColumns {
//     // TODO: Move content URI to this class.
//     
//     public static final Uri CONTENT_URI = SyntaxProvider.CONTENT_URI;
//     public static final String DB_NAME = "syntax";
//     public static final String TABLE_NAME = "syntax";
//     public static final String COLUMN_NAME_CHAPTER = "chapter";
//     public static final String COLUMN_NAME_SECTION = "section";
//     public static final String COLUMN_NAME_XML = "xml";
// 
//     /**
//      * Empty private construtor to prevent instantiation.
//      */
//     private SyntaxContract() {}
// }
// 
// Path: GreekReference/src/main/java/com/benlinskey/greekreference/views/detail/syntax/SyntaxDetailView.java
// public interface SyntaxDetailView extends DetailView {
// 
//     int getSelectedSyntaxId();
// }


import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.ListView;
import com.benlinskey.greekreference.R;
import com.benlinskey.greekreference.data.appdata.AppDataContract;
import com.benlinskey.greekreference.data.syntax.SyntaxContract;
import com.benlinskey.greekreference.views.detail.syntax.SyntaxDetailView;

        String msg = mContext.getString(R.string.toast_bookmark_removed);
        mView.displayToast(msg);
    }

    public void onClearBookmarks() {
        mResolver.delete(AppDataContract.SyntaxBookmarks.CONTENT_URI, null, null);

        String msg = mContext.getString(R.string.toast_clear_syntax_bookmarks);
        mView.displayToast(msg);
    }

    /**
     * Returns the section title corresponding to the specified syntax ID.
     * @param id the syntax ID for which to search
     * @return the corresponding section title
     */
    private String getSectionFromId(int id) {
        String[] projection = {SyntaxContract.COLUMN_NAME_SECTION};
        String selection = SyntaxContract._ID + " = ?";
        String[] selectionArgs = {Integer.toString(id)};
        Uri uri = SyntaxContract.CONTENT_URI;
        Cursor cursor = mResolver.query(uri, projection, selection, selectionArgs, null);

        if (cursor == null) {
            throw new NullPointerException("ContentResolver#query() returned null");
        }

        String section;
        if (cursor.moveToFirst()) {
// Path: GreekReference/src/main/java/com/benlinskey/greekreference/data/appdata/AppDataContract.java
// public final class AppDataContract {
// 
//     /**
//      * Empty private constructor to prevent instantiation.
//      */
//     private AppDataContract() {}
// 
//     /**
//      * A contract class for the lexicon history table.
//      */
//     public static abstract class LexiconHistory implements BaseColumns {
//         public static final String TABLE_NAME = "lexicon_history";
//         public static final String COLUMN_NAME_LEXICON_ID = "lexiconID";
//         public static final String COLUMN_NAME_WORD = "word";
//         public static final Uri CONTENT_URI = LexiconHistoryProvider.CONTENT_URI;
//     }
// 
//     /**
//      * A contract class for the lexicon favorites table.
//      */
//     public static abstract class LexiconFavorites implements BaseColumns {
//         public static final String TABLE_NAME = "lexicon_favorites";
//         public static final String COLUMN_NAME_LEXICON_ID = "lexiconID";
//         public static final String COLUMN_NAME_WORD = "word";
//         public static final Uri CONTENT_URI = LexiconFavoritesProvider.CONTENT_URI;
//     }
// 
//     /**
//      * A contract class for the syntax bookmarks table.
//      */
//     public static abstract class SyntaxBookmarks implements BaseColumns {
//         public static final String TABLE_NAME = "syntax_bookmarks";
//         public static final String COLUMN_NAME_SYNTAX_ID = "syntax_id";
//         public static final String COLUMN_NAME_SYNTAX_SECTION = "syntax_section";
//         public static final Uri CONTENT_URI = SyntaxBookmarksProvider.CONTENT_URI;
//     }
// }
// 
// Path: GreekReference/src/main/java/com/benlinskey/greekreference/data/syntax/SyntaxContract.java
// public final class SyntaxContract implements BaseColumns {
//     // TODO: Move content URI to this class.
//     
//     public static final Uri CONTENT_URI = SyntaxProvider.CONTENT_URI;
//     public static final String DB_NAME = "syntax";
//     public static final String TABLE_NAME = "syntax";
//     public static final String COLUMN_NAME_CHAPTER = "chapter";
//     public static final String COLUMN_NAME_SECTION = "section";
//     public static final String COLUMN_NAME_XML = "xml";
// 
//     /**
//      * Empty private construtor to prevent instantiation.
//      */
//     private SyntaxContract() {}
// }
// 
// Path: GreekReference/src/main/java/com/benlinskey/greekreference/views/detail/syntax/SyntaxDetailView.java
// public interface SyntaxDetailView extends DetailView {
// 
//     int getSelectedSyntaxId();
// }


// Path: GreekReference/src/main/java/com/benlinskey/greekreference/presenters/SyntaxPresenter.java
import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.ListView;
import com.benlinskey.greekreference.R;
import com.benlinskey.greekreference.data.appdata.AppDataContract;
import com.benlinskey.greekreference.data.syntax.SyntaxContract;
import com.benlinskey.greekreference.views.detail.syntax.SyntaxDetailView;


        String msg = mContext.getString(R.string.toast_bookmark_removed);
        mView.displayToast(msg);
    }

    public void onClearBookmarks() {
        mResolver.delete(AppDataContract.SyntaxBookmarks.CONTENT_URI, null, null);

        String msg = mContext.getString(R.string.toast_clear_syntax_bookmarks);
        mView.displayToast(msg);
    }

    /**
     * Returns the section title corresponding to the specified syntax ID.
     * @param id the syntax ID for which to search
     * @return the corresponding section title
     */
    private String getSectionFromId(int id) {
        String[] projection = {SyntaxContract.COLUMN_NAME_SECTION};
        String selection = SyntaxContract._ID + " = ?";
        String[] selectionArgs = {Integer.toString(id)};
        Uri uri = SyntaxContract.CONTENT_URI;
        Cursor cursor = mResolver.query(uri, projection, selection, selectionArgs, null);

        if (cursor == null) {
            throw new NullPointerException("ContentResolver#query() returned null");
        }

        String section;
        if (cursor.moveToFirst()) {
            section = cursor.getString(0);