Revision 15413 import/ext3D/branches/ext3D_v1.1/libAnimation/src/com/iver/cit/gvsig/animation/AnimationContainer.java

View differences:

AnimationContainer.java
6 6
import com.iver.cit.gvsig.animation.traks.AnimationDatedTrack;
7 7
import com.iver.cit.gvsig.animation.traks.AnimationTimeTrack;
8 8
import com.iver.cit.gvsig.animation.traks.IAnimationTrack;
9
import com.iver.utiles.IPersistance;
9 10
import com.iver.utiles.XMLEntity;
10 11

  
11
public class AnimationContainer {
12
public class AnimationContainer implements IPersistance{
12 13

  
13 14
	// IAnimationTrakc List
14 15
	public List AnimationTrackList;
16
	
17
	
15 18

  
16 19
	public AnimationContainer() {
17 20
		List aniTrackList = this.getAnimationTrackList();
......
122 125
		AnimationTrackList = animationTrackList;
123 126
	}
124 127

  
125
	// Project persistence
128
	/*	 
129
	 * IPersistance methods.
130
	 */
131
	
132
	public String getClassName() {
133
		// TODO Auto-generated method stub
134
		return this.getClass().getName();		
135
	}
136
	
126 137
	/**
127 138
	 * @return
128 139
	 */
129 140
	public XMLEntity getXMLEntity() {
130
		return null;
141
		XMLEntity xml = new XMLEntity();
142
		xml.putProperty("className", this.getClassName());		
143
		for (int i = 0; i < this.AnimationTrackList.size(); i++) {			
144
			IAnimationTrack trackElement = (IAnimationTrack) this.AnimationTrackList.get(i);			
145
			trackElement.getXMLEntity();
146
		}		
147
		return xml;
131 148
	}
132 149

  
133 150
	/**
134 151
	 * @param xml
135 152
	 */
136 153
	public void setXMLEntity(XMLEntity xml) {
154
		
155
		for (int i = 0; i < this.AnimationTrackList.size(); i++) {
156
			IAnimationTrack trackElement = (IAnimationTrack) this.AnimationTrackList.get(i);			
157
			trackElement.setXMLEntity(xml);			
158
		}					
137 159
	}
138

  
160
	
139 161
	public String toString() {
140 162
		String result = "";
141 163
		List ATL = this.AnimationTrackList;
......
163 185
			}
164 186
		}
165 187
	}
188

  
166 189
}

Also available in: Unified diff