tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkuhn...@apache.org
Subject svn commit: r477287 [9/32] - in /tapestry/tapestry4/trunk: tapestry-examples/TimeTracker/ tapestry-examples/TimeTracker/src/config/ tapestry-examples/TimeTracker/src/context/WEB-INF/ tapestry-examples/TimeTracker/src/java/org/apache/tapestry/timetracke...
Date Mon, 20 Nov 2006 18:54:48 GMT
Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/Rijndael.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/Rijndael.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/Rijndael.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/Rijndael.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,2 @@
+
+dojo.provide("dojo.crypto.Rijndael");dojo.require("dojo.crypto");dojo.require("dojo.experimental");dojo.experimental("dojo.crypto.Rijndael");dojo.crypto.Rijndael = new function(){this.encrypt=function(plaintext, key){};this.decrypt=function(ciphertext, key){};}();
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/Rijndael.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/SHA1.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/SHA1.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/SHA1.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/SHA1.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,25 @@
+dojo.require("dojo.crypto");dojo.provide("dojo.crypto.SHA1");dojo.require("dojo.experimental");dojo.experimental("dojo.crypto.SHA1");dojo.crypto.SHA1 = new function(){var chrsz=8;var mask=(1<<chrsz)-1;function toWord(s) {var wa=[];for(var i=0; i<s.length*chrsz; i+=chrsz)
+wa[i>>5]|=(s.charCodeAt(i/chrsz)&mask)<<(i%32);return wa;}
+function toString(wa){var s=[];for(var i=0; i<wa.length*32; i+=chrsz)
+s.push(String.fromCharCode((wa[i>>5]>>>(i%32))&mask));return s.join("");}
+function toHex(wa) {var h="0123456789abcdef";var s=[];for(var i=0; i<wa.length*4; i++){s.push(h.charAt((wa[i>>2]>>((i%4)*8+4))&0xF)+h.charAt((wa[i>>2]>>((i%4)*8))&0xF));}
+return s.join("");}
+function toBase64(wa){var p="=";var tab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var s=[];for(var i=0; i<wa.length*4; i+=3){var t=(((wa[i>>2]>>8*(i%4))&0xFF)<<16)|(((wa[i+1>>2]>>8*((i+1)%4))&0xFF)<<8)|((wa[i+2>>2]>>8*((i+2)%4))&0xFF);for(var j=0; j<4; j++){if(i*8+j*6>wa.length*32) s.push(p);else s.push(tab.charAt((t>>6*(3-j))&0x3F));}}
+return s.join("");}
+function add(x,y){var l=(x&0xffff)+(y&0xffff);var m=(x>>16)+(y>>16)+(l>>16);return (m<<16)|(l&0xffff);}
+function r(x,n){  return (x<<n)|(x>>>(32-n)); }
+function f(u,v,w){ return ((u&v)|(~u&w)); }
+function g(u,v,w){ return ((u&v)|(u&w)|(v&w)); }
+function h(u,v,w){ return (u^v^w); }
+function fn(i,u,v,w){if(i<20) return f(u,v,w);if(i<40) return h(u,v,w);if(i<60) return g(u,v,w);return h(u,v,w);}
+function cnst(i){if(i<20) return 1518500249;if(i<40) return 1859775393;if(i<60) return -1894007588;return -899497514;}
+function core(x,len){x[len>>5]|=0x80<<(24-len%32);x[((len+64>>9)<<4)+15]=len;var w=[];var a= 1732584193;var b=-271733879;var c=-1732584194;var d= 271733878;var e=-1009589776;for(var i=0; i<x.length; i+=16){var olda=a;var oldb=b;var oldc=c;var oldd=d;var olde=e;for(var j=0; j<80; j++){if(j<16) w[j]=x[i+j];else w[j]=r(w[j-3]^w[j-8]^w[j-14]^w[j-16],1);var t=add(add(r(a,5),fn(j,b,c,d)),add(add(e,w[j]),cnst(j)));e=d; d=c; c=r(b,30); b=a; a=t;}
+a=add(a,olda);b=add(b,oldb);c=add(c,oldc);d=add(d,oldd);e=add(e,olde);}
+return [a,b,c,d,e];}
+function hmac(data,key){var wa=toWord(key);if(wa.length>16) wa=core(wa,key.length*chrsz);var l=[], r=[];for(var i=0; i<16; i++){l[i]=wa[i]^0x36363636;r[i]=wa[i]^0x5c5c5c5c;}
+var h=core(l.concat(toWord(data)),512+data.length*chrsz);return core(r.concat(h),640);}
+this.compute=function(data,outputType){var out=outputType||dojo.crypto.outputTypes.Base64;switch(out){case dojo.crypto.outputTypes.Hex:{return toHex(core(toWord(data),data.length*chrsz));}
+case dojo.crypto.outputTypes.String:{return toString(core(toWord(data),data.length*chrsz));}
+default:{return toBase64(core(toWord(data),data.length*chrsz));}}};this.getHMAC=function(data,key,outputType){var out=outputType||dojo.crypto.outputTypes.Base64;switch(out){case dojo.crypto.outputTypes.Hex:{return toHex(hmac(data,key));}
+case dojo.crypto.outputTypes.String:{return toString(hmac(data,key));}
+default:{return toBase64(hmac(data,key));}}};}();
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/SHA1.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/SHA256.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/SHA256.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/SHA256.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/SHA256.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,2 @@
+
+dojo.provide("dojo.crypto.SHA256");dojo.require("dojo.crypto");dojo.require("dojo.experimental");dojo.experimental("dojo.crypto.SHA256");dojo.crypto.SHA256 = new function(){this.compute=function(s){};}();
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/SHA256.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/__package__.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/__package__.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/__package__.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/__package__.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,4 @@
+
+dojo.kwCompoundRequire({common: [
+"dojo.crypto","dojo.crypto.MD5"
+]});dojo.provide("dojo.crypto.*");
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/crypto/__package__.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,2 @@
+
+dojo.provide("dojo.data");dojo.data = {};
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/CsvStore.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/CsvStore.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/CsvStore.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/CsvStore.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,12 @@
+
+dojo.provide("dojo.data.CsvStore");dojo.require("dojo.data.core.RemoteStore");dojo.require("dojo.lang.assert");dojo.declare("dojo.data.CsvStore", dojo.data.core.RemoteStore, {_setupQueryRequest: function( result,  requestKw) {var serverQueryUrl = this._serverQueryUrl ? this._serverQueryUrl : "";var queryUrl = result.query ? result.query : "";requestKw.url = serverQueryUrl + queryUrl;requestKw.method = 'get';},_resultToQueryData: function( serverResponseData) {var csvFileContentString = serverResponseData;var arrayOfArrays = this._getArrayOfArraysFromCsvFileContents(csvFileContentString);var arrayOfObjects = this._getArrayOfObjectsFromArrayOfArrays(arrayOfArrays);var remoteStoreData = this._getRemoteStoreDataFromArrayOfObjects(arrayOfObjects);return remoteStoreData;},_setupSaveRequest: function( saveKeywordArgs,  requestKw) {},_getArrayOfArraysFromCsvFileContents: function( csvFileContents) {dojo.lang.assertType(csvFileContents, String);var lineEndingCharacters = new RegExp("
 \r\n|\n|\r");var leadingWhiteSpaceCharacters = new RegExp("^\\s+",'g');var trailingWhiteSpaceCharacters = new RegExp("\\s+$",'g');var doubleQuotes = new RegExp('""','g');var arrayOfOutputRecords = [];var arrayOfInputLines = csvFileContents.split(lineEndingCharacters);for (var i in arrayOfInputLines) {var singleLine = arrayOfInputLines[i];if (singleLine.length > 0) {var listOfFields = singleLine.split(',');var j = 0;while (j < listOfFields.length) {var space_field_space = listOfFields[j];var field_space = space_field_space.replace(leadingWhiteSpaceCharacters, '');var field = field_space.replace(trailingWhiteSpaceCharacters, '');var firstChar = field.charAt(0);var lastChar = field.charAt(field.length - 1);var secondToLastChar = field.charAt(field.length - 2);var thirdToLastChar = field.charAt(field.length - 3);if ((firstChar == '"') &&
+((lastChar != '"') ||
+((lastChar == '"') && (secondToLastChar == '"') && (thirdToLastChar != '"')) )) {if (j+1 === listOfFields.length) {return null;}
+var nextField = listOfFields[j+1];listOfFields[j] = field_space + ',' + nextField;listOfFields.splice(j+1, 1);} else {if ((firstChar == '"') && (lastChar == '"')) {field = field.slice(1, (field.length - 1));field = field.replace(doubleQuotes, '"');}
+listOfFields[j] = field;j += 1;}}
+arrayOfOutputRecords.push(listOfFields);}}
+return arrayOfOutputRecords;},_getArrayOfObjectsFromArrayOfArrays: function( arrayOfArrays) {dojo.lang.assertType(arrayOfArrays, Array);var arrayOfItems = [];if (arrayOfArrays.length > 1) {var arrayOfKeys = arrayOfArrays[0];for (var i = 1; i < arrayOfArrays.length; ++i) {var row = arrayOfArrays[i];var item = {};for (var j in row) {var value = row[j];var key = arrayOfKeys[j];item[key] = value;}
+arrayOfItems.push(item);}}
+return arrayOfItems;},_getRemoteStoreDataFromArrayOfObjects: function( arrayOfObjects) {dojo.lang.assertType(arrayOfObjects, Array);var output = {};for (var i = 0; i < arrayOfObjects.length; ++i) {var object = arrayOfObjects[i];for (var key in object) {var value = object[key];object[key] = [value];}
+output[i] = object;}
+return output;},newItem: function( attributes,  keywordArgs) {dojo.unimplemented('dojo.data.CsvStore.newItem');},deleteItem: function( item) {dojo.unimplemented('dojo.data.CsvStore.deleteItem');},setValues: function( item,  attribute,  values) {dojo.unimplemented('dojo.data.CsvStore.setValues');},set: function( item,  attribute,  value) {dojo.unimplemented('dojo.data.CsvStore.set');},unsetAttribute: function( item,  attribute) {dojo.unimplemented('dojo.data.CsvStore.unsetAttribute');},save: function( keywordArgs) {dojo.unimplemented('dojo.data.CsvStore.save');},revert: function() {dojo.unimplemented('dojo.data.CsvStore.revert');},isDirty: function( item) {dojo.unimplemented('dojo.data.CsvStore.isDirty');}});
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/CsvStore.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/OpmlStore.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/OpmlStore.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/OpmlStore.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/OpmlStore.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,15 @@
+
+dojo.provide("dojo.data.OpmlStore");dojo.require("dojo.data.core.Read");dojo.require("dojo.data.core.Result");dojo.require("dojo.lang.assert");dojo.require("dojo.json");dojo.require("dojo.experimental");dojo.experimental("dojo.data.OpmlStore");dojo.declare("dojo.data.OpmlStore", dojo.data.core.Read, {initializer: function( keywordParameters) {this._arrayOfTopLevelItems = [];this._metadataNodes = null;this._loadFinished = false;this._opmlFileUrl = keywordParameters["url"];},_assertIsItem: function( item) {if (!this.isItem(item)) {throw new Error("dojo.data.OpmlStore: a function was passed an item argument that was not an item");}},_removeChildNodesThatAreNotElementNodes: function( node,  recursive) {var childNodes = node.childNodes;if (childNodes.length == 0) {return;}
+var nodesToRemove = [];var i, childNode;for (i = 0; i < childNodes.length; ++i) {childNode = childNodes[i];if (childNode.nodeType != Node.ELEMENT_NODE) {nodesToRemove.push(childNode);}};for (i = 0; i < nodesToRemove.length; ++i) {childNode = nodesToRemove[i];node.removeChild(childNode);}
+if (recursive) {for (i = 0; i < childNodes.length; ++i) {childNode = childNodes[i];this._removeChildNodesThatAreNotElementNodes(childNode, recursive);}}},_processRawXmlTree: function( rawXmlTree) {var headNodes = rawXmlTree.getElementsByTagName('head');var headNode = headNodes[0];this._removeChildNodesThatAreNotElementNodes(headNode);this._metadataNodes = headNode.childNodes;var bodyNodes = rawXmlTree.getElementsByTagName('body');var bodyNode = bodyNodes[0];this._removeChildNodesThatAreNotElementNodes(bodyNode, true);var bodyChildNodes = bodyNodes[0].childNodes;for (var i = 0; i < bodyChildNodes.length; ++i) {var node = bodyChildNodes[i];if (node.tagName == 'outline') {this._arrayOfTopLevelItems.push(node);}}},get: function( item,  attribute,  defaultValue) {this._assertIsItem(item);if (attribute == 'children') {return (item.firstChild || defaultValue);} else {var value = item.getAttribute(attribute);value = (value != undefined) ? value : defaultValue;return value;}},getValu
 es: function( item,  attribute) {this._assertIsItem(item);if (attribute == 'children') {var array = [];for (var i = 0; i < item.childNodes.length; ++i) {array.push(item.childNodes[i]);}
+return array;} else {return [item.getAttribute(attribute)];}},getAttributes: function( item) {this._assertIsItem(item);var attributes = [];var xmlNode = item;var xmlAttributes = xmlNode.attributes;for (var i = 0; i < xmlAttributes.length; ++i) {var xmlAttribute = xmlAttributes.item(i);attributes.push(xmlAttribute.nodeName);}
+if (xmlNode.childNodes.length > 0) {attributes.push('children');}
+return attributes;},hasAttribute: function( item,  attribute) {return (this.getValues(item, attribute).length > 0);},containsValue: function( item,  attribute,  value) {var values = this.getValues(item, attribute);for (var i = 0; i < values.length; ++i) {var possibleValue = values[i];if (value == possibleValue) {return true;}}
+return false;},isItem: function( something) {return (something &&
+something.nodeType == Node.ELEMENT_NODE &&
+something.tagName == 'outline');},isItemAvailable: function( something) {return this.isItem(something);},find: function( keywordArgs) {var result = null;if (keywordArgs instanceof dojo.data.core.Result) {result = keywordArgs;result.store = this;} else {result = new dojo.data.core.Result(keywordArgs, this);}
+var self = this;var bindHandler = function(type, data, evt) {var scope = result.scope || dj_global;if (type == "load") {self._processRawXmlTree(data);if (result.saveResult) {result.items = self._arrayOfTopLevelItems;}
+if (result.onbegin) {result.onbegin.call(scope, result);}
+for (var i=0; i < self._arrayOfTopLevelItems.length; i++) {var item = self._arrayOfTopLevelItems[i];if (result.onnext && !result._aborted) {result.onnext.call(scope, item, result);}}
+if (result.oncompleted && !result._aborted) {result.oncompleted.call(scope, result);}} else if(type == "error" || type == 'timeout') {var errorObject = data;if (result.onerror) {result.onerror.call(scope, data);}}};if (!this._loadFinished) {if (this._opmlFileUrl) {var bindRequest = dojo.io.bind({url: this._opmlFileUrl,handle: bindHandler,mimetype: "text/xml",sync: (result.sync || false) });result._abortFunc = bindRequest.abort;}}
+return result;},getIdentity: function( item) {dojo.unimplemented('dojo.data.OpmlStore.getIdentity()');return null;},findByIdentity: function( identity) {dojo.unimplemented('dojo.data.OpmlStore.findByIdentity()');return null;}});
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/OpmlStore.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/RdfStore.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/RdfStore.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/RdfStore.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/RdfStore.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,24 @@
+
+dojo.provide("dojo.data.RdfStore");dojo.provide("dojo.data.RhizomeStore");dojo.require("dojo.lang.declare");dojo.require("dojo.data.core.RemoteStore");dojo.require("dojo.experimental");dojo.data.RdfDatatypeSerializer = function(type, convertFunc, uri) {this.type = type;this._converter = convertFunc;this.uri = uri;this.serialize = function(value) {return this._converter.call(value, value);};}
+dojo.declare("dojo.data.RdfStore", dojo.data.core.RemoteStore, {_datatypeMap: {literal: function(value) {var literal = value.value;if (value["xml:lang"]) {literal.lang = value["xml:lang"];}
+return literal;},uri: function(value) {return { id: value.value };},bnode: function(value) {return { id: '_:' + value.value };},'http://www.w3.org/2001/XMLSchema#int': function(value) {return parseInt(value.value);},'http://www.w3.org/2001/XMLSchema#integer': function(value) {return parseInt(value.value);},'http://www.w3.org/2001/XMLSchema#long': function(value) {return parseInt(value.value);},'http://www.w3.org/2001/XMLSchema#float': function(value) {return parseFloat(value.value);},'http://www.w3.org/2001/XMLSchema#double': function(value) {return parseFloat(value.value);},'http://www.w3.org/2001/XMLSchema#boolean': function(value) {return !value || value == "false" || value == "0" ? false : true;}},_datatypeSerializers: [
+new dojo.data.RdfDatatypeSerializer(Number, Number.toString, 'http://www.w3.org/2001/XMLSchema#float'),new dojo.data.RdfDatatypeSerializer(Boolean, Boolean.toString, 'http://www.w3.org/2001/XMLSchema#boolean')
+],_findDatatypeSerializer: function(value) {var length = this._datatypeSerializers.length;for (var i = 0; i < length; i++) {var datatype = this._datatypeSerializers[i];if (value instanceof datatype.type) {return datatype;}}},_toRDFValue: function(value) {var rdfvalue = {};if (value.id) {if (value.id.slice(0, 2) == '_:') {rdfvalue.type = 'bnode';rdfvalue.value = value.id.substring(2);} else {rdfvalue.type = 'uri';rdfvalue.value = value.id;}} else if (typeof value == "string" || value instanceof String) {rdfvalue.type = 'literal';rdfvalue.value = value;if (value.lang)
+rdfvalue["xml:lang"] = value.lang;} else {if (typeof value == "number")
+value = new Number(value);else if (typeof value == "boolean")
+value = new Boolean(value);var datatype = this._findDatatypeSerializer(value);if (datatype) {rdfvalue = {"type": "typed-literal","datatype": datatype.uri,"value": value.toString()};} else {rdfvalue = {"type": "literal","value": value.toString() };}}
+return rdfvalue;},_setupSaveRequest: function(saveKeywordArgs, requestKw) {var rdfResult = { "head":  {'vars': ['s','p','o']},"results": {'bindings': []}};var resources = [];for (var key in this._deleted) {resources.push(key);}
+rdfResult.results.deleted = resources;for (key in this._changed) {var subject = this._toRDFValue(this.getIdentity(key))
+var attributes = this._changed[key];for (var attr in attributes) {var predicate = {type:'uri', value: attr};var values = attributes[attr];if (!values.length)
+continue;var rdfvalues = [];for (var i = 0; i < values.length; i++) {var rdfvalue = this._toRDFValue(values[i]);rdfResult.results.bindings.push(
+{s: subject, p: predicate, o: rdfvalue});}}}
+var oldRegistry = dojo.json.jsonRegistry;dojo.json.jsonRegistry = this._jsonRegistry;var jsonString = dojo.json.serialize(rdfResult);dojo.json.jsonRegistry = oldRegistry;requestKw.postContent = jsonString;},_resultToQueryMetadata: function(json) {return json.head;},_resultToQueryData: function(json) {var items = {};var stmts = json.results.bindings;for (var i = 0; i < stmts.length; i++) {var stmt = stmts[i];var subject = stmt.s.value;if (stmt.s.type == 'bnode') {subject = '_:' + subject;}
+var attributes = data[subject];if (!attributes) {attributes = {};data[stmt.s] = attributes;}
+var attr = attributes[stmt.p.value];if (!attr) {attributes[stmt.p.value] = [stmt.o];} else {attr.push(stmt.o);}}
+return items;}});dojo.declare("dojo.data.RhizomeStore", dojo.data.RdfStore, {initializer: function(kwArgs) {this._serverQueryUrl = kwArgs.baseUrl + 'search?view=json&searchType=RxPath&search=';this._serverSaveUrl = kwArgs.baseUrl + 'save-metadata';},_resultToQueryMetadata: function(json) {return json;},_resultToQueryData: function(json) {return json;},_setupSaveRequest: function(saveKeywordArgs, requestKw) {requestKw.url = this._serverSaveUrl;requestKw.method = 'post';requestKw.mimetype = "text/plain";var resources = [];for (var key in this._deleted) {resources.push(key);}
+var changes = {};for (key in this._changed) {if (!this._added[key]) {resources.push(key);}
+var attributes = this._changed[key];var rdfattributes = {};for (var attr in attributes) {var values = attributes[attr];if (!values.length)
+continue;var rdfvalues = [];for (var i = 0; i < values.length; i++) {var rdfvalue = this._toRDFValue(values[i]);rdfvalues.push(rdfvalue);}
+rdfattributes[attr] = rdfvalues;}
+changes[key] = rdfattributes;}
+var oldRegistry = dojo.json.jsonRegistry;dojo.json.jsonRegistry = this._jsonRegistry;var jsonString = dojo.json.serialize(changes);dojo.json.jsonRegistry = oldRegistry;requestKw.content = {rdfFormat: 'json',resource: resources,metadata: jsonString};}});
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/RdfStore.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/YahooStore.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/YahooStore.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/YahooStore.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/YahooStore.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,6 @@
+
+dojo.provide("dojo.data.YahooStore");dojo.require("dojo.data.core.RemoteStore");dojo.require("dojo.lang.declare");dojo.require("dojo.io.ScriptSrcIO");dojo.declare("dojo.data.YahooStore", dojo.data.core.RemoteStore, {_setupQueryRequest: function(result, requestKw) {var start = 1;var count = 1;if (result) {start = result.start || start;count = result.count || count;}
+var sourceUrl = "http://api.search.yahoo.com/WebSearchService/V1/webSearch?appid=dojo&language=en&query=" +
+result.query + "&start=" + start + "&results=" + count + "&output=json";requestKw.url = sourceUrl;requestKw.transport = "ScriptSrcTransport";requestKw.mimetype = "text/json";requestKw.jsonParamName = 'callback';},_resultToQueryMetadata: function(json) {return json.ResultSet;},_resultToQueryData: function(json) {var data = {}
+for (var i = 0; i < json.ResultSet.totalResultsReturned; ++i) {var record = json.ResultSet.Result[i];var item = {};item["Url"] = [record.Url];item["Title"] = [record.Title];item["Summary"] =[ record.Summary];var arrayIndex = (json.ResultSet.firstResultPosition - 1) + i;data[ arrayIndex.toString() ] = item;}
+return data;}});
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/YahooStore.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/core/Read.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/core/Read.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/core/Read.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/core/Read.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,2 @@
+
+dojo.provide("dojo.data.core.Read");dojo.require("dojo.data.core.Result");dojo.require("dojo.lang.declare");dojo.require("dojo.experimental");dojo.experimental("dojo.data.core.Read");dojo.declare("dojo.data.core.Read", null, {get: function( item,  attribute,  defaultValue) {dojo.unimplemented('dojo.data.core.Read.get');var attributeValue = null;return attributeValue;},getValues: function( item,  attribute) {dojo.unimplemented('dojo.data.core.Read.getValues');var array = null;return array;},getAttributes: function( item) {dojo.unimplemented('dojo.data.core.Read.getAttributes');var array = null;return array;},hasAttribute: function( item,  attribute) {dojo.unimplemented('dojo.data.core.Read.hasAttribute');return false;},containsValue: function( item,  attribute,  value) {dojo.unimplemented('dojo.data.core.Read.containsValue');return false;},isItem: function( something) {dojo.unimplemented('dojo.data.core.Read.isItem');return false;},isItemAvailable: function( something) {dojo.
 unimplemented('dojo.data.core.Read.isItemAvailable');return false;},find: function( keywordArgs) {dojo.unimplemented('dojo.data.core.Read.find');var result = null;return result;},getIdentity: function( item) {dojo.unimplemented('dojo.data.core.Read.getIdentity');var itemIdentifyString = null;return itemIdentifyString;},findByIdentity: function( identity) {dojo.unimplemented('dojo.data.core.Read.getByIdentity');var item = null;return item;}});
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/core/Read.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/core/RemoteStore.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/core/RemoteStore.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/core/RemoteStore.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/core/RemoteStore.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,44 @@
+
+dojo.provide("dojo.data.core.RemoteStore");dojo.require("dojo.data.core.Read");dojo.require("dojo.data.core.Write");dojo.require("dojo.data.core.Result");dojo.require("dojo.experimental");dojo.require("dojo.Deferred");dojo.require("dojo.lang.declare");dojo.require("dojo.json");dojo.require("dojo.io.*");dojo.experimental("dojo.data.core.RemoteStore");dojo.lang.declare("dojo.data.core.RemoteStore", [dojo.data.core.Read, dojo.data.core.Write], {_datatypeMap: {},_jsonRegistry: dojo.json.jsonRegistry,initializer: function( kwArgs) {if (!kwArgs) {kwArgs = {};}
+this._serverQueryUrl = kwArgs.queryUrl || "";this._serverSaveUrl = kwArgs.saveUrl || "";this._deleted = {};this._changed = {};this._added = {};this._results = {};this._data = {};this._numItems = 0;},_setupQueryRequest: function( result,  requestKw) {result.query = result.query || "";requestKw.url = this._serverQueryUrl + encodeURIComponent(result.query);requestKw.method = 'get';requestKw.mimetype = "text/json";},_resultToQueryMetadata: function( serverResponseData) {return serverResponseData;},_resultToQueryData: function( serverResponseData) {return serverResponseData.data;},_remoteToLocalValues: function( attributes) {for (var key in attributes) {var values = attributes[key];for (var i = 0; i < values.length; i++) {var value = values[i];var type = value.datatype || value.type;if (type) {var localValue = value.value;if (this._datatypeMap[type])
+localValue = this._datatypeMap[type](value);values[i] = localValue;}}}
+return attributes;},_queryToQueryKey: function(query) {if (typeof query == "string")
+return query;else
+return dojo.json.serialize(query);},_assertIsItem: function( item) {if (!this.isItem(item)) {throw new Error("dojo.data.RemoteStore: a function was passed an item argument that was not an item");}},get: function( item,  attribute,  defaultValue) {var valueArray = this.getValues(item, attribute);if (valueArray.length == 0) {return defaultValue;}
+return valueArray[0];},getValues: function( item,  attribute) {var itemIdentity = this.getIdentity(item);this._assertIsItem(itemIdentity);var changes = this._changed[itemIdentity];if (changes) {var newvalues = changes[attribute];if (newvalues !== undefined) {return newvalues;}
+else {return [];}}
+return this._data[itemIdentity][0][attribute];},getAttributes: function( item) {var itemIdentity = this.getIdentity(item);if (!itemIdentity)
+return undefined;var atts = [];var attrDict = this._data[itemIdentity][0];for (var att in attrDict) {atts.push(att);}
+return atts;},hasAttribute: function( item,  attribute) {var valueArray = this.getValues(item, attribute);return valueArray.length ? true : false;},containsValue: function( item,  attribute,  value) {var valueArray = this.getValues(item, attribute);for (var i=0; i < valueArray.length; i++) {if (valueArray[i] == value) {return true;}}
+return false;},isItem: function( something) {if (!something) { return false; }
+var itemIdentity = something;if (this._deleted[itemIdentity]) { return false; }
+if (this._data[itemIdentity]) { return true; }
+if (this._added[itemIdentity]) { return true; }
+return false;},find: function( keywordArgs) {var result = null;if (keywordArgs instanceof dojo.data.core.Result) {result = keywordArgs;result.store = this;} else {result = new dojo.data.core.Result(keywordArgs, this);}
+var query = result.query;var self = this;var bindfunc = function(type, data, evt) {var scope = result.scope || dj_global;if(type == "load") {result.resultMetadata = self._resultToQueryMetadata(data);var dataDict = self._resultToQueryData(data);if (result.onbegin) {result.onbegin.call(scope, result);}
+var count = 0;var resultData = [];var newItemCount = 0;for (var key in dataDict) {if (result._aborted)  {break;}
+if (!self._deleted[key]) {var values = dataDict[key];var attributeDict = self._remoteToLocalValues(values);var existingValue = self._data[key];var refCount = 1;if (existingValue) {refCount = ++existingValue[1];} else {newItemCount++;}
+self._data[key] = [ attributeDict, refCount];resultData.push(key);count++;if (result.onnext) {result.onnext.call(scope, key, result);}}}
+self._results[self._queryToQueryKey(query)] = resultData;self._numItems += newItemCount;result.length = count;if (result.saveResult) {result.items = resultData;}
+if (!result._aborted && result.oncompleted) {result.oncompleted.call(scope, result);}} else if(type == "error" || type == 'timeout') {dojo.debug("find error: " + dojo.json.serialize(data));if (result.onerror) {result.onerror.call(scope, data);}}};var bindKw = keywordArgs.bindArgs || {};bindKw.sync = result.sync;bindKw.handle = bindfunc;this._setupQueryRequest(result, bindKw);var request = dojo.io.bind(bindKw);result._abortFunc = request.abort;return result;},getIdentity: function(item) {if (!this.isItem(item)) {return null;}
+return (item.id ? item.id : item);},newItem: function( attributes,  keywordArgs) {var itemIdentity = keywordArgs['identity'];if (this._deleted[itemIdentity]) {delete this._deleted[itemIdentity];} else {this._added[itemIdentity] = 1;}
+if (attributes) {for (var attribute in attributes) {var valueOrArrayOfValues = attributes[attribute];if (dojo.lang.isArray(valueOrArrayOfValues)) {this.setValues(itemIdentity, attribute, valueOrArrayOfValues);} else {this.set(itemIdentity, attribute, valueOrArrayOfValues);}}}
+return { id: itemIdentity };},deleteItem: function( item) {var identity = this.getIdentity(item);if (!identity) {return false;}
+if (this._added[identity]) {delete this._added[identity];} else {this._deleted[identity] = 1;}
+if (this._changed[identity]) {delete this._changed[identity];}
+return true;},setValues: function( item,  attribute,  values) {var identity = this.getIdentity(item);if (!identity) {return undefined;}
+var changes = this._changed[identity];if (!changes) {changes = {}
+this._changed[identity] = changes;}
+changes[attribute] = values;return true;},set: function( item,  attribute,  value) {return this.setValues(item, attribute, [value]);},unsetAttribute: function( item,  attribute) {return this.setValues(item, attribute, []);},_initChanges: function() {this._deleted = {};this._changed = {};this._added = {};},_setupSaveRequest: function(saveKeywordArgs, requestKw) {requestKw.url = this._serverSaveUrl;requestKw.method = 'post';requestKw.mimetype = "text/plain";var deleted = [];for (var key in this._deleted) {deleted.push(key);}
+var saveStruct = {'changed': this._changed, 'deleted': deleted };var oldRegistry = dojo.json.jsonRegistry;dojo.json.jsonRegistry = this._jsonRegistry;var jsonString = dojo.json.serialize(saveStruct);dojo.json.jsonRegistry = oldRegistry;requestKw.postContent = jsonString;},save: function( keywordArgs) {keywordArgs = keywordArgs || {};var result = new dojo.Deferred();var self = this;var bindfunc = function(type, data, evt) {if(type == "load"){if (result.fired == 1) {return;}
+var key = null;for (key in self._added) {if (!self._data[key])
+self._data[key] = [{} , 1];}
+for (key in self._changed) {var existing = self._data[key];var changes = self._changed[key];if (existing) {existing[0] = changes;} else {self._data[key] = [changes, 1];}}
+for (key in self._deleted) {if (self._data[key]) {delete self._data[key];}}
+self._initChanges();result.callback(true);} else if(type == "error" || type == 'timeout'){result.errback(data);}};var bindKw = { sync: keywordArgs["sync"], handle: bindfunc };this._setupSaveRequest(keywordArgs, bindKw);var request = dojo.io.bind(bindKw);result.canceller = function(deferred) { request.abort(); };return result;},revert: function() {this._initChanges();return true;},isDirty: function( item) {if (item) {var identity = item.id || item;return this._deleted[identity] || this._changed[identity];} else {var key = null;for (key in this._changed) {return true;}
+for (key in this._deleted) {return true;}
+for (key in this._added) {return true;}
+return false;}},createReference: function(idstring) {return { id : idstring };},getSize: function() {return this._numItems;},forgetResults: function(query) {var queryKey = this._queryToQueryKey(query);var results = this._results[queryKey];if (!results) return false;var removed = 0;for (var i = 0; i < results.length; i++) {var key = results[i];var existingValue = this._data[key];if (existingValue[1] <= 1) {delete this._data[key];removed++;}
+else
+existingValue[1] = --existingValue[1];}
+delete this._results[queryKey];this._numItems -= removed;return true;}});
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/core/RemoteStore.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/core/Result.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/core/Result.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/core/Result.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/core/Result.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,3 @@
+
+dojo.provide("dojo.data.core.Result");dojo.require("dojo.lang.declare");dojo.require("dojo.experimental");dojo.experimental("dojo.data.core.Result");dojo.declare("dojo.data.core.Result", null, {initializer: function( keywordArgs,  store) {this.fromKwArgs(keywordArgs || {});this.items = null;this.resultMetadata = null;this.length = -1;this.store = store;this._aborted = false;this._abortFunc = null;},sync: true,abort: function() {this._aborted = true;if (this._abortFunc) {this._abortFunc();}},fromKwArgs: function( kwArgs) {if (typeof kwArgs.saveResult == "undefined") {this.saveResult = kwArgs.onnext ? false : true;}
+dojo.lang.mixin(this, kwArgs);}});
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/core/Result.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/core/Write.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/core/Write.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/core/Write.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/core/Write.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,2 @@
+
+dojo.provide("dojo.data.core.Write");dojo.require("dojo.data.core.Read");dojo.require("dojo.lang.declare");dojo.require("dojo.experimental");dojo.experimental("dojo.data.core.Write");dojo.declare("dojo.data.core.Write", dojo.data.core.Read, {newItem: function( keywordArgs) {var newItem;dojo.unimplemented('dojo.data.core.Write.newItem');return newItem;},deleteItem: function( item) {dojo.unimplemented('dojo.data.core.Write.deleteItem');return false;},set: function( item,  attribute,  value) {dojo.unimplemented('dojo.data.core.Write.set');return false;},setValues: function( item,  attribute,  values) {dojo.unimplemented('dojo.data.core.Write.setValues');return false;},unsetAttribute: function( item,  attribute) {dojo.unimplemented('dojo.data.core.Write.clear');return false;},save: function() {dojo.unimplemented('dojo.data.core.Write.save');return false;},revert: function() {dojo.unimplemented('dojo.data.core.Write.revert');return false;},isDirty: function( item) {dojo.unimpleme
 nted('dojo.data.core.Write.isDirty');return false;}});
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/core/Write.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Attribute.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Attribute.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Attribute.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Attribute.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,2 @@
+
+dojo.provide("dojo.data.old.Attribute");dojo.require("dojo.data.old.Item");dojo.require("dojo.lang.assert");dojo.data.old.Attribute = function( dataProvider,  attributeId) {dojo.lang.assertType(dataProvider, dojo.data.old.provider.Base, {optional: true});dojo.lang.assertType(attributeId, String);dojo.data.old.Item.call(this, dataProvider);this._attributeId = attributeId;};dojo.inherits(dojo.data.old.Attribute, dojo.data.old.Item);dojo.data.old.Attribute.prototype.toString = function() {return this._attributeId;};dojo.data.old.Attribute.prototype.getAttributeId = function() {return this._attributeId;};dojo.data.old.Attribute.prototype.getType = function() {return this.get('type');};dojo.data.old.Attribute.prototype.setType = function( type) {this.set('type', type);};
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Attribute.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Item.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Item.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Item.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Item.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,25 @@
+
+dojo.provide("dojo.data.old.Item");dojo.require("dojo.data.old.Observable");dojo.require("dojo.data.old.Value");dojo.require("dojo.lang.common");dojo.require("dojo.lang.assert");dojo.data.old.Item = function( dataProvider) {dojo.lang.assertType(dataProvider, dojo.data.old.provider.Base, {optional: true});dojo.data.old.Observable.call(this);this._dataProvider = dataProvider;this._dictionaryOfAttributeValues = {};};dojo.inherits(dojo.data.old.Item, dojo.data.old.Observable);dojo.data.old.Item.compare = function( itemOne,  itemTwo) {dojo.lang.assertType(itemOne, dojo.data.old.Item);if (!dojo.lang.isOfType(itemTwo, dojo.data.old.Item)) {return -1;}
+var nameOne = itemOne.getName();var nameTwo = itemTwo.getName();if (nameOne == nameTwo) {var attributeArrayOne = itemOne.getAttributes();var attributeArrayTwo = itemTwo.getAttributes();if (attributeArrayOne.length != attributeArrayTwo.length) {if (attributeArrayOne.length > attributeArrayTwo.length) {return 1;} else {return -1;}}
+for (var i in attributeArrayOne) {var attribute = attributeArrayOne[i];var arrayOfValuesOne = itemOne.getValues(attribute);var arrayOfValuesTwo = itemTwo.getValues(attribute);dojo.lang.assert(arrayOfValuesOne && (arrayOfValuesOne.length > 0));if (!arrayOfValuesTwo) {return 1;}
+if (arrayOfValuesOne.length != arrayOfValuesTwo.length) {if (arrayOfValuesOne.length > arrayOfValuesTwo.length) {return 1;} else {return -1;}}
+for (var j in arrayOfValuesOne) {var value = arrayOfValuesOne[j];if (!itemTwo.hasAttributeValue(value)) {return 1;}}
+return 0;}} else {if (nameOne > nameTwo) {return 1;} else {return -1;}}};dojo.data.old.Item.prototype.toString = function() {var arrayOfStrings = [];var attributes = this.getAttributes();for (var i in attributes) {var attribute = attributes[i];var arrayOfValues = this.getValues(attribute);var valueString;if (arrayOfValues.length == 1) {valueString = arrayOfValues[0];} else {valueString = '[';valueString += arrayOfValues.join(', ');valueString += ']';}
+arrayOfStrings.push('  ' + attribute + ': ' + valueString);}
+var returnString = '{ ';returnString += arrayOfStrings.join(',\n');returnString += ' }';return returnString;};dojo.data.old.Item.prototype.compare = function( otherItem) {return dojo.data.old.Item.compare(this, otherItem);};dojo.data.old.Item.prototype.isEqual = function( otherItem) {return (this.compare(otherItem) == 0);};dojo.data.old.Item.prototype.getName = function() {return this.get('name');};dojo.data.old.Item.prototype.get = function( attributeId) {var literalOrValueOrArray = this._dictionaryOfAttributeValues[attributeId];if (dojo.lang.isUndefined(literalOrValueOrArray)) {return null;}
+if (literalOrValueOrArray instanceof dojo.data.old.Value) {return literalOrValueOrArray.getValue();}
+if (dojo.lang.isArray(literalOrValueOrArray)) {var dojoDataValue = literalOrValueOrArray[0];return dojoDataValue.getValue();}
+return literalOrValueOrArray;};dojo.data.old.Item.prototype.getValue = function( attributeId) {var literalOrValueOrArray = this._dictionaryOfAttributeValues[attributeId];if (dojo.lang.isUndefined(literalOrValueOrArray)) {return null;}
+if (literalOrValueOrArray instanceof dojo.data.old.Value) {return literalOrValueOrArray;}
+if (dojo.lang.isArray(literalOrValueOrArray)) {var dojoDataValue = literalOrValueOrArray[0];return dojoDataValue;}
+var literal = literalOrValueOrArray;dojoDataValue = new dojo.data.old.Value(literal);this._dictionaryOfAttributeValues[attributeId] = dojoDataValue;return dojoDataValue;};dojo.data.old.Item.prototype.getValues = function( attributeId) {var literalOrValueOrArray = this._dictionaryOfAttributeValues[attributeId];if (dojo.lang.isUndefined(literalOrValueOrArray)) {return null;}
+if (literalOrValueOrArray instanceof dojo.data.old.Value) {var array = [literalOrValueOrArray];this._dictionaryOfAttributeValues[attributeId] = array;return array;}
+if (dojo.lang.isArray(literalOrValueOrArray)) {return literalOrValueOrArray;}
+var literal = literalOrValueOrArray;var dojoDataValue = new dojo.data.old.Value(literal);array = [dojoDataValue];this._dictionaryOfAttributeValues[attributeId] = array;return array;};dojo.data.old.Item.prototype.load = function( attributeId,  value) {this._dataProvider.registerAttribute(attributeId);var literalOrValueOrArray = this._dictionaryOfAttributeValues[attributeId];if (dojo.lang.isUndefined(literalOrValueOrArray)) {this._dictionaryOfAttributeValues[attributeId] = value;return;}
+if (!(value instanceof dojo.data.old.Value)) {value = new dojo.data.old.Value(value);}
+if (literalOrValueOrArray instanceof dojo.data.old.Value) {var array = [literalOrValueOrArray, value];this._dictionaryOfAttributeValues[attributeId] = array;return;}
+if (dojo.lang.isArray(literalOrValueOrArray)) {literalOrValueOrArray.push(value);return;}
+var literal = literalOrValueOrArray;var dojoDataValue = new dojo.data.old.Value(literal);array = [dojoDataValue, value];this._dictionaryOfAttributeValues[attributeId] = array;};dojo.data.old.Item.prototype.set = function( attributeId,  value) {this._dataProvider.registerAttribute(attributeId);this._dictionaryOfAttributeValues[attributeId] = value;this._dataProvider.noteChange(this, attributeId, value);};dojo.data.old.Item.prototype.setValue = function( attributeId,  value) {this.set(attributeId, value);};dojo.data.old.Item.prototype.addValue = function( attributeId,  value) {this.load(attributeId, value);this._dataProvider.noteChange(this, attributeId, value);};dojo.data.old.Item.prototype.setValues = function( attributeId,  arrayOfValues) {dojo.lang.assertType(arrayOfValues, Array);this._dataProvider.registerAttribute(attributeId);var finalArray = [];this._dictionaryOfAttributeValues[attributeId] = finalArray;for (var i in arrayOfValues) {var value = arrayOfValues[i];if (!(
 value instanceof dojo.data.old.Value)) {value = new dojo.data.old.Value(value);}
+finalArray.push(value);this._dataProvider.noteChange(this, attributeId, value);}};dojo.data.old.Item.prototype.getAttributes = function() {var arrayOfAttributes = [];for (var key in this._dictionaryOfAttributeValues) {arrayOfAttributes.push(this._dataProvider.getAttribute(key));}
+return arrayOfAttributes;};dojo.data.old.Item.prototype.hasAttribute = function( attributeId) {return (attributeId in this._dictionaryOfAttributeValues);};dojo.data.old.Item.prototype.hasAttributeValue = function( attributeId,  value) {var arrayOfValues = this.getValues(attributeId);for (var i in arrayOfValues) {var candidateValue = arrayOfValues[i];if (candidateValue.isEqual(value)) {return true;}}
+return false;};
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Item.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Kind.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Kind.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Kind.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Kind.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,2 @@
+
+dojo.provide("dojo.data.old.Kind");dojo.require("dojo.data.old.Item");dojo.data.old.Kind = function( dataProvider) {dojo.data.old.Item.call(this, dataProvider);};dojo.inherits(dojo.data.old.Kind, dojo.data.old.Item);
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Kind.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Observable.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Observable.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Observable.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Observable.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,4 @@
+
+dojo.provide("dojo.data.old.Observable");dojo.require("dojo.lang.common");dojo.require("dojo.lang.assert");dojo.data.old.Observable = function() {};dojo.data.old.Observable.prototype.addObserver = function( observer) {dojo.lang.assertType(observer, Object);dojo.lang.assertType(observer.observedObjectHasChanged, Function);if (!this._arrayOfObservers) {this._arrayOfObservers = [];}
+if (!dojo.lang.inArray(this._arrayOfObservers, observer)) {this._arrayOfObservers.push(observer);}};dojo.data.old.Observable.prototype.removeObserver = function( observer) {if (!this._arrayOfObservers) {return;}
+var index = dojo.lang.indexOf(this._arrayOfObservers, observer);if (index != -1) {this._arrayOfObservers.splice(index, 1);}};dojo.data.old.Observable.prototype.getObservers = function() {return this._arrayOfObservers;};
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Observable.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/ResultSet.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/ResultSet.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/ResultSet.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/ResultSet.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,2 @@
+
+dojo.provide("dojo.data.old.ResultSet");dojo.require("dojo.lang.assert");dojo.require("dojo.collections.Collections");dojo.data.old.ResultSet = function( dataProvider,  arrayOfItems) {dojo.lang.assertType(dataProvider, dojo.data.old.provider.Base, {optional: true});dojo.lang.assertType(arrayOfItems, Array, {optional: true});dojo.data.old.Observable.call(this);this._dataProvider = dataProvider;this._arrayOfItems = [];if (arrayOfItems) {this._arrayOfItems = arrayOfItems;}};dojo.inherits(dojo.data.old.ResultSet, dojo.data.old.Observable);dojo.data.old.ResultSet.prototype.toString = function() {var returnString = this._arrayOfItems.join(', ');return returnString;};dojo.data.old.ResultSet.prototype.toArray = function() {return this._arrayOfItems;};dojo.data.old.ResultSet.prototype.getIterator = function() {return new dojo.collections.Iterator(this._arrayOfItems);};dojo.data.old.ResultSet.prototype.getLength = function() {return this._arrayOfItems.length;};dojo.data.old.ResultSet.
 prototype.getItemAt = function( index) {return this._arrayOfItems[index];};dojo.data.old.ResultSet.prototype.indexOf = function( item) {return dojo.lang.indexOf(this._arrayOfItems, item);};dojo.data.old.ResultSet.prototype.contains = function( item) {return dojo.lang.inArray(this._arrayOfItems, item);};dojo.data.old.ResultSet.prototype.getDataProvider = function() {return this._dataProvider;};
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/ResultSet.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Type.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Type.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Type.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Type.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,2 @@
+
+dojo.provide("dojo.data.old.Type");dojo.require("dojo.data.old.Item");dojo.data.old.Type = function( dataProvider) {dojo.data.old.Item.call(this, dataProvider);};dojo.inherits(dojo.data.old.Type, dojo.data.old.Item);
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Type.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Value.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Value.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Value.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Value.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,2 @@
+
+dojo.provide("dojo.data.old.Value");dojo.require("dojo.lang.assert");dojo.data.old.Value = function( value) {this._value = value;this._type = null;};dojo.data.old.Value.prototype.toString = function() {return this._value.toString();};dojo.data.old.Value.prototype.getValue = function() {return this._value;};dojo.data.old.Value.prototype.getType = function() {dojo.unimplemented('dojo.data.old.Value.prototype.getType');return this._type;};dojo.data.old.Value.prototype.compare = function() {dojo.unimplemented('dojo.data.old.Value.prototype.compare');};dojo.data.old.Value.prototype.isEqual = function() {dojo.unimplemented('dojo.data.old.Value.prototype.isEqual');};
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/Value.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/__package__.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/__package__.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/__package__.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/__package__.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,4 @@
+
+dojo.require("dojo.experimental");dojo.experimental("dojo.data.old.*");dojo.kwCompoundRequire({common: [
+"dojo.data.old.Item","dojo.data.old.ResultSet","dojo.data.old.provider.FlatFile"
+]});dojo.provide("dojo.data.old.*");
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/__package__.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/format/Csv.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/format/Csv.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/format/Csv.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/format/Csv.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,8 @@
+
+dojo.provide("dojo.data.old.format.Csv");dojo.require("dojo.lang.assert");dojo.data.old.format.Csv = new function() {this.getArrayStructureFromCsvFileContents = function( csvFileContents) {dojo.lang.assertType(csvFileContents, String);var lineEndingCharacters = new RegExp("\r\n|\n|\r");var leadingWhiteSpaceCharacters = new RegExp("^\\s+",'g');var trailingWhiteSpaceCharacters = new RegExp("\\s+$",'g');var doubleQuotes = new RegExp('""','g');var arrayOfOutputRecords = [];var arrayOfInputLines = csvFileContents.split(lineEndingCharacters);for (var i in arrayOfInputLines) {var singleLine = arrayOfInputLines[i];if (singleLine.length > 0) {var listOfFields = singleLine.split(',');var j = 0;while (j < listOfFields.length) {var space_field_space = listOfFields[j];var field_space = space_field_space.replace(leadingWhiteSpaceCharacters, '');var field = field_space.replace(trailingWhiteSpaceCharacters, '');var firstChar = field.charAt(0);var lastChar = field.charAt(field.length - 1);va
 r secondToLastChar = field.charAt(field.length - 2);var thirdToLastChar = field.charAt(field.length - 3);if ((firstChar == '"') &&
+((lastChar != '"') ||
+((lastChar == '"') && (secondToLastChar == '"') && (thirdToLastChar != '"')) )) {if (j+1 === listOfFields.length) {return null;}
+var nextField = listOfFields[j+1];listOfFields[j] = field_space + ',' + nextField;listOfFields.splice(j+1, 1);} else {if ((firstChar == '"') && (lastChar == '"')) {field = field.slice(1, (field.length - 1));field = field.replace(doubleQuotes, '"');}
+listOfFields[j] = field;j += 1;}}
+arrayOfOutputRecords.push(listOfFields);}}
+return arrayOfOutputRecords;};this.loadDataProviderFromFileContents = function( dataProvider,  csvFileContents) {dojo.lang.assertType(dataProvider, dojo.data.old.provider.Base);dojo.lang.assertType(csvFileContents, String);var arrayOfArrays = this.getArrayStructureFromCsvFileContents(csvFileContents);if (arrayOfArrays) {var arrayOfKeys = arrayOfArrays[0];for (var i = 1; i < arrayOfArrays.length; ++i) {var row = arrayOfArrays[i];var item = dataProvider.getNewItemToLoad();for (var j in row) {var value = row[j];var key = arrayOfKeys[j];item.load(key, value);}}}};this.getCsvStringFromResultSet = function( resultSet) {dojo.unimplemented('dojo.data.old.format.Csv.getCsvStringFromResultSet');var csvString = null;return csvString;};}();
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/format/Csv.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/format/Json.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/format/Json.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/format/Json.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/format/Json.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,3 @@
+
+dojo.provide("dojo.data.old.format.Json");dojo.require("dojo.lang.assert");dojo.data.old.format.Json = new function() {this.loadDataProviderFromFileContents = function( dataProvider,  jsonFileContents) {dojo.lang.assertType(dataProvider, dojo.data.old.provider.Base);dojo.lang.assertType(jsonFileContents, String);var arrayOfJsonData = eval("(" + jsonFileContents + ")");this.loadDataProviderFromArrayOfJsonData(dataProvider, arrayOfJsonData);};this.loadDataProviderFromArrayOfJsonData = function( dataProvider,  arrayOfJsonData) {dojo.lang.assertType(arrayOfJsonData, Array, {optional: true});if (arrayOfJsonData && (arrayOfJsonData.length > 0)) {var firstRow = arrayOfJsonData[0];dojo.lang.assertType(firstRow, [Array, "pureobject"]);if (dojo.lang.isArray(firstRow)) {_loadDataProviderFromArrayOfArrays(dataProvider, arrayOfJsonData);} else {dojo.lang.assertType(firstRow, "pureobject");_loadDataProviderFromArrayOfObjects(dataProvider, arrayOfJsonData);}}};this.getJsonStringFromResultS
 et = function( resultSet) {dojo.unimplemented('dojo.data.old.format.Json.getJsonStringFromResultSet');var jsonString = null;return jsonString;};function _loadDataProviderFromArrayOfArrays( dataProvider,  arrayOfJsonData) {var arrayOfKeys = arrayOfJsonData[0];for (var i = 1; i < arrayOfJsonData.length; ++i) {var row = arrayOfJsonData[i];var item = dataProvider.getNewItemToLoad();for (var j in row) {var value = row[j];var key = arrayOfKeys[j];item.load(key, value);}}}
+function _loadDataProviderFromArrayOfObjects( dataProvider,  arrayOfJsonData) {for (var i in arrayOfJsonData) {var row = arrayOfJsonData[i];var item = dataProvider.getNewItemToLoad();for (var key in row) {var value = row[key];if (dojo.lang.isArray(value)) {var arrayOfValues = value;for (var j in arrayOfValues) {value = arrayOfValues[j];item.load(key, value);}} else {item.load(key, value);}}}}}();
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/format/Json.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/Base.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/Base.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/Base.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/Base.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,5 @@
+
+dojo.provide("dojo.data.old.provider.Base");dojo.require("dojo.lang.assert");dojo.data.old.provider.Base = function() {this._countOfNestedTransactions = 0;this._changesInCurrentTransaction = null;};dojo.data.old.provider.Base.prototype.beginTransaction = function() {if (this._countOfNestedTransactions === 0) {this._changesInCurrentTransaction = [];}
+this._countOfNestedTransactions += 1;};dojo.data.old.provider.Base.prototype.endTransaction = function() {this._countOfNestedTransactions -= 1;dojo.lang.assert(this._countOfNestedTransactions >= 0);if (this._countOfNestedTransactions === 0) {var listOfChangesMade = this._saveChanges();this._changesInCurrentTransaction = null;if (listOfChangesMade.length > 0) {this._notifyObserversOfChanges(listOfChangesMade);}}};dojo.data.old.provider.Base.prototype.getNewItemToLoad = function() {return this._newItem();};dojo.data.old.provider.Base.prototype.newItem = function( itemName) {dojo.lang.assertType(itemName, String, {optional: true});var item = this._newItem();if (itemName) {item.set('name', itemName);}
+return item;};dojo.data.old.provider.Base.prototype.newAttribute = function( attributeId) {dojo.lang.assertType(attributeId, String, {optional: true});var attribute = this._newAttribute(attributeId);return attribute;};dojo.data.old.provider.Base.prototype.getAttribute = function( attributeId) {dojo.unimplemented('dojo.data.old.provider.Base');var attribute;return attribute;};dojo.data.old.provider.Base.prototype.getAttributes = function() {dojo.unimplemented('dojo.data.old.provider.Base');return this._arrayOfAttributes;};dojo.data.old.provider.Base.prototype.fetchArray = function() {dojo.unimplemented('dojo.data.old.provider.Base');return [];};dojo.data.old.provider.Base.prototype.fetchResultSet = function() {dojo.unimplemented('dojo.data.old.provider.Base');var resultSet;return resultSet;};dojo.data.old.provider.Base.prototype.noteChange = function( item,  attribute,  value) {var change = {item: item, attribute: attribute, value: value};if (this._countOfNestedTransactions =
 == 0) {this.beginTransaction();this._changesInCurrentTransaction.push(change);this.endTransaction();} else {this._changesInCurrentTransaction.push(change);}};dojo.data.old.provider.Base.prototype.addItemObserver = function( item,  observer) {dojo.lang.assertType(item, dojo.data.old.Item);item.addObserver(observer);};dojo.data.old.provider.Base.prototype.removeItemObserver = function( item,  observer) {dojo.lang.assertType(item, dojo.data.old.Item);item.removeObserver(observer);};dojo.data.old.provider.Base.prototype._newItem = function() {var item = new dojo.data.old.Item(this);return item;};dojo.data.old.provider.Base.prototype._newAttribute = function( attributeId) {var attribute = new dojo.data.old.Attribute(this);return attribute;};dojo.data.old.provider.Base.prototype._saveChanges = function() {var arrayOfChangesMade = this._changesInCurrentTransaction;return arrayOfChangesMade;};dojo.data.old.provider.Base.prototype._notifyObserversOfChanges = function( arrayOfChanges)
  {var arrayOfResultSets = this._getResultSets();for (var i in arrayOfChanges) {var change = arrayOfChanges[i];var changedItem = change.item;var arrayOfItemObservers = changedItem.getObservers();for (var j in arrayOfItemObservers) {var observer = arrayOfItemObservers[j];observer.observedObjectHasChanged(changedItem, change);}
+for (var k in arrayOfResultSets) {var resultSet = arrayOfResultSets[k];var arrayOfResultSetObservers = resultSet.getObservers();for (var m in arrayOfResultSetObservers) {observer = arrayOfResultSetObservers[m];observer.observedObjectHasChanged(resultSet, change);}}}};dojo.data.old.provider.Base.prototype._getResultSets = function() {dojo.unimplemented('dojo.data.old.provider.Base');return [];};
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/Base.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/Delicious.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/Delicious.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/Delicious.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/Delicious.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,3 @@
+
+dojo.provide("dojo.data.old.provider.Delicious");dojo.require("dojo.data.old.provider.FlatFile");dojo.require("dojo.data.old.format.Json");dojo.data.old.provider.Delicious = function() {dojo.data.old.provider.FlatFile.call(this);if (Delicious && Delicious.posts) {dojo.data.old.format.Json.loadDataProviderFromArrayOfJsonData(this, Delicious.posts);} else {}
+var u = this.registerAttribute('u');var d = this.registerAttribute('d');var t = this.registerAttribute('t');u.load('name', 'Bookmark');d.load('name', 'Description');t.load('name', 'Tags');u.load('type', 'String');d.load('type', 'String');t.load('type', 'String');};dojo.inherits(dojo.data.old.provider.Delicious, dojo.data.old.provider.FlatFile);
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/Delicious.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/FlatFile.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/FlatFile.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/FlatFile.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/FlatFile.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,10 @@
+
+dojo.provide("dojo.data.old.provider.FlatFile");dojo.require("dojo.data.old.provider.Base");dojo.require("dojo.data.old.Item");dojo.require("dojo.data.old.Attribute");dojo.require("dojo.data.old.ResultSet");dojo.require("dojo.data.old.format.Json");dojo.require("dojo.data.old.format.Csv");dojo.require("dojo.lang.assert");dojo.data.old.provider.FlatFile = function( keywordParameters) {dojo.lang.assertType(keywordParameters, "pureobject", {optional: true});dojo.data.old.provider.Base.call(this);this._arrayOfItems = [];this._resultSet = null;this._dictionaryOfAttributes = {};if (keywordParameters) {var jsonObjects = keywordParameters["jsonObjects"];var jsonString  = keywordParameters["jsonString"];var fileUrl     = keywordParameters["url"];if (jsonObjects) {dojo.data.old.format.Json.loadDataProviderFromArrayOfJsonData(this, jsonObjects);}
+if (jsonString) {dojo.data.old.format.Json.loadDataProviderFromFileContents(this, jsonString);}
+if (fileUrl) {var arrayOfParts = fileUrl.split('.');var lastPart = arrayOfParts[(arrayOfParts.length - 1)];var formatParser = null;if (lastPart == "json") {formatParser = dojo.data.old.format.Json;}
+if (lastPart == "csv") {formatParser = dojo.data.old.format.Csv;}
+if (formatParser) {var fileContents = dojo.hostenv.getText(fileUrl);formatParser.loadDataProviderFromFileContents(this, fileContents);} else {dojo.lang.assert(false, "new dojo.data.old.provider.FlatFile({url: }) was passed a file without a .csv or .json suffix");}}}};dojo.inherits(dojo.data.old.provider.FlatFile, dojo.data.old.provider.Base);dojo.data.old.provider.FlatFile.prototype.getProviderCapabilities = function( keyword) {dojo.lang.assertType(keyword, String, {optional: true});if (!this._ourCapabilities) {this._ourCapabilities = {transactions: false,undo: false,login: false,versioning: false,anonymousRead: true,anonymousWrite: false,permissions: false,queries: false,strongTyping: false,datatypes: [String, Date, Number]};}
+if (keyword) {return this._ourCapabilities[keyword];} else {return this._ourCapabilities;}};dojo.data.old.provider.FlatFile.prototype.registerAttribute = function( attributeId) {var registeredAttribute = this.getAttribute(attributeId);if (!registeredAttribute) {var newAttribute = new dojo.data.old.Attribute(this, attributeId);this._dictionaryOfAttributes[attributeId] = newAttribute;registeredAttribute = newAttribute;}
+return registeredAttribute;};dojo.data.old.provider.FlatFile.prototype.getAttribute = function( attributeId) {var attribute = (this._dictionaryOfAttributes[attributeId] || null);return attribute;};dojo.data.old.provider.FlatFile.prototype.getAttributes = function() {var arrayOfAttributes = [];for (var key in this._dictionaryOfAttributes) {var attribute = this._dictionaryOfAttributes[key];arrayOfAttributes.push(attribute);}
+return arrayOfAttributes;};dojo.data.old.provider.FlatFile.prototype.fetchArray = function(query) {return this._arrayOfItems;};dojo.data.old.provider.FlatFile.prototype.fetchResultSet = function(query) {if (!this._resultSet) {this._resultSet = new dojo.data.old.ResultSet(this, this.fetchArray(query));}
+return this._resultSet;};dojo.data.old.provider.FlatFile.prototype._newItem = function() {var item = new dojo.data.old.Item(this);this._arrayOfItems.push(item);return item;};dojo.data.old.provider.FlatFile.prototype._newAttribute = function( attributeId) {dojo.lang.assertType(attributeId, String);dojo.lang.assert(this.getAttribute(attributeId) === null);var attribute = new dojo.data.old.Attribute(this, attributeId);this._dictionaryOfAttributes[attributeId] = attribute;return attribute;};dojo.data.old.provider.Base.prototype._getResultSets = function() {return [this._resultSet];};
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/FlatFile.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/JotSpot.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/JotSpot.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/JotSpot.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/JotSpot.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,2 @@
+
+dojo.provide("dojo.data.old.provider.JotSpot");dojo.require("dojo.data.old.provider.Base");dojo.data.old.provider.JotSpot = function() {dojo.unimplemented('dojo.data.old.provider.JotSpot');};dojo.inherits(dojo.data.old.provider.JotSpot, dojo.data.old.provider.Base);
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/JotSpot.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/MySql.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/MySql.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/MySql.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/MySql.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,2 @@
+
+dojo.provide("dojo.data.old.provider.MySql");dojo.require("dojo.data.old.provider.Base");dojo.data.old.provider.MySql = function() {dojo.unimplemented('dojo.data.old.provider.MySql');};dojo.inherits(dojo.data.old.provider.MySql, dojo.data.old.provider.Base);
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/provider/MySql.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/to_do.txt
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/to_do.txt?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/to_do.txt (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/to_do.txt Mon Nov 20 10:54:21 2006
@@ -0,0 +1,45 @@
+Existing Features
+ * can import data from .json or .csv format files
+ * can import data from del.icio.us
+ * can create and modify data programmatically
+ * can bind data to dojo.widget.Chart
+ * can bind data to dojo.widget.SortableTable
+ * can bind one data set to multiple widgets
+ * notifications: widgets are notified when data changes
+ * notification available per-item or per-resultSet
+ * can create ad-hoc attributes
+ * attributes can be loosely-typed 
+ * attributes can have meta-data like type and display name
+ * half-implemented support for sorting
+ * half-implemented support for export to .json
+ * API for getting data in simple arrays 
+ * API for getting ResultSets with iterators (precursor to support for something like the openrico.org live grid)
+ 
+~~~~~~~~~~~~~~~~~~~~~~~~
+To-Do List
+ * be able to import data from an html <table></table>
+ * think about being able to import data from some type of XML 
+ * think about integration with dojo.undo.Manager
+ * think more about how to represent the notion of different data types
+ * think about what problems we'll run into when we have a MySQL data provider
+ * in TableBindingHack, improve support for data types in the SortableTable binding
+ * deal with ids (including MySQL multi-field keys)
+ * add support for item-references:  employeeItem.set('department', departmentItem);
+ * deal with Attributes as instances of Items, not just subclasses of Items
+ * unit tests for compare/sort code
+ * unit tests for everything
+ * implement item.toString('json') and item.toString('xml')
+ * implement dataProvider.newItem({name: 'foo', age: 26})
+ * deal better with transactions
+ * add support for deleting items
+ * don't send out multiple notifications to the same observer
+ * deal with item versions
+ * prototype a Yahoo data provider -- http://developer.yahoo.net/common/json.html
+ * prototype a data provider that enforces strong typing
+ * prototype a data provider that prevents ad-hoc attributes
+ * prototype a data provider that enforces single-kind item
+ * prototype a data provider that allows for login/authentication
+ * have loosely typed result sets play nicely with widgets that expect strong typing
+ * prototype an example of spreadsheet-style formulas or derivation rules
+ * experiment with some sort of fetch() that returns only a subset of a data provider's items
+

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/data/old/to_do.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,2 @@
+
+dojo.provide("dojo.date");dojo.deprecated("dojo.date", "use one of the modules in dojo.date.* instead", "0.5");
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date/common.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date/common.js?view=auto&rev=477287
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date/common.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date/common.js Mon Nov 20 10:54:21 2006
@@ -0,0 +1,83 @@
+
+dojo.provide("dojo.date.common");dojo.date.setDayOfYear = function(dateObject, dayOfYear){dateObject.setMonth(0);dateObject.setDate(dayOfYear);return dateObject;}
+dojo.date.getDayOfYear = function(dateObject){var fullYear = dateObject.getFullYear();var lastDayOfPrevYear = new Date(fullYear-1, 11, 31);return Math.floor((dateObject.getTime() -
+lastDayOfPrevYear.getTime()) / 86400000);}
+dojo.date.setWeekOfYear = function(dateObject, week, firstDay){if(arguments.length == 1){ firstDay = 0; }
+dojo.unimplemented("dojo.date.setWeekOfYear");}
+dojo.date.getWeekOfYear = function(dateObject, firstDay){if(arguments.length == 1){ firstDay = 0; }
+var firstDayOfYear = new Date(dateObject.getFullYear(), 0, 1);var day = firstDayOfYear.getDay();firstDayOfYear.setDate(firstDayOfYear.getDate() -
+day + firstDay - (day > firstDay ? 7 : 0));return Math.floor((dateObject.getTime() -
+firstDayOfYear.getTime()) / 604800000);}
+dojo.date.setIsoWeekOfYear = function(dateObject, week, firstDay){if (arguments.length == 1) { firstDay = 1; }
+dojo.unimplemented("dojo.date.setIsoWeekOfYear");}
+dojo.date.getIsoWeekOfYear = function(dateObject, firstDay) {if (arguments.length == 1) { firstDay = 1; }
+dojo.unimplemented("dojo.date.getIsoWeekOfYear");}
+dojo.date.shortTimezones = ["IDLW", "BET", "HST", "MART", "AKST", "PST", "MST","CST", "EST", "AST", "NFT", "BST", "FST", "AT", "GMT", "CET", "EET", "MSK","IRT", "GST", "AFT", "AGTT", "IST", "NPT", "ALMT", "MMT", "JT", "AWST","JST", "ACST", "AEST", "LHST", "VUT", "NFT", "NZT", "CHAST", "PHOT","LINT"];dojo.date.timezoneOffsets = [-720, -660, -600, -570, -540, -480, -420, -360,-300, -240, -210, -180, -120, -60, 0, 60, 120, 180, 210, 240, 270, 300,330, 345, 360, 390, 420, 480, 540, 570, 600, 630, 660, 690, 720, 765, 780,840];dojo.date.getDaysInMonth = function(dateObject){var month = dateObject.getMonth();var days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];if (month == 1 && dojo.date.isLeapYear(dateObject)) { return 29; }
+else { return days[month]; }}
+dojo.date.isLeapYear = function(dateObject){var year = dateObject.getFullYear();return (year%400 == 0) ? true : (year%100 == 0) ? false : (year%4 == 0) ? true : false;}
+dojo.date.getTimezoneName = function(dateObject){var str = dateObject.toString();var tz = '';var match;var pos = str.indexOf('(');if (pos > -1) {pos++;tz = str.substring(pos, str.indexOf(')'));}
+else{var pat = /([A-Z\/]+) \d{4}$/;if((match = str.match(pat))) {tz = match[1];}
+else{str = dateObject.toLocaleString();pat = / ([A-Z\/]+)$/;if((match = str.match(pat))) {tz = match[1];}}}
+return tz == 'AM' || tz == 'PM' ? '' : tz;}
+dojo.date.getOrdinal = function(dateObject){var date = dateObject.getDate();if(date%100 != 11 && date%10 == 1){ return "st"; }
+else if(date%100 != 12 && date%10 == 2){ return "nd"; }
+else if(date%100 != 13 && date%10 == 3){ return "rd"; }
+else{ return "th"; }}
+dojo.date.compareTypes={DATE:1, TIME:2};dojo.date.compare=function( dateA,  dateB,  options){var dA=dateA;var dB=dateB||new Date();var now=new Date();with(dojo.date.compareTypes){var opt=options||(DATE|TIME);var d1=new Date(
+(opt&DATE)?dA.getFullYear():now.getFullYear(),(opt&DATE)?dA.getMonth():now.getMonth(),(opt&DATE)?dA.getDate():now.getDate(),(opt&TIME)?dA.getHours():0,(opt&TIME)?dA.getMinutes():0,(opt&TIME)?dA.getSeconds():0
+);var d2=new Date(
+(opt&DATE)?dB.getFullYear():now.getFullYear(),(opt&DATE)?dB.getMonth():now.getMonth(),(opt&DATE)?dB.getDate():now.getDate(),(opt&TIME)?dB.getHours():0,(opt&TIME)?dB.getMinutes():0,(opt&TIME)?dB.getSeconds():0
+);}
+if(d1.valueOf()>d2.valueOf()){return 1;}
+if(d1.valueOf()<d2.valueOf()){return -1;}
+return 0;}
+dojo.date.dateParts={YEAR:0, MONTH:1, DAY:2, HOUR:3, MINUTE:4, SECOND:5, MILLISECOND:6, QUARTER:7, WEEK:8, WEEKDAY:9};dojo.date.add = function( dt,  interv,  incr){if(typeof dt == 'number'){dt = new Date(dt);}
+function fixOvershoot(){if (sum.getDate() < dt.getDate()){sum.setDate(0);}}
+var sum = new Date(dt);with(dojo.date.dateParts){switch(interv){case YEAR:
+sum.setFullYear(dt.getFullYear()+incr);fixOvershoot();break;case QUARTER:
+incr*=3;case MONTH:
+sum.setMonth(dt.getMonth()+incr);fixOvershoot();break;case WEEK:
+incr*=7;case DAY:
+sum.setDate(dt.getDate() + incr);break;case WEEKDAY:
+var dat = dt.getDate();var weeks = 0;var days = 0;var strt = 0;var trgt = 0;var adj = 0;var mod = incr % 5;if (mod == 0) {days = (incr > 0) ? 5 : -5;weeks = (incr > 0) ? ((incr-5)/5) : ((incr+5)/5);}
+else {days = mod;weeks = parseInt(incr/5);}
+strt = dt.getDay();if (strt == 6 && incr > 0) {adj = 1;}
+else if (strt == 0 && incr < 0) {adj = -1;}
+trgt = (strt + days);if (trgt == 0 || trgt == 6) {adj = (incr > 0) ? 2 : -2;}
+sum.setDate(dat + (7*weeks) + days + adj);break;case HOUR:
+sum.setHours(sum.getHours()+incr);break;case MINUTE:
+sum.setMinutes(sum.getMinutes()+incr);break;case SECOND:
+sum.setSeconds(sum.getSeconds()+incr);break;case MILLISECOND:
+sum.setMilliseconds(sum.getMilliseconds()+incr);break;default:
+break;}}
+return sum;};dojo.date.diff = function( dtA,  dtB,  interv){if(typeof dtA == 'number'){dtA = new Date(dtA);}
+if(typeof dtB == 'number'){dtB = new Date(dtB);}
+var yeaDiff = dtB.getFullYear() - dtA.getFullYear();var monDiff = (dtB.getMonth() - dtA.getMonth()) + (yeaDiff * 12);var msDiff = dtB.getTime() - dtA.getTime();var secDiff = msDiff/1000;var minDiff = secDiff/60;var houDiff = minDiff/60;var dayDiff = houDiff/24;var weeDiff = dayDiff/7;var delta = 0;with(dojo.date.dateParts){switch(interv){case YEAR:
+delta = yeaDiff;break;case QUARTER:
+var mA = dtA.getMonth();var mB = dtB.getMonth();var qA = Math.floor(mA/3) + 1;var qB = Math.floor(mB/3) + 1;qB += (yeaDiff * 4);delta = qB - qA;break;case MONTH:
+delta = monDiff;break;case WEEK:
+delta = parseInt(weeDiff);break;case DAY:
+delta = dayDiff;break;case WEEKDAY:
+var days = Math.round(dayDiff);var weeks = parseInt(days/7);var mod = days % 7;if (mod == 0) {days = weeks*5;}
+else {var adj = 0;var aDay = dtA.getDay();var bDay = dtB.getDay();weeks = parseInt(days/7);mod = days % 7;var dtMark = new Date(dtA);dtMark.setDate(dtMark.getDate()+(weeks*7));var dayMark = dtMark.getDay();if (dayDiff > 0) {switch (true) {case aDay == 6:
+adj = -1;break;case aDay == 0:
+adj = 0;break;case bDay == 6:
+adj = -1;break;case bDay == 0:
+adj = -2;break;case (dayMark + mod) > 5:
+adj = -2;break;default:
+break;}}
+else if (dayDiff < 0) {switch (true) {case aDay == 6:
+adj = 0;break;case aDay == 0:
+adj = 1;break;case bDay == 6:
+adj = 2;break;case bDay == 0:
+adj = 1;break;case (dayMark + mod) < 0:
+adj = 2;break;default:
+break;}}
+days += adj;days -= (weeks*2);}
+delta = days;break;case HOUR:
+delta = houDiff;break;case MINUTE:
+delta = minDiff;break;case SECOND:
+delta = secDiff;break;case MILLISECOND:
+delta = msDiff;break;default:
+break;}}
+return Math.round(delta);};
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/date/common.js
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message