private static IRatings createRatingsFromActivity ( JSONObject verb ) throws JSONException { Ratings ratings = new Ratings ( ) ; JSONObject measure = verb . getJSONObject ( "measure" ) ; if ( measure == null ) return null ; ratings . setMin ( measure . getInt ( "scaleMin" ) ) ; ratings . setMax ( measure . getInt ( "scaleMax" ) ) ; ratings . setAverage ( measure . getDouble ( "value" ) ) ; ratings . setSample ( measure . getInt ( "sampleSize" ) ) ; return ratings ; }
Create a composite ratings object