Author: ygrego Date: 2015-04-03 12:02:21 +0000 (Fri, 03 Apr 2015) New Revision: 1069 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1069 Log: Addition of method "setQuery". Modified: oipf/js/impl/model/MetadataSearch.js Modified: oipf/js/impl/model/MetadataSearch.js =================================================================== --- oipf/js/impl/model/MetadataSearch.js 2015-04-03 12:01:27 UTC (rev 1068) +++ oipf/js/impl/model/MetadataSearch.js 2015-04-03 12:02:21 UTC (rev 1069) @@ -97,6 +97,8 @@ var MetadataSearch = Class.extend({ _searchManager: null, + + _currentQuery: null, /* * Description: * The subset of search results that has been requested by the application. @@ -160,6 +162,22 @@ this.result = new SearchResults(currentQuery); this.result._search = this; console.log("[INFO]: findProgrammesFromStream [Out]"); + }, + + /* + * Description: + * Set the query terms to be used for this search, + * discarding any previously-set query terms. + * Setting the search parameters using this method will implicitly remove + * any existing constraints, ordering or queries created + * by prior calls to methods on this object. + * + * Arguments: + * -query: The query terms to be used. + * + */ + setQuery: function(query){ + this._currentQuery = query; } }); \ No newline at end of file