+ isMetaAttribute: function(attrName) {
+ return attrName !== 'class' &&_.contains(_.keys(this.getMetaAttributes()), attrName);
+ },
+
+ getMetadata: function() {
+ return this.getData(metadataKey) || [];
+ },
+
+ addMetadataRow: function(row) {
+ this.setMetadataRow(null, row);
+ },
+
+ setMetadataRow: function(index, row) {
+ var metadata = this.getData(metadataKey) || [];
+ if(typeof index !== 'number' || index > metadata.length - 1) {
+ metadata.push(row);
+ index = metadata.length - 1;
+ } else {
+ metadata[index] = _.extend(metadata[index], row);
+ }
+ this.setData(metadataKey, metadata);
+ this.triggerChangeEvent('metadataChange', {index: index});
+ },