// Path: compass/src/main/gen/org/tndata/android/compass/R.java
// public final class R {
// }
// 
// Path: compass/src/main/java/org/tndata/android/compass/parser/ParserModels.java
// public final class ParserModels{
//     private abstract class ListResultSet implements ResultSet{
//         public int count;
//         public String previous;
//         public String next;
//     }
// 
//     public final class UserResultSet implements ResultSet{
//         public List<User> results;
//     }
// 
//     public final class FeedDataResultSet implements ResultSet{
//         public List<FeedData> results;
//     }
// 
//     public final class CategoryContentResultSet implements ResultSet{
//         public List<TDCCategory> results;
//     }
// 
//     public final class CustomGoalsResultSet extends ListResultSet{
//         public List<CustomGoal> results;
//     }
// 
//     public final class UserGoalsResultSet extends ListResultSet{
//         public List<UserGoal> results;
//     }
// 
//     public final class DailyProgressResultSet implements ResultSet{
//         public List<DailyProgress> results;
//     }
// 
//     public final class GoalContentResultSet extends ListResultSet{
//         public List<TDCGoal> results;
//     }
// 
//     public final class UserActionResultSet extends ListResultSet{
//         public List<UserAction> results;
//     }
// 
//     public final class CustomActionResultSet extends ListResultSet{
//         public List<CustomAction> results;
//     }
// 
//     public final class UserCategoryResultSet implements ResultSet{
//         public List<UserCategory> results;
//     }
// 
//     public final class RewardResultSet implements ResultSet{
//         public List<Reward> results;
//     }
// 
//     public final class SearchResultSet implements ResultSet{
//         public List<SearchResult> results;
//     }
// 
//     public final class UserPlacesResultSet implements ResultSet{
//         public List<UserPlace> results;
//     }
// 
//     public final class PlacesResultSet implements ResultSet{
//         public List<Place> results;
//     }
// 
//     public final class AwardsResultSet implements ResultSet{
//         public List<AwardsActivity.Award> results;
//     }
// 
//     public final class OrganizationsResultSet implements ResultSet{
//         public List<Organization> results;
//     }
// 
//     private ParserModels(){
// 
//     }
// }
// 
// Path: model/src/main/java/org/tndata/compass/model/ResultSet.java
// public interface ResultSet{
// 
// }


import android.content.Context;
import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import org.tndata.android.compass.R;
import org.tndata.android.compass.adapter.OrganizationsAdapter;
import org.tndata.android.compass.databinding.FragmentOrganizationsBinding;
import org.tndata.compass.model.Organization;
import org.tndata.android.compass.parser.Parser;
import org.tndata.android.compass.parser.ParserModels;
import org.tndata.android.compass.util.API;
import org.tndata.android.compass.util.ItemSpacing;
import org.tndata.android.compass.util.Tour;
import org.tndata.compass.model.ResultSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import es.sandwatch.httprequests.HttpRequest;
import es.sandwatch.httprequests.HttpRequestError;
        // The first time we load this Fragment, mOrganziations will be null,
        // so when onViewCreated gets called (after this method), bindOrganizations
        // will get called. Then, if/when a user hits the back button, we should
        // already have those.
        if(mOrganizations != null) {
            removeSelectedOrganizationMembership();
        }
    }

    @Override
    public void onRequestComplete(int requestCode, String result){
        if (requestCode == mGetOrganizationsRC){
            Parser.parse(result, ParserModels.OrganizationsResultSet.class, this);
        }
        else if (requestCode == mPostOrganizationRC){
            mListener.onOrganizationSelected(true);
        }
    }

    @Override
    public void onRequestFailed(int requestCode, HttpRequestError error){

    }

    @Override
    public void onProcessResult(int requestCode, ResultSet result){

    }

    @Override
// Path: compass/src/main/gen/org/tndata/android/compass/R.java
// public final class R {
// }
// 
// Path: compass/src/main/java/org/tndata/android/compass/parser/ParserModels.java
// public final class ParserModels{
//     private abstract class ListResultSet implements ResultSet{
//         public int count;
//         public String previous;
//         public String next;
//     }
// 
//     public final class UserResultSet implements ResultSet{
//         public List<User> results;
//     }
// 
//     public final class FeedDataResultSet implements ResultSet{
//         public List<FeedData> results;
//     }
// 
//     public final class CategoryContentResultSet implements ResultSet{
//         public List<TDCCategory> results;
//     }
// 
//     public final class CustomGoalsResultSet extends ListResultSet{
//         public List<CustomGoal> results;
//     }
// 
//     public final class UserGoalsResultSet extends ListResultSet{
//         public List<UserGoal> results;
//     }
// 
//     public final class DailyProgressResultSet implements ResultSet{
//         public List<DailyProgress> results;
//     }
// 
//     public final class GoalContentResultSet extends ListResultSet{
//         public List<TDCGoal> results;
//     }
// 
//     public final class UserActionResultSet extends ListResultSet{
//         public List<UserAction> results;
//     }
// 
//     public final class CustomActionResultSet extends ListResultSet{
//         public List<CustomAction> results;
//     }
// 
//     public final class UserCategoryResultSet implements ResultSet{
//         public List<UserCategory> results;
//     }
// 
//     public final class RewardResultSet implements ResultSet{
//         public List<Reward> results;
//     }
// 
//     public final class SearchResultSet implements ResultSet{
//         public List<SearchResult> results;
//     }
// 
//     public final class UserPlacesResultSet implements ResultSet{
//         public List<UserPlace> results;
//     }
// 
//     public final class PlacesResultSet implements ResultSet{
//         public List<Place> results;
//     }
// 
//     public final class AwardsResultSet implements ResultSet{
//         public List<AwardsActivity.Award> results;
//     }
// 
//     public final class OrganizationsResultSet implements ResultSet{
//         public List<Organization> results;
//     }
// 
//     private ParserModels(){
// 
//     }
// }
// 
// Path: model/src/main/java/org/tndata/compass/model/ResultSet.java
// public interface ResultSet{
// 
// }


// Path: compass/src/main/java/org/tndata/android/compass/fragment/OrganizationsFragment.java
import android.content.Context;
import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.widget.LinearLayoutManager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import org.tndata.android.compass.R;
import org.tndata.android.compass.adapter.OrganizationsAdapter;
import org.tndata.android.compass.databinding.FragmentOrganizationsBinding;
import org.tndata.compass.model.Organization;
import org.tndata.android.compass.parser.Parser;
import org.tndata.android.compass.parser.ParserModels;
import org.tndata.android.compass.util.API;
import org.tndata.android.compass.util.ItemSpacing;
import org.tndata.android.compass.util.Tour;
import org.tndata.compass.model.ResultSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import es.sandwatch.httprequests.HttpRequest;
import es.sandwatch.httprequests.HttpRequestError;

        // The first time we load this Fragment, mOrganziations will be null,
        // so when onViewCreated gets called (after this method), bindOrganizations
        // will get called. Then, if/when a user hits the back button, we should
        // already have those.
        if(mOrganizations != null) {
            removeSelectedOrganizationMembership();
        }
    }

    @Override
    public void onRequestComplete(int requestCode, String result){
        if (requestCode == mGetOrganizationsRC){
            Parser.parse(result, ParserModels.OrganizationsResultSet.class, this);
        }
        else if (requestCode == mPostOrganizationRC){
            mListener.onOrganizationSelected(true);
        }
    }

    @Override
    public void onRequestFailed(int requestCode, HttpRequestError error){

    }

    @Override
    public void onProcessResult(int requestCode, ResultSet result){

    }

    @Override
    public void onParseSuccess(int requestCode, ResultSet result){