dataschema-base.js revision cfd2e48cfb9596c0698d16bec86559fe7cdcdab5
/**
* The DataSchema utility provides a common configurable interface for widgets to
* apply a given schema to a variety of data.
*
* @module dataschema
*/
/**
* Provides the base DataSchema implementation, which can be extended to
* create DataSchemas for specific data formats, such XML, JSON, text and
* arrays.
*
* @module dataschema
* @submodule dataschema-base
*/
/**
* Base class for the YUI DataSchema Utility.
* @class DataSchema.Base
* @static
*/
SchemaBase = {
/**
* 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");