Catalog.js 1.23 KB
/**
 * Project      : AMDA-NG
 * Name         : Catalog.js 
 * Description  : Catalog Object Definition
 * @class amdaModel.Catalog
 * @extends amdaModel.TimeTable 
 * @author  elena
 */

  

Ext.define('amdaModel.Catalog', {
	
    extend: 'amdaModel.TimeTable',
    
    fields : [
	      { name: 'parameters' }                        
	],
    
    getJsonValues : function (hasId) {
    	var values  = new Object();	    
    	if (hasId) {
    		values.id = this.get('id');
    	}
    	
	values.timesrc =   this.get('timesrc');
    	values.name = this.get('name');
    	values.created = this.get('created');
	
    	if (this.get('description').match(/[a-z,0-9]/gi) != null) {
    		values.description = this.get('description');
    	}
//     	if (this.get('history').match(/[a-z,0-9]/gi) != null) {
//     		values.history = this.get('history');
//     	}
    	values.objName = this.get('objName');
    	values.objFormat = this.get('objFormat');
        values.folderId = this.get('folderId');
    	values.nbIntervals = this.get('nbIntervals');
    	values.cacheToken = this.get('cacheToken');
   	values.parameters = this.get('parameters');
    	values.leaf = true;
    	values.nodeType = amdaModel.CatalogNode.nodeType;
    	return values;
    }
	
	
 
});