12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- YUI.add('se-model-module', function (Y) {
- var ID = 'id',
- AST = 'ast',
- SYM = 'sym',
- CODE = 'code',
- NAME = 'name',
- TEXT = 'text';
- Y.namespace('SE.Models').Module = Y.Base.create('moduleModelSE', Y.Model, [], {
- getId: function () {
- return this.get(ID);
- },
- setId: function (id) {
- return this.set(ID, id);
- },
- getName: function () {
- return this.get(NAME);
- },
- setName: function (name) {
- return this.set(NAME, name);
- },
- getAst: function () {
- return this.get(AST);
- },
- setAst: function (ast) {
- return this.set(AST, ast);
- },
- getSym: function () {
- return this.get(SYM);
- },
- setSym: function (sym) {
- return this.set(SYM, sym);
- },
- getCode: function () {
- return this.get(CODE)
- },
- setCode: function (code) {
- return this.set(CODE, code);
- },
- getText: function () {
- return this.get(TEXT);
- },
- setText: function (text) {
- return this.set(TEXT, text);
- },
- isReady: function () {
- return !Y.Lang.isNull(this.get(CODE));
- }
- }, {
- ATTRS: {
- ast: {
- value: null
- },
- sym: {
- value: null
- },
- code: {
- value: null
- },
- name: {
- value: 'noname',
- validator: Y.Lang.isString
- },
- text: {
- value: 'MODULE noname; END noname.',
- validator: Y.Lang.isString
- }
- }
- });
- }, '1.0', {
- requires: [
- 'model'
- ]
- });
|