Author: ygrego Date: 2015-04-03 13:55:15 +0000 (Fri, 03 Apr 2015) New Revision: 1074 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1074 Log: New methods: "addCurrentRatingConstraint" and "addRatingConstraint". Modified: oipf/js/impl/model/MetadataSearch.js Modified: oipf/js/impl/model/MetadataSearch.js =================================================================== --- oipf/js/impl/model/MetadataSearch.js 2015-04-03 13:25:54 UTC (rev 1073) +++ oipf/js/impl/model/MetadataSearch.js 2015-04-03 13:55:15 UTC (rev 1074) @@ -220,6 +220,46 @@ this._constraints.channels = []; } + }, + + /* + * Description: + * Description Constrain the search to only include results whose + * parental rating value is below the specified threshold. + * + * Arguments: + * -scheme: The parental rating scheme upon which the constraint + * SHALL be based. If the value of this argument is null, + * any existing parental rating constraints SHALL be cleared. + * + * -threshold: The threshold above which results SHALL NOT be returned. + * If the value of this argument is null, + * any existing constraint for the specified parental + * rating scheme SHALL be cleared. + */ + addRatingConstraint: function(scheme, threshold) { + if (scheme && threshold) { + var rating = { + scheme: scheme, + threshold: threshold + }; + + this._constraints.ratings && + this._constraints.ratings.push(rating); + + } else if (this._constraints.ratings) { + this._constraints.ratings = []; + } + + }, + + /* + * Description: + * Description Constrain the search to only include results whose + * parental rating value is below the specified threshold. + */ + addCurrentRatingConstraint: function() { + } }); \ No newline at end of file
participants (1)
-
ygregoï¼ users.nuiton.org