src/aria/core/JsonValidator.js
function (packageDef, typeName) {
                var path = {
                    '$properties' : packageDef.$beans
                };
                var typeParts = typeName.split('.');
                for (var i = 0; i < typeParts.length; i++) {
                    var elt = typeParts[i];
                    if (elt == '$contentType' && path.$contentType) {
                        // the content type of an Array or a Map can be used
                        // as a type elsewhere
                        path = path.$contentType;
                    } else if (typeof(path.$properties) == 'object' && path.$properties != null) {
                        path = path.$properties[elt];
                    } else {
                        path = null;
                    }
                    if (typeof(path) != 'object' || path == null) {
                        this._logError(this.INVALID_TYPE_REF, [typeName, this._currentBeanName, packageDef.$package]);
                        return this._typeRefError;
                    }
                }
                return path;
            }
function (packageDef, typeName) {
                var path = {
                    '$properties' : packageDef.$beans
                };
                var typeParts = typeName.split('.');
                for (var i = 0; i < typeParts.length; i++) {
                    var elt = typeParts[i];
                    if (elt == '$contentType' && path.$contentType) {
                        // the content type of an Array or a Map can be used
                        // as a type elsewhere
                        path = path.$contentType;
                    } else if (typeof(path.$properties) == 'object' && path.$properties != null) {
                        path = path.$properties[elt];
                    } else {
                        path = null;
                    }
                    if (typeof(path) != 'object' || path == null) {
                        this._logError(this.INVALID_TYPE_REF, [typeName, this._currentBeanName, packageDef.$package]);
                        return this._typeRefError;
                    }
                }
                return path;
            }
function ( packageDef , typeName ) { var path = { '$properties' : packageDef . $beans } ; var typeParts = typeName . split ( '.' ) ; for ( var i = 0 ; i < typeParts . length ; i ++ ) { var elt = typeParts [ i ] ; if ( elt == '$contentType' && path . $contentType ) { // the content type of an Array or a Map can be used // as a type elsewhere path = path . $contentType ; } else if ( typeof ( path . $properties ) == 'object' && path . $properties != null ) { path = path . $properties [ elt ] ; } else { path = null ; } if ( typeof ( path ) != 'object' || path == null ) { this . _logError ( this . INVALID_TYPE_REF , [ typeName , this . _currentBeanName , packageDef . $package ] ) ; return this . _typeRefError ; } } return path ; }
Find the given type in the given bean package.
@param {aria.core.BaseTypes:Package} packageDef bean package
@param {String} typeName type name. May not contain ':'. Contains the path to the bean inside the package
bp.
@return {aria.core.BaseTypes:Bean} definition of the requested bean, or this._typeRefError if it could
not be found
Find the given type in the given bean package .