Skip to content

Commit

Permalink
exceptions in my posts to investigation (json deserializer)
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Eilers Smith committed Dec 26, 2013
1 parent 51844f1 commit 72bfcc8
Show file tree
Hide file tree
Showing 34 changed files with 883 additions and 829 deletions.
35 changes: 9 additions & 26 deletions model/model.ecore
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,23 @@
<eStructuralFeatures xsi:type="ecore:EAttribute" name="author" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="created" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//ELong"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="EReference0" lowerBound="1"
upperBound="-1" eType="#//Comment" containment="true"/>
upperBound="-1" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="permalink" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="EReference1" upperBound="-1"
eType="#//Image"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="EReference1" upperBound="-1"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="title" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="EReference2" upperBound="-1"
eType="#//Reply"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="EReference2" upperBound="-1"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="is_male" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Image">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="url" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="identifier" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Comment">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="post_title" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="post_permalink" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="comment_id" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="author" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="body_html" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="likes" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="ups" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="downs" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="created" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//ELong"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="EReference0" upperBound="-1"
eType="#//Image" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="body_html" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="identifier" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="EReference1" upperBound="-1"
eType="#//Reply" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Reply">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="author"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="ups"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="downs"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="created"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="body_html"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="identifier"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="EReference0" upperBound="-1"
eType="#//Reply" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="parentIdentifier"/>
</eClassifiers>
</ecore:EPackage>
56 changes: 56 additions & 0 deletions model/model.ecorediag
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,62 @@
<element xmi:type="ecore:EClass" href="model.ecore#//Post"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_JspSkkaSEeOAhZ6b1CwEtg" x="187" y="167"/>
</children>
<children xmi:type="notation:Node" xmi:id="_rzLHcG2sEeOKsMm8Ky715g" type="1001">
<children xmi:type="notation:Node" xmi:id="_rzLHc22sEeOKsMm8Ky715g" type="4001"/>
<children xmi:type="notation:Node" xmi:id="_rzLugG2sEeOKsMm8Ky715g" type="5001">
<children xmi:type="notation:Node" xmi:id="_ubnJUG2sEeOKsMm8Ky715g" type="2001">
<element xmi:type="ecore:EAttribute" href="model.ecore#//Comment/post_title"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_ubnJUW2sEeOKsMm8Ky715g"/>
</children>
<children xmi:type="notation:Node" xmi:id="__jBYYG27EeOKsMm8Ky715g" type="2001">
<element xmi:type="ecore:EAttribute" href="model.ecore#//Comment/post_permalink"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="__jBYYW27EeOKsMm8Ky715g"/>
</children>
<children xmi:type="notation:Node" xmi:id="_vINwoG2sEeOKsMm8Ky715g" type="2001">
<element xmi:type="ecore:EAttribute" href="model.ecore#//Comment/comment_id"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_vINwoW2sEeOKsMm8Ky715g"/>
</children>
<children xmi:type="notation:Node" xmi:id="_vweqgG2sEeOKsMm8Ky715g" type="2001">
<element xmi:type="ecore:EAttribute" href="model.ecore#//Comment/author"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_vweqgW2sEeOKsMm8Ky715g"/>
</children>
<children xmi:type="notation:Node" xmi:id="_wTLu8G2sEeOKsMm8Ky715g" type="2001">
<element xmi:type="ecore:EAttribute" href="model.ecore#//Comment/body_html"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_wTLu8W2sEeOKsMm8Ky715g"/>
</children>
<children xmi:type="notation:Node" xmi:id="_w3LM0G2sEeOKsMm8Ky715g" type="2001">
<element xmi:type="ecore:EAttribute" href="model.ecore#//Comment/name"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_w3LM0W2sEeOKsMm8Ky715g"/>
</children>
<children xmi:type="notation:Node" xmi:id="_xhbDsG2sEeOKsMm8Ky715g" type="2001">
<element xmi:type="ecore:EAttribute" href="model.ecore#//Comment/likes"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_xhbDsW2sEeOKsMm8Ky715g"/>
</children>
<children xmi:type="notation:Node" xmi:id="_x69lEG2sEeOKsMm8Ky715g" type="2001">
<element xmi:type="ecore:EAttribute" href="model.ecore#//Comment/ups"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_x69lEW2sEeOKsMm8Ky715g"/>
</children>
<children xmi:type="notation:Node" xmi:id="_yPoNgG2sEeOKsMm8Ky715g" type="2001">
<element xmi:type="ecore:EAttribute" href="model.ecore#//Comment/downs"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_yPoNgW2sEeOKsMm8Ky715g"/>
</children>
<children xmi:type="notation:Node" xmi:id="_6G_tMG2-EeOKsMm8Ky715g" type="2001">
<element xmi:type="ecore:EAttribute" href="model.ecore#//Comment/created"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_6G_tMW2-EeOKsMm8Ky715g"/>
</children>
<styles xmi:type="notation:DrawerStyle" xmi:id="_rzLugW2sEeOKsMm8Ky715g"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_rzLugm2sEeOKsMm8Ky715g"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_rzLug22sEeOKsMm8Ky715g"/>
</children>
<children xmi:type="notation:Node" xmi:id="_rzLuhG2sEeOKsMm8Ky715g" type="5002">
<styles xmi:type="notation:DrawerStyle" xmi:id="_rzLuhW2sEeOKsMm8Ky715g"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_rzLuhm2sEeOKsMm8Ky715g"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_rzLuh22sEeOKsMm8Ky715g"/>
</children>
<styles xmi:type="notation:ShapeStyle" xmi:id="_rzLHcW2sEeOKsMm8Ky715g" fontColor="4210752" fontName="Lucida Grande" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
<element xmi:type="ecore:EClass" href="model.ecore#//Comment"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_rzLHcm2sEeOKsMm8Ky715g" x="566" y="310"/>
</children>
<styles xmi:type="notation:DiagramStyle" xmi:id="_bHOQIOqPEd-cf4p1YNxwtA"/>
<element xmi:type="ecore:EPackage" href="model.ecore#/"/>
</notation:Diagram>
108 changes: 48 additions & 60 deletions res/layout/fragment_comment.xml
Original file line number Diff line number Diff line change
@@ -1,70 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<ViewFlipper xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/vf"
android:id="@+id/root_layout"
android:layout_width="match_parent"
android:layout_height="match_parent" >
android:layout_height="wrap_content" >

<ProgressBar
android:id="@+id/loading"
style="@android:style/Widget.ProgressBar.Small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center" />

<RelativeLayout
<ListView
android:id="@+id/replies_lv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="@null"
android:dividerHeight="0dp"
android:listSelector="@android:color/transparent"
android:paddingBottom="50dp" >
</ListView>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="#e6d7d4d3"
android:orientation="vertical" >

<ListView
android:id="@+id/replies_lv"
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="@null"
android:listSelector="@android:color/transparent"
android:dividerHeight="0dp"
android:paddingBottom="50dp" >
</ListView>
android:layout_height="2px"
android:background="@color/orange" />

<LinearLayout
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="#e6d7d4d3"
android:orientation="vertical" >

<View
android:layout_height="match_parent" >

<ImageView
android:id="@+id/comment_reply_send_btn"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_margin="10dp"
android:clickable="true"
android:src="@android:drawable/ic_menu_send" />

<com.sobremesa.waywt.views.WaywtSecondaryEditText
android:id="@+id/comment_reply_et"
android:layout_width="match_parent"
android:layout_height="2px"
android:background="@color/orange" />

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >

<ImageView
android:id="@+id/comment_reply_send_btn"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_margin="10dp"
android:clickable="true"
android:src="@android:drawable/ic_menu_send" />

<com.sobremesa.waywt.views.WaywtSecondaryEditText
android:id="@+id/comment_reply_et"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_centerVertical="true"
android:layout_marginBottom="10dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:layout_toLeftOf="@id/comment_reply_send_btn"
android:hint="Type comment"
android:textColor="@color/black" />
</RelativeLayout>
</LinearLayout>
</RelativeLayout>

</ViewFlipper>
android:layout_height="40dp"
android:layout_centerVertical="true"
android:layout_marginBottom="10dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:layout_toLeftOf="@id/comment_reply_send_btn"
android:hint="Type comment"
android:textColor="@color/black" />
</RelativeLayout>
</LinearLayout>

</RelativeLayout>
21 changes: 21 additions & 0 deletions res/layout/fragment_my_posts.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res/com.sobremesa.waywt"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >

<com.viewpagerindicator.TitlePageIndicator
android:id="@+id/page_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:background="@android:color/black"
app:footerColor="@color/orange" />

<android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

</LinearLayout>
39 changes: 13 additions & 26 deletions res/layout/fragment_waywt.xml
Original file line number Diff line number Diff line change
@@ -1,34 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<ViewFlipper xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/vf"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res/com.sobremesa.waywt"
android:layout_width="match_parent"
android:layout_height="match_parent" xmlns:app="http://schemas.android.com/apk/res/com.sobremesa.waywt">
android:layout_height="match_parent"
android:orientation="vertical" >

<ProgressBar
android:id="@+id/loading"
style="@android:style/Widget.ProgressBar.Small"
<com.viewpagerindicator.TitlePageIndicator
android:id="@+id/page_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center" />
android:layout_gravity="top"
android:background="@android:color/black"
app:footerColor="@color/orange" />

<LinearLayout
<android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
android:layout_height="wrap_content" />

<com.viewpagerindicator.TitlePageIndicator
android:id="@+id/page_indicator"
android:layout_width="wrap_content"
app:footerColor="@color/orange"

android:layout_height="wrap_content"
android:layout_gravity="top"
android:background="@android:color/black" />

<android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>

</ViewFlipper>
</LinearLayout>
6 changes: 3 additions & 3 deletions res/menu/waywt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
android:icon="@drawable/ic_action_refresh"
android:orderInCategory="1"
android:showAsAction="always"
android:title="refresh"
android:visible="false"/>
android:title="refresh"/>
<item
android:id="@+id/loading_menu_id"
android:orderInCategory="1"
android:showAsAction="always"/>
android:showAsAction="always"
android:visible="false"/>
<!--
<item
android:id="@+id/login_menu_id"
Expand Down
4 changes: 4 additions & 0 deletions src-gen/ContentProvider.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Copy this code snippet in your AndroidManifest.xml inside the <application> element to activate the content provider

<provider android:name="com.sobremesa.waywt.contentprovider.Provider" android:authorities="com.sobremesa.waywt.provider.Model" />

Loading

0 comments on commit 72bfcc8

Please sign in to comment.