rem: var filter = function(resultArgs, arrayOfAllItems){ 
add: var filter = function(requestArgs, arrayOfAllItems){ 
context: 	_fetchItems: function(	/* Object */ keywordArgs, 							/* Function */ findCallback, 							/* Function */ errorCallback){		//	summary: 		//		See dojo.data.util.simpleFetch.fetch()		var self = this;		var filter = function(resultArgs, arrayOfAllItems){			var items = null;			if(resultArgs.query) {				items = [];				for(var i = 0; i < arrayOfAllItems.length; ++i){					var match = true;					var candidateItem = arrayOfAllItems[i];					for(var key in resultArgs.query) {						var value = resultArgs.query[key];						if (!self.containsValue(candidateItem, key, value)){							match = false;						}					}					if(match){						items.push(candidateItem);					}				}				findCallback(items, resultArgs);			}else{				// We want a copy to pass back in case the parent wishes to sort the array.  We shouldn't allow resort 				// of the internal list so that multiple callers can get listsand sort without affecting each other.				if(self._arrayOfAllItems.length> 0){					items = self._arrayOfAllItems.slice(0,self._arrayOfAllItems.length); 				}				findCallback(items, resultArgs);			}		};		if(this._loadFinished){			filter(keywordArgs, this._arrayOfAllItems);		}else{			if(this._jsonFileUrl){				var getArgs = {						url: self._jsonFileUrl, 						handleAs: "json"					};				var getHandler = dojo.xhrGet(getArgs);				getHandler.addCallback(function(data){					self._loadFinished = true;					try{						self._arrayOfAllItems = self._getItemsFromLoadedData(data);						filter(keywordArgs, self._arrayOfAllItems);					}catch(e){						errorCallback(e, keywordArgs);					}				});				getHandler.addErrback(function(error){					errCallback(keywordArgs, error);				});			}else if(this._jsonData){				try{					this._loadFinished = true;					this._arrayOfAllItems = this._getItemsFromLoadedData(this._jsonData);					this._jsonData = null;					filter(keywordArgs, this._arrayOfAllItems);				}catch(e){					errorCallback(e, keywordArgs);				}			}else{				errorCallback(new Error("dojo.data.JsonItemStore: No JSON source data was provided as either URL or a nested Javascript object."), keywordArgs);			}		}	},
meta: 4497	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/4497/223584683e82bf4f7f4785f40d619ab64e9ecc86/JsonItemStore.js/clean/data/JsonItemStore.js