Introduce the convept of Feature to a topic.

This commit is contained in:
Paulo Gustavo Veiga
2012-02-27 18:17:15 -03:00
parent 9e44804314
commit 7ba0e36cb9
26 changed files with 483 additions and 1240 deletions

View File

@@ -17,26 +17,20 @@
*/
mindplot.model.NoteModel = new Class({
initialize : function(text, topic) {
$assert(text, 'text text can not be null');
$assert(topic, 'topic can not be null');
this._text = text;
this._topic = topic;
Extends: mindplot.model.FeatureModel,
initialize : function(topic, attributes) {
this.parent(mindplot.model.NoteModel.FEATURE_TYPE, topic);
this.setText(attributes.text);
},
getText:function() {
return this._text;
return this.getAttribute('text');
},
setText : function(text) {
this._text = text;
},
getTopic : function() {
return this._topic;
},
isNoteModel : function() {
return true;
$assert(text, 'text can not be null');
this.setAttribute('text', text);
}
});
});
mindplot.model.NoteModel.FEATURE_TYPE = "note";