Revision 15445 import/ext3D/branches/ext3D_v1.1/libAnimation/src/com/iver/cit/gvsig/animation/traks/AnimationDatedTrack.java

View differences:

AnimationDatedTrack.java
35 35
	private Date endDate;
36 36
	
37 37
	private String sFormat = new String( "Y-m-d" );
38

  
39
	private String className;
38 40
	
39 41
	//private AnimationDatedInterval datedInterval;
40 42

  
......
170 172
	
171 173
	public void setXMLEntity(XMLEntity xml) {
172 174
		// TODO method to do persisence to this class
173
		if (xml.contains("type"))
174
			animationType = (IAnimationType) xml.getObjectProperty("type");		
175
		
176
		if (xml.contains("class_name"))
177
			className =	xml.getStringProperty("class_name");
178
		if (xml.contains("name"))
179
			Name =	xml.getStringProperty("name");
175 180
		if (xml.contains("descripcion"))
176 181
			Description = xml.getStringProperty("description");
177
		if (xml.contains("animateted_object"))
178
			animatedObject = xml.getObjectProperty("animated_object");
179 182
		if (xml.contains("begin_date"))
180 183
			beginDateString = xml.getStringProperty("begin_date");
181 184
		if (xml.contains("end_date"))
182 185
			endDateString = xml.getStringProperty("end_date");
183 186
		
184 187
		
185
		for (int i = 0; i < this.animationDateIntervalList.size(); i++) {
186
			AnimationDatedInterval datedInterval = (AnimationDatedInterval) this.animationDateIntervalList.get(i);			
187
			datedInterval.setXMLEntity(xml);			
188
		}					
188
//		for (int i = 0; i < this.animationDateIntervalList.size(); i++) {
189
//			AnimationDatedInterval datedInterval = (AnimationDatedInterval) this.animationDateIntervalList.get(i);			
190
//			datedInterval.setXMLEntity(xml);			
191
//		}					
189 192

  
190 193
	}
191 194

  
192 195
	public XMLEntity getXMLEntity() {
193 196
		// TODO method to get persisence to this class
194 197
		
195
		
196

  
197 198
		XMLEntity xml = new XMLEntity();
198
		xml.putProperty("className", this.getClassName());
199
		xml.putProperty("type", animationType);
199
		xml.putProperty("class_name", this.getClassName());
200
		xml.putProperty("name", Name);
200 201
		xml.putProperty("description",Description );
201
		xml.putProperty("animated_object", animatedObject);
202 202
		
203 203
		beginDateString = DateTime.dateToString(beginDate, sFormat);
204 204
		endDateString = DateTime.dateToString(endDate, sFormat);
......
206 206
		xml.putProperty("begin_date", beginDateString);
207 207
		xml.putProperty("end_date", endDateString);
208 208
		
209
		for (int i = 0; i < this.animationDateIntervalList.size(); i++) {			
210
			AnimationDatedInterval datedInterval = (AnimationDatedInterval) this.animationDateIntervalList.get(i);			
211
			datedInterval.getXMLEntity();
212
		}		
209
//		for (int i = 0; i < this.animationDateIntervalList.size(); i++) {			
210
//			AnimationDatedInterval datedInterval = (AnimationDatedInterval) this.animationDateIntervalList.get(i);			
211
//			datedInterval.getXMLEntity();
212
//		}		
213 213
		return xml;
214 214
		
215 215
	}

Also available in: Unified diff