diff --git a/js/config.js b/js/config.js index 9861881eb04f354c9f3e3114691a0f5bce958d3f..89a91d2ff87d2033dd5946e3ce1c62b5c723fa7e 100644 --- a/js/config.js +++ b/js/config.js @@ -55,5 +55,4 @@ requirejs.config({ }, } - }); \ No newline at end of file diff --git a/js/modules/aggregator/aggregator.js b/js/modules/aggregator/aggregator.js index 8f575788fdfafbc0f22c52a6611003cab864c8ee..d39eebfdff088ec61c80b024eb7462566eab0141 100644 --- a/js/modules/aggregator/aggregator.js +++ b/js/modules/aggregator/aggregator.js @@ -111,8 +111,8 @@ define(['easejs', 'MathUuid','widget', 'widgetHandle', 'widgetHandleList', this.attributeTypes.put(_attributeType); var attVal = new AttributeValue().buildFromAttributeType(_attributeType); this.attributes.put(attVal); - }; - }, + } + }, /** * Sets WidgetHandles. @@ -182,9 +182,9 @@ define(['easejs', 'MathUuid','widget', 'widgetHandle', 'widgetHandleList', } else { this.removeWidget(widgetHandle.getName()); } - }; - }; - }, + } + } + }, /** * Retrieves all ConstantAttributes of the specified widgets. @@ -205,11 +205,10 @@ define(['easejs', 'MathUuid','widget', 'widgetHandle', 'widgetHandleList', this.setConstantAttributes(widgetInstance.queryConstantAttributes()); } else { this.removeWidget(widgetHandle.getName()); - }; - }; - }; - - }, + } + } + } + }, /** * Retrieves all actual Callbacks of the specified Widgets. @@ -224,9 +223,9 @@ define(['easejs', 'MathUuid','widget', 'widgetHandle', 'widgetHandleList', for(var i in widgetList){ var widgetHandle = widgetList[i]; this.initWidgetSubscription(widgetHandle); - }; - }; - }, + } + } + }, /** * InitMethod for Aggregators. Called by constructor. @@ -321,8 +320,8 @@ define(['easejs', 'MathUuid','widget', 'widgetHandle', 'widgetHandleList', withConditions(_conditions); console.log(this.name + ' subscribeTo: ' + _widget.getName()); _widget.addSubscriber(subscriber); - }; - }, + } + }, /** * Subscribes to the widgets that are defined in the WidgetHandleList @@ -347,9 +346,9 @@ define(['easejs', 'MathUuid','widget', 'widgetHandle', 'widgetHandleList', this.subscribeTo(widget, calls); } else { this.removeWidget(_widgetHandle.getName()); - }; - }; - return calls; + } + } + return calls; }, /** @@ -374,12 +373,12 @@ define(['easejs', 'MathUuid','widget', 'widgetHandle', 'widgetHandleList', for(var y in typeList){ var singleType = typeList[y]; this.addAttributeType(singleType); - }; - }; - this.addWidget(_widgetHandle); - }; - }; - }, + } + } + this.addWidget(_widgetHandle); + } + } + }, /** * Removes subscribed Widgets and deletes the entry @@ -397,9 +396,9 @@ define(['easejs', 'MathUuid','widget', 'widgetHandle', 'widgetHandleList', console.log('aggregator unsubscribeFrom: ' + widget.getName()); widget.removeSubscriber(this.id); this.widgets.removeItem(_widgetHandle.getName()); - }; - }; - }, + } + } + }, /** * Puts context data to Widget and expects an array. @@ -411,7 +410,7 @@ define(['easejs', 'MathUuid','widget', 'widgetHandle', 'widgetHandleList', * @param {(AttributeValueList|Array)} _data data that shall be input */ 'override public putData' : function(_data){ - var list = new Array(); + var list = []; if(_data instanceof Array){ list = _data; } else if (Class.isA( AttributeValueList, _data)) { @@ -424,10 +423,9 @@ define(['easejs', 'MathUuid','widget', 'widgetHandle', 'widgetHandleList', if(this.db){ this.store(x); } - }; - }; - - }, + } + } + }, /** * Calls the given Interpreter for interpretation the data. @@ -468,9 +466,9 @@ define(['easejs', 'MathUuid','widget', 'widgetHandle', 'widgetHandleList', if(this.db){ this.store(x); } - }; - }; - } + } + } + } return response; }, @@ -567,9 +565,9 @@ define(['easejs', 'MathUuid','widget', 'widgetHandle', 'widgetHandleList', */ 'virtual public getAggregatorDescription' : function(){ return this.getWidgetDescription(); - }, - - }); + } + + }); return Aggregator; }); \ No newline at end of file diff --git a/js/modules/aggregator/storage/retrievalResult.js b/js/modules/aggregator/storage/retrievalResult.js index c1cd48b9b6ffc461c4dfff1fb075a9cf79b7e4d2..e0e3c2fda4dc48644da09e327a1f69e3b3c9d52a 100644 --- a/js/modules/aggregator/storage/retrievalResult.js +++ b/js/modules/aggregator/storage/retrievalResult.js @@ -129,7 +129,7 @@ define(['easejs'], 'public setName' : function(_name){ if(typeof _name === 'string'){ this.name = _name; - }; + } }, /** @@ -143,7 +143,7 @@ define(['easejs'], 'public setTimestamp' : function(_timesstamp){ if(_timesstamp instanceof Date){ this.type = _timesstamp; - }; + } }, /** @@ -157,8 +157,8 @@ define(['easejs'], 'public setValues' : function(_values){ if(_values instanceof Array){ this.values = _values; - }; - }, + } + } }); diff --git a/js/modules/aggregator/storage/storage.js b/js/modules/aggregator/storage/storage.js index aa9901a951ae44fd9e5bdd5aedc3b3c57455a6a0..4157561ddfb4289402367fd3e7281dda3c60051d 100644 --- a/js/modules/aggregator/storage/storage.js +++ b/js/modules/aggregator/storage/storage.js @@ -141,7 +141,6 @@ define(['easejs', 'attributeValue', 'attributeValueList', 'attributeType', * @param {String} _name Name of the database. */ 'private initStorage' : function(_name){ - var self = this; if(!window.openDatabase) { console.log('Databases are not supported in this browser.'); }else{ @@ -201,7 +200,7 @@ define(['easejs', 'attributeValue', 'attributeValueList', 'attributeType', this.db.transaction(function(tx){tx.executeSql(statement);}, this.errorCB, this.successCB); } console.log('insertIntoTable: ' + tableName); - }; + } }, /** @@ -275,7 +274,7 @@ define(['easejs', 'attributeValue', 'attributeValueList', 'attributeType', * @param {@this} self */ 'private queryTableSuccess' : function(_tx, results, self, _function){ - self.attributeNames = new Array(); + self.attributeNames = []; var len = results.rows.length; for(var i=0; i<len; i++){ var table = results.rows.item(i).name; @@ -361,12 +360,12 @@ define(['easejs', 'attributeValue', 'attributeValueList', 'attributeType', * @param {*} _tx * @param {*} results * @param {String} _tableName Name of the searched attribute. - * @param {@this} self - * @param {?function} _function For additional actions, if an asynchronous function is used. + * @param self + * @param {?function} _function For additional actions, if an asynchronous function is used. */ 'private queryValuesSuccess' : function(_tx, results,_tableName, self, _function){ var len = results.rows.length; - var attributeList = new Array(); + var attributeList = []; var attributeName = this.resolveAttributeName(_tableName); var parameterList = this.resolveParameters(_tableName); for(var i=0; i<len; i++){ @@ -376,7 +375,7 @@ define(['easejs', 'attributeValue', 'attributeValueList', 'attributeType', withTimestamp(results.rows.item(i).created_). withParameters(parameterList); attributeList.push(attribute); - }; + } self.attributes = new RetrievalResult().withName(_tableName) .withTimestamp(new Date()) .withValues(attributeList); @@ -465,7 +464,7 @@ define(['easejs', 'attributeValue', 'attributeValueList', 'attributeType', var self = this; if(self.data.size() == 0){ return; - }; + } var keys = self.data.getKeys(); for(var i in keys){ var key = keys[i]; @@ -545,8 +544,8 @@ define(['easejs', 'attributeValue', 'attributeValueList', 'attributeType', var keys = parameterList.getKeys(); for(var i in keys){ tableName = tableName + '__' +keys[i] + '_'+parameterList.getItem(keys[i]); - }; - }; + } + } return tableName; }, @@ -561,9 +560,7 @@ define(['easejs', 'attributeValue', 'attributeValueList', 'attributeType', */ 'private resolveAttributeName' : function(_tableName){ var resolvedTableName = _tableName.split('__'); - - var attributeName = resolvedTableName[0]; - return attributeName; + return resolvedTableName[0]; }, /** Extracts the parameters form the table name. @@ -584,9 +581,7 @@ define(['easejs', 'attributeValue', 'attributeValueList', 'attributeType', parameterList.put(parameter); } return parameterList; - }, - - + } }); diff --git a/js/modules/aggregator/testAggregator.js b/js/modules/aggregator/testAggregator.js index 0eb162c477cde508965c7cda3c3c9a005e805c7e..b8f45a2d89dfc1cec935907d7a0229867c632652 100644 --- a/js/modules/aggregator/testAggregator.js +++ b/js/modules/aggregator/testAggregator.js @@ -41,7 +41,7 @@ define(['easejs', 'public queryReferencedWidget' :function(_widgetHandle, _function){ var widget = this.discoverer.getWidget(_widgetHandle.getId()); widget.updateWidgetInformation(_function); - }, + } }); diff --git a/js/modules/attribute/attributeType.js b/js/modules/attribute/attributeType.js index 346a05b676329cd274b5620361df64ebd9fad784..02161688729cadde9eb9d2e849577ec904febe30 100644 --- a/js/modules/attribute/attributeType.js +++ b/js/modules/attribute/attributeType.js @@ -35,7 +35,7 @@ define(['easejs', * @memberof AttributeType# * @desc Name of the Attribute */ - 'protected parameterList' : [], + 'protected parameterList' : [], /** * Constructor: Initializes the ParameterList. @@ -153,8 +153,8 @@ define(['easejs', 'public setName' : function(_name){ if(typeof _name === 'string'){ this.name = _name; - }; - }, + } + }, /** * Sets the type. @@ -167,8 +167,8 @@ define(['easejs', 'public setType' : function(_type){ if(typeof _type === 'string'){ this.type = _type; - }; - }, + } + }, /** * Adds a parameter. @@ -210,13 +210,13 @@ define(['easejs', && _attributeType.getType() == this.getType() && _attributeType.getParameters().equals(this.parameterList)){ return true; - }; - }; - return false; + } + } + return false; - }, + } - }); + }); return AttributeType; diff --git a/js/modules/attribute/attributeValue.js b/js/modules/attribute/attributeValue.js index cfe2d45588b9ebd6b86376fe233dceae845f3584..dfc6ab2245c21f85e0b4877106c068af8cec93b5 100644 --- a/js/modules/attribute/attributeValue.js +++ b/js/modules/attribute/attributeValue.js @@ -36,7 +36,7 @@ define([ 'easejs', 'attributeType' ], function(easejs, AttributeType) { /** * Builder for value. - * + * * @public * @alias withValue * @memberof AttributeValue# @@ -51,7 +51,7 @@ define([ 'easejs', 'attributeType' ], function(easejs, AttributeType) { /** * Builder for timestamp. - * + * * @public * @alias withTimestamp * @memberof AttributeValue# @@ -65,7 +65,7 @@ define([ 'easejs', 'attributeType' ], function(easejs, AttributeType) { /** * Sets the value. - * + * * @public * @alias setValue * @memberof AttributeValue# @@ -77,7 +77,7 @@ define([ 'easejs', 'attributeType' ], function(easejs, AttributeType) { /** * Returns the value. - * + * * @public * @alias getValue * @memberof AttributeValue# @@ -89,7 +89,7 @@ define([ 'easejs', 'attributeType' ], function(easejs, AttributeType) { /** * Sets the timestamp. - * + * * @public * @alias setTimestamp * @memberof AttributeValue# @@ -101,7 +101,7 @@ define([ 'easejs', 'attributeType' ], function(easejs, AttributeType) { /** * Returns the timestamp. - * + * * @public * @alias getTimestamp * @memberof AttributeValue# @@ -113,7 +113,7 @@ define([ 'easejs', 'attributeType' ], function(easejs, AttributeType) { /** * Compares this instance with the given one. - * + * * @public * @alias equals * @memberof AttributeValue# @@ -126,44 +126,41 @@ define([ 'easejs', 'attributeType' ], function(easejs, AttributeType) { && _attributeValue.getValue() == this .getValue()) { return true; - }; - }; + } + } return false; }, /** * Returns the AttributeType of an AttributeValue. - * + * * @public * @alias getAttributeType * @memberof AttributeValue# * @returns {AttributeType} */ 'public getAttributeType' : function() { - var type = new AttributeType().withName(this.name) - .withType(this.type).withParameters( - this.parameterList); - return type; + return new AttributeType().withName(this.name) + .withType(this.type).withParameters( + this.parameterList); }, - + /** * Builds a new AttributeValue from the given type. - * + * * @public * @alias buildFromAttributeType * @memberof AttributeValue# * @param {AttributeType} _attributeType AttributeType for build process. - * @returns {AttributeValue} + * @returns {AttributeValue} */ 'public buildFromAttributeType' : function(_attributeType) { if (Class.isA(AttributeType, _attributeType)) { - var attValue = new AttributeValue().withName(_attributeType.getName()) - .withType(_attributeType.getType()).withParameter(_attributeType.getParameters()).withValue('undefined'); - - return attValue; - }; + return new AttributeValue().withName(_attributeType.getName()) + .withType(_attributeType.getType()).withParameter(_attributeType.getParameters()).withValue('undefined'); + } return null; - }, + } }); diff --git a/js/modules/widget/GeoLocationWidget.js b/js/modules/widget/GeoLocationWidget.js index ab54f4a17584d353e76155b9522688e0c49fd9b2..6f64b5d2fa25abb342f63f6ec7fc0d0a6e36fc88 100644 --- a/js/modules/widget/GeoLocationWidget.js +++ b/js/modules/widget/GeoLocationWidget.js @@ -155,7 +155,7 @@ define([ 'easejs', 'widget', 'attributeType', 'attributeTypeList', */ 'private onError' : function(error) { alert('code: ' + error.code + '\n' + 'message: '+ error.message + '\n'); - }, + } }); return GeoLocationWidget; }); \ No newline at end of file diff --git a/js/modules/widget/widget.js b/js/modules/widget/widget.js index 4e1e1f94643cd482d3c51371d3daecf63736fbef..f4b28a41ac5b209f97aef1bd5de080df32b5afdd 100644 --- a/js/modules/widget/widget.js +++ b/js/modules/widget/widget.js @@ -802,7 +802,7 @@ define([ 'easejs', 'MathUuid', 'callback', 'callbackList', 'attributeType', if (this.discoverer) { this.discoverer.registerNewComponent(this); } - }, + } // /** // * Unregisters the component to the associated discoverer