/*
 * Copyright (C) 2009 University of Washington
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */

package org.odk.collect.android.logic;

import android.graphics.drawable.Drawable;

import org.javarosa.core.model.FormIndex;

import java.util.ArrayList;

public class HierarchyElement {
    private String mPrimaryText = "";
    private String mSecondaryText = "";
    private Drawable mIcon;
    private int mColor;
    int mType;
    FormIndex mFormIndex;
    ArrayList<HierarchyElement> mChildren;


    public HierarchyElement(String text1, String text2, Drawable bullet, int color, int type,
            FormIndex f) {
        mIcon = bullet;
        mPrimaryText = text1;
        mSecondaryText = text2;
        mColor = color;
        mFormIndex = f;
        mType = type;
        mChildren = new ArrayList<HierarchyElement>();
    }


    public String getPrimaryText() {
        return mPrimaryText;
    }


    public String getSecondaryText() {
        return mSecondaryText;
    }


    public void setPrimaryText(String text) {
        mPrimaryText = text;
    }


    public void setSecondaryText(String text) {
        mSecondaryText = text;
    }


    public void setIcon(Drawable icon) {
        mIcon = icon;
    }


    public Drawable getIcon() {
        return mIcon;
    }


    public FormIndex getFormIndex() {
        return mFormIndex;
    }


    public int getType() {
        return mType;
    }


    public void setType(int newType) {
        mType = newType;
    }


    public ArrayList<HierarchyElement> getChildren() {
        return mChildren;
    }


    public void addChild(HierarchyElement h) {
        mChildren.add(h);
    }


    public void setChildren(ArrayList<HierarchyElement> children) {
        mChildren = children;
    }


    public void setColor(int color) {
        mColor = color;
    }


    public int getColor() {
        return mColor;
    }

}

@@ -1,610 +1,4 @@
-/*%0A * Copyright (C) 2009 University of Washington%0A * %0A * Licensed under the Apache License, Version 2.0 (the %22License%22); you may not use this file except%0A * in compliance with the License. You may obtain a copy of the License at%0A * %0A * http://www.apache.org/licenses/LICENSE-2.0%0A * %0A * Unless required by applicable law or agreed to in writing, software distributed under the License%0A * is distributed on an %22AS IS%22 BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express%0A * or implied. See the License for the specific language governing permissions and limitations under%0A * the License.%0A */%0A%0A
 pack
@@ -396,17 +396,16 @@
 ldren;%0A%0A
-%0A
     publ
@@ -490,16 +490,32 @@
 t type,%0A
+                
         
@@ -529,24 +529,24 @@
 mIndex f) %7B%0A
-
         mIco
@@ -723,32 +723,16 @@
 rayList%3C
-HierarchyElement
 %3E();%0A   
@@ -727,33 +727,32 @@
 ist%3C%3E();%0A    %7D%0A%0A
-%0A
     public Strin
@@ -800,33 +800,32 @@
 aryText;%0A    %7D%0A%0A
-%0A
     public Strin
@@ -889,179 +889,8 @@
  %7D%0A%0A
-%0A    public void setPrimaryText(String text) %7B%0A        mPrimaryText = text;%0A    %7D%0A%0A%0A    public void setSecondaryText(String text) %7B%0A        mSecondaryText = text;%0A    %7D%0A%0A%0A
     
@@ -947,33 +947,32 @@
  = icon;%0A    %7D%0A%0A
-%0A
     public Drawa
@@ -1008,33 +1008,32 @@
 n mIcon;%0A    %7D%0A%0A
-%0A
     public FormI
@@ -1080,33 +1080,32 @@
 rmIndex;%0A    %7D%0A%0A
-%0A
     public int g
@@ -1136,33 +1136,32 @@
 n mType;%0A    %7D%0A%0A
-%0A
     public void 
@@ -1207,33 +1207,32 @@
 newType;%0A    %7D%0A%0A
-%0A
     public Array
@@ -1295,33 +1295,32 @@
 hildren;%0A    %7D%0A%0A
-%0A
     public void 
@@ -1387,115 +1387,8 @@
  %7D%0A%0A
-%0A    public void setChildren(ArrayList%3CHierarchyElement%3E children) %7B%0A        mChildren = children;%0A    %7D%0A%0A%0A
     
@@ -1452,17 +1452,16 @@
 %0A    %7D%0A%0A
-%0A
     publ
@@ -1503,17 +1503,16 @@
 mColor;%0A
+
     %7D%0A
-%0A
 %7D%0A

Remove unused method and whitespace