private static void parseStencil ( JSONObject modelJSON , Shape current ) throws JSONException { // get stencil type if ( modelJSON . has ( "stencil" ) ) { JSONObject stencil = modelJSON . getJSONObject ( "stencil" ) ; // TODO other attributes of stencil String stencilString = "" ; if ( stencil . has ( "id" ) ) { stencilString = stencil . getString ( "id" ) ; } current . setStencil ( new StencilType ( stencilString ) ) ; } }
parse the stencil out of a JSONObject and set it to the current shape