function NeuroClass() { this.class = {};//obiekt z cechami klasy this._properties = {};//obiekt z propertisami } //pobranie danych o klasie //pobranie danych o propertisach NeuroClass.prototype.setModel = function(data) { var self = this; $(data).each(function () { $.each(this.attributes, function () { self.class[this.name] = this.value; }); }); var nodes = data[0].childNodes; for (var i = 0; i < nodes.length; i++) { if(nodes[i].nodeType == 3) continue; var node = $(nodes[i]); this.addProperties(node); } } NeuroClass.prototype.addProperties = function (data) { var properties = {}; $(data).each(function () { $.each(this.attributes, function () { properties[this.name] = this.value; }); }); this._properties[properties["ID"]] = properties; } NeuroClass.prototype.getScheme = function(){ return this.class["SYMBOL"].split(',').map(Number); }