collectResourceIds = function(shapes){
            if(!shapes) return [];
            
            return shapes.map(function(shape){
                return collectResourceIds(shape.childShapes).concat(shape.resourceId);
            }).flatten();
        }
This method renew all resource Ids and according references.
Warning: The implementation performs a substitution on the serialized object for
easier implementation. This results in a low performance which is acceptable if this
is only used when importing models.
@param {Object|String} jsonObject
@throws {SyntaxError} If the serialized json object contains syntax errors.
@return {Object} The jsonObject with renewed ids.
@private