FileParamObject.js 2.08 KB
/**
 * Project      : AMDA-NG
 * Name         : FileObject.js
 * Description  :  
 * @class   amdaModel.FileObject
 * @extends amdaModel.AmdaObject 
 * 
 * @author Elena
 * @version $Id: FileParamObject.js 2683 2014-12-02 10:58:53Z elena $
 ******************************************************************************
 *    FT Id     :   Date   : Name - Description
 ******************************************************************************
 
 */
 
 		
Ext.define('amdaModel.FileParamObject', {
		extend: 'amdaModel.AmdaObject',
    
    fields : [
	      {name: 'minsampling', type: 'float'},
	      {name: 'maxsampling', type: 'float'},	       
	      {name: 'mask', type: 'string'}, 
	      {name: 'file', type:'string'},
	      {name: 'realvar', type: 'string'}, // or integer !!!
	      {name:'format', type: 'string'},
	      {name:'type', type: 'string'},
	      {name:'size', type: 'integer'},
	      {name:'units', type:'string'},
	      {name:'fillvalue', type:'float'},
	      {name:'ytitle', type:'string'},
              {name:'legend', type:'string'},
              {name:'plottype', type:'string'}
	],
	
	 

	getJsonValues : function(hasId){
	    var myValues  = new Object();       
	    if (hasId) {
		myValues.id = this.get('id');
	    }
	    myValues.name = this.get('name');
	    myValues.minsampling = this.get('minsampling');
	    myValues.maxsampling = this.get('maxsampling');
	    myValues.mask = this.get('mask');
	    myValues.file = this.get('file');
	    myValues.realvar = this.get('realvar');
	    myValues.format = this.get('format');
	    myValues.type = this.get('type');
	    myValues.size = this.get('size');
	    myValues.units = this.get('units');
	    myValues.fillvalue = this.get('fillvalue'); 
	    myValues.ytitle = this.get('ytitle');
            myValues.legend = this.get('legend');
	    myValues.plottype = this.get('plottype');
            
	    myValues.vi = '';
	    myValues.desc = '';
	    
	    myValues.tableDef = this.get('tableDef');
	    
	    myValues.nodeType = amdaModel.MyDataParamNode.nodeType;
	    myValues.leaf = true;
	    return myValues;
	}
      
});