dataschema-base.js revision d0ec0cb3ed5a3c1384e807f8526cfc1c0c50aaed
/**
* The DataSchema utility provides a common configurable interface for widgets to
* apply a given schema to a variety of data.
*
* @module dataschema
*/
/**
* Base class for the YUI DataSchema utility.
* @class DataSchema.Base
* @static
*/
SchemaBase = {
/**
* Returns string name.
*
* @method toString
* @return {String} String representation for this object.
*/
toString: function() {
return "DataSchema.Base";
},
/**
* Overridable method returns data as-is.
*
* @method apply
* @param schema {Object} Schema to apply.
* @param data {Object} Data.
* @return {Object} Schema-parsed data.
* @static
*/
return data;
},
/**
* Applies field parser, if defined
*
* @method parse
* @param value {Object} Original value.
* @param field {Object} Field.
* @return {Object} Type-converted value.
*/
if(parser) {
}
else {
}
}
return value;
}
};
Y.namespace("Parsers");