a:26:{s:9:"#provides";s:22:"dojox.data.PicasaStore";s:9:"#resource";s:19:"data/PicasaStore.js";s:9:"#requires";a:3:{i:0;a:3:{i:0;s:6:"common";i:1;s:26:"dojo.data.util.simpleFetch";i:2;s:4:"dojo";}i:1;a:3:{i:0;s:6:"common";i:1;s:14:"dojo.io.script";i:2;s:4:"dojo";}i:2;a:3:{i:0;s:6:"common";i:1;s:15:"dojo.date.stamp";i:2;s:4:"dojo";}}s:22:"dojox.data.PicasaStore";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:57:" if(args && args.label){ this.label = args.label; }";s:7:"summary";s:38:"Initializer for the PicasaStore store.";s:11:"description";s:274:"The PicasaStore is a Datastore interface to one of the basic services of the Picasa service, the public photo feed. This does not provide access to all the services of Picasa. This store cannot do * and ? filtering as the picasa service provides no interface for wildcards.";s:6:"mixins";a:1:{s:9:"prototype";a:1:{i:0;s:26:"dojo.data.util.simpleFetch";}}s:9:"classlike";b:1;}s:33:"dojox.data.PicasaStore._picasaUrl";a:3:{s:9:"prototype";s:22:"dojox.data.PicasaStore";s:7:"private";b:1;s:7:"summary";s:0:"";}s:32:"dojox.data.PicasaStore._storeRef";a:3:{s:9:"prototype";s:22:"dojox.data.PicasaStore";s:7:"private";b:1;s:7:"summary";s:0:"";}s:28:"dojox.data.PicasaStore.label";a:3:{s:9:"prototype";s:22:"dojox.data.PicasaStore";s:8:"instance";s:22:"dojox.data.PicasaStore";s:7:"summary";s:0:"";}s:36:"dojox.data.PicasaStore._assertIsItem";a:6:{s:9:"prototype";s:22:"dojox.data.PicasaStore";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:137:" if(!this.isItem(item)){ throw new Error("dojox.data.PicasaStore: 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:41:"dojox.data.PicasaStore._assertIsAttribute";a:6:{s:9:"prototype";s:22:"dojox.data.PicasaStore";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:170:" if(typeof attribute !== "string"){ throw new Error("dojox.data.PicasaStore: 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:34:"dojox.data.PicasaStore.getFeatures";a:4:{s:9:"prototype";s:22:"dojox.data.PicasaStore";s:4:"type";s:8:"Function";s:6:"source";s:45:" return { 'dojo.data.api.Read': true };";s:7:"summary";s:36:"See dojo.data.api.Read.getFeatures()";}s:31:"dojox.data.PicasaStore.getValue";a:5:{s:9:"prototype";s:22:"dojox.data.PicasaStore";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:130:" var values = this.getValues(item, attribute); if(values && values.length > 0){ return values[0]; } return defaultValue;";s:7:"summary";s:33:"See dojo.data.api.Read.getValue()";}s:36:"dojox.data.PicasaStore.getAttributes";a:5:{s:9:"prototype";s:22:"dojox.data.PicasaStore";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:186:" return ["id", "published", "updated", "category", "title$type", "title", "summary$type", "summary", "rights$type", "rights", "link", "author", "gphoto$id", "gphoto$name", "location"]; ";s:7:"summary";s:38:"See dojo.data.api.Read.getAttributes()";}s:35:"dojox.data.PicasaStore.hasAttribute";a:5:{s:9:"prototype";s:22:"dojox.data.PicasaStore";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:35:"dojox.data.PicasaStore.isItemLoaded";a:5:{s:9:"prototype";s:22:"dojox.data.PicasaStore";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.isItem(item);";s:7:"summary";s:37:"See dojo.data.api.Read.isItemLoaded()";}s:31:"dojox.data.PicasaStore.loadItem";a:5:{s:9:"prototype";s:22:"dojox.data.PicasaStore";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:58:" // summary: // See dojo.data.api.Read.loadItem()";s:7:"summary";s:33:"See dojo.data.api.Read.loadItem()";}s:31:"dojox.data.PicasaStore.getLabel";a:5:{s:9:"prototype";s:22:"dojox.data.PicasaStore";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:41:"dojox.data.PicasaStore.getLabelAttributes";a:5:{s:9:"prototype";s:22:"dojox.data.PicasaStore";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:36:"dojox.data.PicasaStore.containsValue";a:5:{s:9:"prototype";s:22:"dojox.data.PicasaStore";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:158:" 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:32:"dojox.data.PicasaStore.getValues";a:5:{s:9:"prototype";s:22:"dojox.data.PicasaStore";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:895:" this._assertIsItem(item); this._assertIsAttribute(attribute); if(attribute === "title"){ return [this._unescapeHtml(item.title)]; }else if(attribute === "author"){ return [this._unescapeHtml(item.author[0].name)]; }else if(attribute === "datePublished"){ return [dojo.date.stamp.fromISOString(item.published)]; }else if(attribute === "dateTaken"){ return [dojo.date.stamp.fromISOString(item.date_taken)]; }else if(attribute === "imageUrlSmall"){ return [item.media.thumbnail[1].url]; }else if(attribute === "imageUrl"){ return [item.content$src]; }else if(attribute === "imageUrlMedium"){ return [item.media.thumbnail[2].url]; }else if(attribute === "link"){ return [item.link[1]]; }else if(attribute === "tags"){ return item.tags.split(" "); }else if(attribute === "description"){ return [this._unescapeHtml(item.summary)]; } return [];";s:7:"summary";s:33:"See dojo.data.api.Read.getValue()";}s:29:"dojox.data.PicasaStore.isItem";a:5:{s:9:"prototype";s:22:"dojox.data.PicasaStore";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:28:"dojox.data.PicasaStore.close";a:5:{s:9:"prototype";s:22:"dojox.data.PicasaStore";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:34:"dojox.data.PicasaStore._fetchItems";a:6:{s:9:"prototype";s:22:"dojox.data.PicasaStore";s:4:"type";s:8:"Function";s:10:"parameters";a:3:{s:7:"request";a:2:{s:4:"type";s:1:"A";s:7:"summary";s:14:"request object";}s:12:"fetchHandler";a:2:{s:4:"type";s:1:"A";s:7:"summary";s:34:"function to call for fetched items";}s:12:"errorHandler";a:2:{s:4:"type";s:1:"A";s:7:"summary";s:25:"function to call on error";}}s:6:"source";s:1219:" if(!request.query){ request.query={}; } //Build up the content to send the request for. var content = {alt: "jsonm", pp: "1", psc: "G"}; content['start-index'] = "1"; if(request.query.start){ content['start-index'] = request.query.start; } if(request.query.tags){ content.q = request.query.tags; } if(request.query.userid){ content.uname = request.query.userid; } if(request.query.userids){ content.ids = request.query.userids; } if(request.query.lang){ content.hl = request.query.lang; } if(request.count){ content['max-results'] = request.count; }else{ content['max-results'] = "20"; } //Linking this up to Picasa is a JOY! var self = this; var handle = null; var myHandler = function(data){ if(handle !== null){ dojo.disconnect(handle); } //Process the items... fetchHandler(self._processPicasaData(data), request); }; var getArgs = { url: this._picasaUrl, // preventCache: true, content: content, callbackParamName: 'callback', handle: myHandler }; var deferred = dojo.io.script.get(getArgs); deferred.addErrback(function(error){ dojo.disconnect(handle); errorHandler(error, request); });";s:7:"summary";s:40:"Fetch picasa items that match to a query";s:7:"private";b:1;}s:41:"dojox.data.PicasaStore._processPicasaData";a:6:{s:9:"prototype";s:22:"dojox.data.PicasaStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:4:"data";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:238:" var items = []; if(data.feed){ items = data.feed.entry; //Add on the store ref so that isItem can work. for(var i = 0; i < items.length; i++){ var item = items[i]; item[this._storeRef] = this; } } return items;";s:7:"private";b:1;s:7:"summary";s:0:"";}s:36:"dojox.data.PicasaStore._unescapeHtml";a:8:{s:9:"prototype";s:22:"dojox.data.PicasaStore";s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:3:"str";a:2:{s:4:"type";s:7:"String.";s:7:"summary";s:23:"The string to un-escape";}}s:6:"source";s:160:" str = str.replace(/&/gm, "&").replace(/</gm, "<").replace(/>/gm, ">").replace(/"/gm, "\""); str = str.replace(/'/gm, "'"); return str;";s:7:"summary";s:71:"Utility function to un-escape XML special characters in an HTML string.";s:11:"description";s:71:"Utility function to un-escape XML special characters in an HTML string.";s:14:"return_summary";s:172:"HTML String converted back to the normal text (unescaped) characters (<,>,&, ", etc,). TODO: Check to see if theres already compatible escape() in dojo.string or dojo.html";s:7:"private";b:1;}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:"";}}