FileParamObject.js
2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/**
* 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:'status', type: 'string'},
{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.status = this.get('status');
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;
}
});