private static void parseTarget ( ArrayList < Shape > shapes , JSONObject modelJSON , Shape current ) throws JSONException { if ( modelJSON . has ( "target" ) ) { JSONObject targetObject = modelJSON . getJSONObject ( "target" ) ; if ( targetObject . has ( "resourceId" ) ) { current . setTarget ( getShapeWithId ( targetObject . getString ( "resourceId" ) , shapes ) ) ; } } }
parse the target resource and add it to the current shape