Skip to content

Commit

Permalink
dojox/data: more api doc and spacing fixes, and correct a few errors …
Browse files Browse the repository at this point in the history
…from previous checkin, refs #13101 !strict.

git-svn-id: http://svn.dojotoolkit.org/src/dojox/trunk@28696 560b804f-0ae3-0310-86f3-f6aa0a117693
  • Loading branch information
wkeese committed May 30, 2012
1 parent 6376c9c commit d0905b8
Show file tree
Hide file tree
Showing 52 changed files with 406 additions and 403 deletions.
9 changes: 5 additions & 4 deletions data/AndOrReadStore.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
define(["dojo/_base/declare", "dojo/_base/lang", "dojo/data/ItemFileReadStore", "dojo/data/util/filter", "dojo/_base/array", "dojo/_base/json"],
function(declare, lang, ItemFileReadStore, filterUtil, array, json) {
// module:
// dojox/data/AndOrReadStore
// summary:
// TODOC

// module:
// dojox/data/AndOrReadStore
// summary:
// TODOC

return declare("dojox.data.AndOrReadStore", [ItemFileReadStore], {
// summary:
Expand Down
11 changes: 6 additions & 5 deletions data/AndOrWriteStore.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
define(["dojo/_base/declare", "dojo/data/ItemFileWriteStore", "./AndOrReadStore"],
function(declare, ItemFileWriteStore, AndOrReadStore) {
// module:
// dojox/data/AndOrWriteStore
// summary:
// TODOC
function(declare, ItemFileWriteStore, AndOrReadStore){

// module:
// dojox/data/AndOrWriteStore
// summary:
// TODOC

return declare("dojox.data.AndOrWriteStore", [ItemFileWriteStore, AndOrReadStore], {});

Expand Down
8 changes: 4 additions & 4 deletions data/AppStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ dojo.declare("dojox.data.AppStore",
/* attribute-name-string */ attribute,
/* value? */ defaultValue){
// summary:
// See dojo.data.api.Read.getValue()
// See dojo.data.api.Read.getValue()
var values = this.getValues(item, attribute);
return (values.length > 0)?values[0]:defaultValue; //Object || int || Boolean
},
Expand Down Expand Up @@ -407,9 +407,9 @@ dojo.declare("dojox.data.AppStore",
},

getIdentityAttributes: function(/* item */ item){
// summary:
// See dojo.data.api.Identity.getIdentityAttributes()
return ["id"];
// summary:
// See dojo.data.api.Identity.getIdentityAttributes()
return ["id"];
},

fetchItemByIdentity: function(keywordArgs){
Expand Down
8 changes: 4 additions & 4 deletions data/AtomReadStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ dojo.declare("dojox.data.AtomReadStore", null, {
getAttributes: function(/* item */ item){
// summary:
// Return an array of attribute names
// description:
// description:
// 'item' must be have been created by the AtomReadStore instance.
// tag names of child elements and XML attribute names of attributes
// specified to the element are returned along with special attribute
Expand Down Expand Up @@ -186,7 +186,7 @@ dojo.declare("dojox.data.AtomReadStore", null, {
// Check whether the object is an item (XML element)
// item:
// An object to check
// returns:
// returns:
// True if the object is an XML element, otherwise false
if(something && something.element && something.store && something.store === this){
return true; //boolean
Expand Down Expand Up @@ -415,8 +415,8 @@ dojo.declare("dojox.data.AtomReadStore", null, {
},

close: function(/*dojo.data.api.Request || keywordArgs || null */ request){
// summary:
// See dojo.data.api.Read.close()
// summary:
// See dojo.data.api.Read.close()
},

/* internal API */
Expand Down
6 changes: 3 additions & 3 deletions data/CdfStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ dojo.declare("dojox.data.CdfStore", null, {
getLabelAttributes: function(/* jsx3.xml.Entity */ item){
// summary:
// returns an array of what properties of the item that were used
// to generate its label
// to generate its label
// See dojo.data.api.Read.getLabelAttributes()

if(this.label !== ""){
Expand Down Expand Up @@ -407,8 +407,8 @@ dojo.declare("dojox.data.CdfStore", null, {
},

close: function(/*dojo.data.api.Request || keywordArgs || null */ request){
// summary:
// See dojo.data.api.Read.close()
// summary:
// See dojo.data.api.Read.close()
},

/* dojo.data.api.Write */
Expand Down
8 changes: 4 additions & 4 deletions data/ClientFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ define(["dojo/_base/declare", "dojo/_base/lang", "dojo/_base/array", "dojo/_base
// request:
// This object follows the same meaning as the keywordArgs passed to a dojo.data.api.Read.fetch.
// description:
// This will attempt to update the provide result based on previous notification, adding new items
// from onNew calls, removing deleted items, and updating modified items, and properly removing
// and adding items as required by the query and sort parameters. This function will return:
// This will attempt to update the provide result based on previous notification, adding new items
// from onNew calls, removing deleted items, and updating modified items, and properly removing
// and adding items as required by the query and sort parameters. This function will return:
// 0: Indicates it could not successfully update the result set
// 1: Indicates it could successfully handle all the notifications, but no changes were made to the result set
// 2: Indicates it successfully handled all the notifications and result set has been updated.
Expand Down Expand Up @@ -177,7 +177,7 @@ define(["dojo/_base/declare", "dojo/_base/lang", "dojo/_base/array", "dojo/_base
fetchCache.push(args);
}
defResult= args._loading = this._doQuery(args);

defResult.addErrback(function(){
fetchCache.splice(array.indexOf(fetchCache, args), 1);
});
Expand Down
2 changes: 1 addition & 1 deletion data/CouchDBRestStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dojo.declare("dojox.data.CouchDBRestStore",
},
fetch: function(args){
// summary:
// This only differs from JsonRestStore in that it, will put the query string the query part of the URL and it handles start and count
// This only differs from JsonRestStore in that it, will put the query string the query part of the URL and it handles start and count
args.query = args.query || '_all_docs?';
if(args.start){
args.query = (args.query ? (args.query + '&') : '') + 'skip=' + args.start;
Expand Down
4 changes: 2 additions & 2 deletions data/CssClassStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ return declare("dojox.data.CssClassStore", CssRuleStore, {
},

getIdentityAttributes: function(/* item */ item){
// summary:
// See dojo.data.api.Identity.getIdentityAttributes()
// summary:
// See dojo.data.api.Identity.getIdentityAttributes()
this._assertIsItem(item);
return [this._idAttribute];
},
Expand Down
6 changes: 3 additions & 3 deletions data/CssRuleStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ return declare("dojox.data.CssRuleStore", null, {
// style: The actual DOM CSSStyleDeclaration object.
// cssText: The cssText string provided on the rule object.
// styleSheet: The originating DOM Stylesheet object.
// parentStyleSheet: The parent stylesheet to the sheet this rule originates from.
// parentStyleSheetHref: The href of the parent stylesheet.
// parentStyleSheet: The parent stylesheet to the sheet this rule originates from.
// parentStyleSheetHref: The href of the parent stylesheet.
// AND every style attribute denoted as style.*, such as style.textAlign or style.backgroundColor

_storeRef: '_S',
Expand Down Expand Up @@ -408,7 +408,7 @@ return declare("dojox.data.CssRuleStore", null, {

_assertIsItem: function(/* item */ item){
// summary:
// This function tests whether the item passed in is indeed an item in the store.
// This function tests whether the item passed in is indeed an item in the store.
// item:
// The item to test for being contained by the store.
if(!this.isItem(item)){
Expand Down
30 changes: 15 additions & 15 deletions data/CsvStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ var CsvStore = declare("dojox.data.CsvStore", null, {

this._attributes = []; // e.g. ["Title", "Year", "Producer"]
this._attributeIndexes = {}; // e.g. {Title: 0, Year: 1, Producer: 2}
this._dataArray = []; // e.g. [[<Item0>],[<Item1>],[<Item2>]]
this._arrayOfAllItems = []; // e.g. [{_csvId:0,_csvStore:store},...]
this._dataArray = []; // e.g. [[<Item0>],[<Item1>],[<Item2>]]
this._arrayOfAllItems = []; // e.g. [{_csvId:0,_csvStore:store},...]
this._loadFinished = false;
if(keywordParameters.url){
this.url = keywordParameters.url;
Expand All @@ -44,7 +44,7 @@ var CsvStore = declare("dojox.data.CsvStore", null, {
this.label = undefined;
}
this._storeProp = "_csvStore"; // Property name for the store reference on every item.
this._idProp = "_csvId"; // Property name for the Item Id on every item.
this._idProp = "_csvId"; // Property name for the Item Id on every item.
this._features = {
'dojo.data.api.Read': true,
'dojo.data.api.Identity': true
Expand Down Expand Up @@ -91,7 +91,7 @@ var CsvStore = declare("dojox.data.CsvStore", null, {

_assertIsItem: function(/* item */ item){
// summary:
// This function tests whether the item passed in is indeed an item in the store.
// This function tests whether the item passed in is indeed an item in the store.
// item:
// The item to test for being contained by the store.
if(!this.isItem(item)){
Expand All @@ -118,9 +118,9 @@ var CsvStore = declare("dojox.data.CsvStore", null, {
/* attribute || attribute-name-string */ attribute,
/* value? */ defaultValue){
// summary:
// See dojo.data.api.Read.getValue()
// See dojo.data.api.Read.getValue()
// Note that for the CsvStore, an empty string value is the same as no value,
// so the defaultValue would be returned instead of an empty string.
// so the defaultValue would be returned instead of an empty string.
this._assertIsItem(item);
var itemValue = defaultValue;
if(typeof attribute === "string"){
Expand All @@ -139,8 +139,8 @@ var CsvStore = declare("dojox.data.CsvStore", null, {
/* attribute || attribute-name-string */ attribute){
// summary:
// See dojo.data.api.Read.getValues()
// CSV syntax does not support multi-valued attributes, so this is just a
// wrapper function for getValue().
// CSV syntax does not support multi-valued attributes, so this is just a
// wrapper function for getValue().
var value = this.getValue(item, attribute);
return (value ? [value] : []); //Array
},
Expand All @@ -164,9 +164,9 @@ var CsvStore = declare("dojox.data.CsvStore", null, {
/* attribute-name-string */ attribute){
// summary:
// See dojo.data.api.Read.hasAttribute()
// The hasAttribute test is true if attribute has an index number within the item's array length
// AND if the item has a value for that attribute. Note that for the CsvStore, an
// empty string value is the same as no value.
// The hasAttribute test is true if attribute has an index number within the item's array length
// AND if the item has a value for that attribute. Note that for the CsvStore, an
// empty string value is the same as no value.
this._assertIsItem(item);
if(typeof attribute === "string"){
var attributeIndex = this._attributeIndexes[attribute];
Expand Down Expand Up @@ -412,8 +412,8 @@ var CsvStore = declare("dojox.data.CsvStore", null, {
},

close: function(/*dojo.data.api.Request || keywordArgs || null */ request){
// summary:
// See dojo.data.api.Read.close()
// summary:
// See dojo.data.api.Read.close()
},


Expand Down Expand Up @@ -467,7 +467,7 @@ var CsvStore = declare("dojox.data.CsvStore", null, {
listOfFields[j] = ""; //Special case empty string field.
}else if((firstChar == '"') &&
((lastChar != '"') ||
((lastChar == '"') && (secondToLastChar == '"') && (thirdToLastChar != '"')))){
((lastChar == '"') && (secondToLastChar == '"') && (thirdToLastChar != '"')))){
if(j+1 === listOfFields.length){
// alert("The last field in record " + i + " is corrupted:\n" + field);
return; //null
Expand Down Expand Up @@ -686,7 +686,7 @@ var CsvStore = declare("dojox.data.CsvStore", null, {
// See dojo.data.api.Identity.getIdentifierAttributes()
// tags:
// public

// Identity isn't a public attribute in the item, it's the row position index.
// So, return null.
if(this.identifier){
Expand Down
Loading

0 comments on commit d0905b8

Please sign in to comment.