a:35:{s:9:"#provides";s:20:"dojox.data.FileStore";s:9:"#resource";s:17:"data/FileStore.js";s:20:"dojox.data.FileStore";a:7:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"args";a:1:{s:4:"type";s:6:"Object";}}s:6:"source";s:394:" if(args && args.label){ this.label = args.label; } if(args && args.url){ this.url = args.url; } if (args && args.options) { if (dojo.isArray(args.options)) { this.options = args.options; }else{ if (dojo.isString(args.options)) { this.options = args.options.split(","); } } } if (args && args.pathAsQueryParam) { this.pathAsQueryParam = true; }";s:7:"summary";s:67:"A simple store that provides a datastore interface to a filesystem.";s:11:"description";s:114:"A simple store that provides a datastore interface to a filesystem. It takes a few parameters for initialization:";s:8:"examples";a:1:{i:0;s:41:"options="expand,dirsOnly,showHiddenFiles"";}s:9:"classlike";b:1;}s:24:"dojox.data.FileStore.url";a:4:{s:9:"prototype";s:20:"dojox.data.FileStore";s:8:"instance";s:20:"dojox.data.FileStore";s:4:"type";s:3:"The";s:7:"summary";s:75:"URL of the service which provides the file store serverside implementation.";}s:30:"dojox.data.FileStore._storeRef";a:3:{s:9:"prototype";s:20:"dojox.data.FileStore";s:7:"private";b:1;s:7:"summary";s:0:"";}s:26:"dojox.data.FileStore.label";a:4:{s:9:"prototype";s:20:"dojox.data.FileStore";s:8:"instance";s:20:"dojox.data.FileStore";s:4:"type";s:3:"The";s:7:"summary";s:966:"attribute of the file to use as the huma-readable text. Default is 'name'. The purpose of this store is to represent a file as a datastore item. The datastore item by default has the following attributes that can be examined on it. directory: Boolean indicating if the file item represents a directory. name: The filename with no path informatiom. path: The file complete file path including name, relative to the location the file service scans from size: The size of the file, in bytes. parentDir: The parent directory path. children: Any child files contained by a directory file item. Note that the store's server call pattern is RESTlike. The store also supports the passing of configurable options to the back end service, such as expanding all child files (no lazy load), displaying hidden files, displaying only directories, and so on. These are defined through a comma-separated list in declarative, or through setting the options array in programmatic.";}s:32:"dojox.data.FileStore._identifier";a:3:{s:9:"prototype";s:20:"dojox.data.FileStore";s:7:"private";b:1;s:7:"summary";s:0:"";}s:32:"dojox.data.FileStore._attributes";a:3:{s:9:"prototype";s:20:"dojox.data.FileStore";s:7:"private";b:1;s:7:"summary";s:0:"";}s:34:"dojox.data.FileStore.pathSeparator";a:3:{s:9:"prototype";s:20:"dojox.data.FileStore";s:8:"instance";s:20:"dojox.data.FileStore";s:7:"summary";s:0:"";}s:28:"dojox.data.FileStore.options";a:3:{s:9:"prototype";s:20:"dojox.data.FileStore";s:8:"instance";s:20:"dojox.data.FileStore";s:7:"summary";s:0:"";}s:34:"dojox.data.FileStore._assertIsItem";a:6:{s:9:"prototype";s:20:"dojox.data.FileStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"item";a:2:{s:4:"type";s:4:"item";s:7:"summary";s:50:"The item to test for being contained by the store.";}}s:6:"source";s:135:" if(!this.isItem(item)){ throw new Error("dojox.data.FileStore: a function was passed an item argument that was not an item"); }";s:7:"summary";s:78:"This function tests whether the item passed in is indeed an item in the store.";s:7:"private";b:1;}s:39:"dojox.data.FileStore._assertIsAttribute";a:6:{s:9:"prototype";s:20:"dojox.data.FileStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:9:"attribute";a:2:{s:4:"type";s:21:"attribute-name-string";s:7:"summary";s:55:"The attribute to test for being contained by the store.";}}s:6:"source";s:168:" if(typeof attribute !== "string"){ throw new Error("dojox.data.FileStore: a function was passed an attribute argument that was not an attribute name string"); }";s:7:"summary";s:101:"This function tests whether the item passed in is indeed a valid 'attribute' like type for the store.";s:7:"private";b:1;}s:37:"dojox.data.FileStore.pathAsQueryParam";a:3:{s:9:"prototype";s:20:"dojox.data.FileStore";s:8:"instance";s:20:"dojox.data.FileStore";s:7:"summary";s:0:"";}s:32:"dojox.data.FileStore.getFeatures";a:4:{s:9:"prototype";s:20:"dojox.data.FileStore";s:4:"type";s:8:"Function";s:6:"source";s:76:" return { 'dojo.data.api.Read': true, 'dojo.data.api.Identity':true };";s:7:"summary";s:36:"See dojo.data.api.Read.getFeatures()";}s:29:"dojox.data.FileStore.getValue";a:5:{s:9:"prototype";s:20:"dojox.data.FileStore";s:4:"type";s:8:"Function";s:10:"parameters";a:3:{s:4:"item";a:1:{s:4:"type";s:0:"";}s:9:"attribute";a:1:{s:4:"type";s:0:"";}s:12:"defaultValue";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:153:" var values = this.getValues(item, attribute); var value = defaultValue; if(values && values.length > 0){ value = values[0]; } return value;";s:7:"summary";s:33:"See dojo.data.api.Read.getValue()";}s:34:"dojox.data.FileStore.getAttributes";a:5:{s:9:"prototype";s:20:"dojox.data.FileStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"item";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:27:" return this._attributes; ";s:7:"summary";s:38:"See dojo.data.api.Read.getAttributes()";}s:33:"dojox.data.FileStore.hasAttribute";a:5:{s:9:"prototype";s:20:"dojox.data.FileStore";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:4:"item";a:1:{s:4:"type";s:0:"";}s:9:"attribute";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:72:" if(this.getValue(item,attribute)){ return true; } return false;";s:7:"summary";s:38:"See dojo.data.api.Read.hasAttributes()";}s:32:"dojox.data.FileStore.getIdentity";a:5:{s:9:"prototype";s:20:"dojox.data.FileStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"item";a:1:{s:4:"type";s:4:"item";}}s:6:"source";s:48:" return this.getValue(item, this._identifier); ";s:7:"summary";s:40:"See dojo.data.api.Identity.getIdentity()";}s:42:"dojox.data.FileStore.getIdentityAttributes";a:5:{s:9:"prototype";s:20:"dojox.data.FileStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"item";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:28:" return [this._identifier];";s:7:"summary";s:43:"See dojo.data.api.Read.getLabelAttributes()";}s:33:"dojox.data.FileStore.isItemLoaded";a:5:{s:9:"prototype";s:20:"dojox.data.FileStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"item";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:147:" var loaded = this.isItem(item); if (loaded && typeof item._loaded == "boolean" && !item._loaded){ loaded = false; } return loaded;";s:7:"summary";s:37:"See dojo.data.api.Read.isItemLoaded()";}s:29:"dojox.data.FileStore.loadItem";a:6:{s:9:"prototype";s:20:"dojox.data.FileStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:11:"keywordArgs";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:905:" var item = keywordArgs.item; var self = this; var scope = keywordArgs.scope || dojo.global; var content = {}; if (this.options.length > 0) { content.options = dojo.toJson(this.options); } if (this.pathAsQueryParam) { content.path = item.parentPath + this.pathSeparator + item.name; } var xhrData = { url: this.pathAsQueryParam? this.url : this.url + "/" + item.parentPath + "/" + item.name, handleAs: "json-comment-optional", content: content, preventCache: true }; var deferred = dojo.xhrGet(xhrData); deferred.addErrback(function(error){ if(keywordArgs.onError){ keywordArgs.onError.call(scope, error); } }); deferred.addCallback(function(data){ delete item.parentPath; delete item._loaded; dojo.mixin(item, data); self._processItem(item); if (keywordArgs.onItem){ keywordArgs.onItem.call(scope, item); } });";s:7:"summary";s:33:"See dojo.data.api.Read.loadItem()";s:6:"chains";a:1:{s:4:"call";a:2:{i:0;s:19:"keywordArgs.onError";i:1;s:18:"keywordArgs.onItem";}}}s:29:"dojox.data.FileStore.getLabel";a:5:{s:9:"prototype";s:20:"dojox.data.FileStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"item";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:40:" return this.getValue(item,this.label);";s:7:"summary";s:33:"See dojo.data.api.Read.getLabel()";}s:39:"dojox.data.FileStore.getLabelAttributes";a:5:{s:9:"prototype";s:20:"dojox.data.FileStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"item";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:22:" return [this.label];";s:7:"summary";s:43:"See dojo.data.api.Read.getLabelAttributes()";}s:34:"dojox.data.FileStore.containsValue";a:5:{s:9:"prototype";s:20:"dojox.data.FileStore";s:4:"type";s:8:"Function";s:10:"parameters";a:3:{s:4:"item";a:1:{s:4:"type";s:0:"";}s:9:"attribute";a:1:{s:4:"type";s:0:"";}s:5:"value";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:157:" var values = this.getValues(item,attribute); for(var i = 0; i < values.length; i++){ if(values[i] == value){ return true; } } return false;";s:7:"summary";s:38:"See dojo.data.api.Read.containsValue()";}s:30:"dojox.data.FileStore.getValues";a:5:{s:9:"prototype";s:20:"dojox.data.FileStore";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:4:"item";a:1:{s:4:"type";s:0:"";}s:9:"attribute";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:259:" this._assertIsItem(item); this._assertIsAttribute(attribute); var value = item[attribute]; if(typeof value !== "undefined" && !dojo.isArray(value)){ value = [value]; }else if (typeof value === "undefined"){ value = []; } return value;";s:7:"summary";s:33:"See dojo.data.api.Read.getValue()";}s:27:"dojox.data.FileStore.isItem";a:5:{s:9:"prototype";s:20:"dojox.data.FileStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"item";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:80:" if(item && item[this._storeRef] === this){ return true; } return false;";s:7:"summary";s:31:"See dojo.data.api.Read.isItem()";}s:26:"dojox.data.FileStore.close";a:5:{s:9:"prototype";s:20:"dojox.data.FileStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"request";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:55:" // summary: // See dojo.data.api.Read.close()";s:7:"summary";s:30:"See dojo.data.api.Read.close()";}s:26:"dojox.data.FileStore.fetch";a:6:{s:9:"prototype";s:20:"dojox.data.FileStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:7:"request";a:2:{s:4:"type";s:1:"A";s:7:"summary";s:107:"request object fetchHandler: A function to call for fetched items errorHandler: A function to call on error";}}s:6:"source";s:1078:" request = request || {}; if(!request.store){ request.store = this; } var self = this; var scope = request.scope || dojo.global; //Generate what will be sent over. var reqParams = {}; if(request.query){ reqParams.query = dojo.toJson(request.query); } if(request.sort){ reqParams.sort = dojo.toJson(request.sort); } if(request.queryOptions){ reqParams.queryOptions = dojo.toJson(request.queryOptions); } if(typeof request.start == "number"){ reqParams.start = "" + request.start; } if(typeof request.count == "number"){ reqParams.count = "" + request.count; } if (this.options.length > 0) { reqParams.options = dojo.toJson(this.options); } var getArgs = { url: this.url, preventCache: true, handleAs: "json-comment-optional", content: reqParams }; var deferred = dojo.xhrGet(getArgs); deferred.addCallback(function(data){self._processResult(data, request);}); deferred.addErrback(function(error){ if (request.onError){ request.onError.call(scope, error, request); } });";s:7:"summary";s:34:"Fetch items that match to a query";s:6:"chains";a:1:{s:4:"call";a:1:{i:0;s:15:"request.onError";}}}s:40:"dojox.data.FileStore.fetchItemByIdentity";a:6:{s:9:"prototype";s:20:"dojox.data.FileStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:11:"keywordArgs";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:769:" var path = keywordArgs.identity; var self = this; var scope = keywordArgs.scope || dojo.global; var content = {}; if (this.options.length > 0) { content.options = dojo.toJson(this.options); } if (this.pathAsQueryParam) { content.path = path; } var xhrData = { url: this.pathAsQueryParam? this.url : this.url + "/" + path, handleAs: "json-comment-optional", content: content, preventCache: true }; var deferred = dojo.xhrGet(xhrData); deferred.addErrback(function(error){ if(keywordArgs.onError){ keywordArgs.onError.call(scope, error); } }); deferred.addCallback(function(data){ var item = self._processItem(data); if (keywordArgs.onItem){ keywordArgs.onItem.call(scope, item); } });";s:7:"summary";s:33:"See dojo.data.api.Read.loadItem()";s:6:"chains";a:1:{s:4:"call";a:2:{i:0;s:19:"keywordArgs.onError";i:1;s:18:"keywordArgs.onItem";}}}s:35:"dojox.data.FileStore._processResult";a:7:{s:9:"prototype";s:20:"dojox.data.FileStore";s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:4:"data";a:1:{s:4:"type";s:0:"";}s:7:"request";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:859:" var scope = request.scope || dojo.global; try{ //If the data contains a path separator, set ours if(data.pathSeparator){ this.pathSeparator = data.pathSeparator; } //Invoke the onBegin handler, if any, to return the //size of the dataset as indicated by the service. if(request.onBegin){ request.onBegin.call(scope, data.total, request); } //Now process all the returned items thro var items = this._processItemArray(data.items); if(request.onItem){ var i; for (i = 0; i < items.length; i++) { request.onItem.call(scope, items[i], request); } items = null; } if(request.onComplete){ request.onComplete.call(scope, items, request); } }catch (e){ if (request.onError) { request.onError.call(scope, e, request); }else{ console.debug(e); } }";s:6:"chains";a:1:{s:4:"call";a:4:{i:0;s:15:"request.onBegin";i:1;s:14:"request.onItem";i:2;s:18:"request.onComplete";i:3;s:15:"request.onError";}}s:7:"private";b:1;s:7:"summary";s:0:"";}s:38:"dojox.data.FileStore._processItemArray";a:6:{s:9:"prototype";s:20:"dojox.data.FileStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:9:"itemArray";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:114:" var i; for(i = 0; i < itemArray.length; i++){ this._processItem(itemArray[i]); } return itemArray;";s:7:"summary";s:62:"Internal function for processing an array of items for return.";s:7:"private";b:1;}s:33:"dojox.data.FileStore._processItem";a:6:{s:9:"prototype";s:20:"dojox.data.FileStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"item";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:526:" if(!item){return null;} item[this._storeRef] = this; if(item.children && item.directory){ if(dojo.isArray(item.children)){ var children = item.children; var i; for (i = 0; i < children.length; i++ ){ var name = children[i]; if (dojo.isObject(name)) { children[i] = this._processItem(name); }else{ children[i] = {name: name, _loaded: false, parentPath: item.path}; children[i][this._storeRef] = this; } } }else{ delete item.children; } } return item;";s:7:"summary";s:186:"Internal function for processing an item returned from the store. It sets up the store ref as well as sets up the attributes necessary to invoke a lazy load on a child, if there are any.";s:7:"private";b:1;}s:4:"item";a:2:{s:6:"mixins";a:1:{s:6:"normal";a:1:{i:0;s:4:"data";}}s:7:"summary";s:0:"";}s:10:"dojox.data";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dojox";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}