|
1 | | -/* |
2 | | - * Class: SuperMap.Format |
3 | | - * 读写各种格式的格式类基类。其子类应该包含并实现read和write方法。 |
4 | | - */ |
5 | 1 | var SuperMap = require('../SuperMap'); |
| 2 | + |
| 3 | +/** |
| 4 | + * @class SuperMap.Format |
| 5 | + * @description 读写各种格式的格式类基类。其子类应该包含并实现read和write方法。 |
| 6 | + * @param options - {Object} 选项对象,其属性会被直接设置到format实例。如:<br> |
| 7 | + * keepData - {Boolean} 如果设置为true, <data> 属性会指向被解析的对象(例如json或xml数据对象)。 |
| 8 | + * @return {SuperMap.Format} 实例。 |
| 9 | + */ |
6 | 10 | SuperMap.Format = SuperMap.Class({ |
7 | | - /** |
8 | | - * @class SuperMap.Format |
9 | | - * @constructs SuperMap.SuperMap.Format |
10 | | - * @classdesc |
11 | | - * 读写各种格式的格式类基类。其子类应该包含并实现read和write方法。 |
12 | | - * @extends {SuperMap} |
13 | | - * @api |
14 | | - */ |
15 | 11 |
|
16 | 12 | /** |
17 | | - * Property: options |
18 | | - * {Object} A reference to options passed to the constructor. |
| 13 | + * @member SuperMap.Format.prototype.options -{Object} |
| 14 | + * @description A reference to options passed to the constructor. |
19 | 15 | */ |
20 | 16 | options: null, |
21 | 17 |
|
22 | 18 | /** |
23 | | - * APIProperty: externalProjection |
24 | | - * {<SuperMap.Projection>} 当设置了externalProjection和internalProjection参数, |
25 | | - * format类会重新对其读到的或写出的几何图形进行投影。externalProjection |
26 | | - * 是read操作读到或write操作写出的投影内容。为了能够重新投影,针对某 |
27 | | - * 一个投影的transformation方法必须是有效的。同时,我们可以使用proj4js |
28 | | - * 或自定义的transformation方法来进行支持。查看{<SuperMap.Projection.addTransform>} |
29 | | - * 以获取更多的信息。 |
| 19 | + * @member SuperMap.Format.prototype.externalProjection -{SuperMap.Projection} |
| 20 | + * @description 当设置了externalProjection和internalProjection参数, |
| 21 | + * format类会重新对其读到的或写出的几何图形进行投影。externalProjection |
| 22 | + * 是read操作读到或write操作写出的投影内容。为了能够重新投影,针对某 |
| 23 | + * 一个投影的transformation方法必须是有效的。同时,我们可以使用proj4js |
| 24 | + * 或自定义的transformation方法来进行支持。查看{SuperMap.Projection.addTransform} |
| 25 | + * 以获取更多的信息。 |
30 | 26 | */ |
31 | 27 | externalProjection: null, |
32 | 28 |
|
33 | 29 | /** |
34 | | - * APIProperty: internalProjection |
35 | | - * {<SuperMap.Projection>} 当设置了externalProjection和internalProjection参数, |
36 | | - * format类会重新对其读到的或写出的几何图形进行投影。internalProjection |
37 | | - * 是read操作返回或传给write操作的投影内容。为了能够重新投影,针对某 |
38 | | - * 一个投影的transformation方法必须是有效的。同时,我们可以使用proj4js |
39 | | - * 或自定义的transformation方法来进行支持。查看{<SuperMap.Projection.addTransform>} |
40 | | - * 以获取更多的信息。 |
| 30 | + * @member SuperMap.Format.prototype.internalProjection -{SuperMap.Projection} |
| 31 | + * @description 当设置了externalProjection和internalProjection参数, |
| 32 | + * format类会重新对其读到的或写出的几何图形进行投影。internalProjection |
| 33 | + * 是read操作返回或传给write操作的投影内容。为了能够重新投影,针对某 |
| 34 | + * 一个投影的transformation方法必须是有效的。同时,我们可以使用proj4js |
| 35 | + * 或自定义的transformation方法来进行支持。查看{SuperMap.Projection.addTransform} |
| 36 | + * 以获取更多的信息。 |
41 | 37 | */ |
42 | 38 | internalProjection: null, |
43 | 39 |
|
44 | 40 | /** |
45 | | - * APIProperty: data |
46 | | - * {Object} 当 <keepData> 属性设置为true,这是传递给<read>操作的要被 |
47 | | - * 解析的字符串。 |
| 41 | + * @member SuperMap.Format.prototype.data -{Object} |
| 42 | + * @description 当 <keepData> 属性设置为true,这是传递给<read>操作的要被解析的字符串。 |
48 | 43 | */ |
49 | 44 | data: null, |
50 | 45 |
|
51 | 46 | /** |
52 | 47 | * APIProperty: keepData |
53 | | - * {Object} 保持最近读到的数据的引用(通过 <data> 属性)。默认值是false。 |
| 48 | + * @member SuperMap.Format.prototype.keepData -{Object} |
| 49 | + * @description 保持最近读到的数据的引用(通过 <data> 属性)。默认值是false。 |
54 | 50 | */ |
55 | 51 | keepData: false, |
56 | 52 |
|
57 | 53 | /** |
58 | | - * Constructor: SuperMap.Format |
59 | | - * 直接实例化这个类没有实际作用,可以通过实例化其子类来进行操作。 |
60 | | - * |
61 | | - * Parameters: |
62 | | - * options - {Object} 选项对象,其属性会被直接设置到format实例。 |
63 | | - * |
64 | | - * Valid options: |
65 | | - * keepData - {Boolean} 如果设置为true, <data> 属性会指向被解析的对象。 |
66 | | - * (例如json或xml数据对象)。 |
67 | | - * |
68 | | - * Returns: |
69 | | - * 返回 <SuperMap.Format> 实例。 |
70 | | - */ |
71 | | - |
72 | | - /** |
73 | | - * @method SuperMap.Format.initialize |
74 | | - * @param options - {Object} 选项对象,其属性会被直接设置到format实例。 |
75 | | - * Allowed options properties:</br> |
76 | | - * datasetNames - {Array(String)} 数据集集合中的数据集名称列表。</br> |
77 | | - * returnContent - {<SuperMap.FilterParameter>} 是否直接返回查询结果。</br> |
78 | | - * fromIndex - {Integer} 查询结果的最小索引号。</br> |
79 | | - * toIndex - {Integer} 查询结果的最大索引号。</br> |
| 54 | + * @function SuperMap.Format.prototype.initialize |
| 55 | + * @description 直接实例化这个类没有实际作用,可以通过实例化其子类来进行操作。 |
| 56 | + * @param options - {Object} 选项对象,其属性会被直接设置到format实例。如:<br> |
| 57 | + * keepData - {Boolean} 如果设置为true, <data> 属性会指向被解析的对象(例如json或xml数据对象)。 |
| 58 | + * @return {SuperMap.Format} 实例。 |
80 | 59 | */ |
81 | 60 | initialize: function (options) { |
82 | 61 | SuperMap.Util.extend(this, options); |
83 | 62 | this.options = options; |
84 | 63 | }, |
85 | 64 |
|
86 | | - /* |
87 | | - * APIMethod: destroy |
88 | | - * 销毁该格式类,释放相关资源。 |
| 65 | + /** |
| 66 | + * @function destroy |
| 67 | + * @description 销毁该格式类,释放相关资源。 |
89 | 68 | */ |
90 | 69 | destroy: function () { |
91 | 70 | //用来销毁该格式类,释放相关资源 |
92 | 71 | }, |
93 | 72 |
|
94 | | - /* |
95 | | - * Method: read |
96 | | - * Read data from a string, and return an object whose type depends on the |
97 | | - * subclass. |
98 | | - * |
99 | | - * Parameters: |
100 | | - * data - {string} Data to read/parse. |
101 | | - * |
102 | | - * Returns: |
103 | | - * Depends on the subclass |
| 73 | + /** |
| 74 | + * @function SuperMap.Format.prototype.read |
| 75 | + * @description Read data from a string, and return an object whose type depends on the subclass. |
| 76 | + * @param data - {string} Data to read/parse. |
104 | 77 | */ |
105 | 78 | read: function (data) { |
106 | 79 | //用来从字符串中读取数据 |
107 | 80 | }, |
108 | 81 |
|
109 | | - /* |
110 | | - * Method: write |
111 | | - * Accept an object, and return a string. |
112 | | - * |
113 | | - * Parameters: |
114 | | - * object - {Object} Object to be serialized |
115 | | - * |
116 | | - * Returns: |
117 | | - * {String} A string representation of the object. |
| 82 | + /** |
| 83 | + * @function SuperMap.Format.prototype.write |
| 84 | + * @description Accept an object, and return a string. |
| 85 | + * @param object - {Object} Object to be serialized |
| 86 | + * @return {String} A string representation of the object. |
118 | 87 | */ |
119 | 88 | write: function (object) { |
120 | 89 | //用来写字符串 |
|
0 commit comments