Revision 24017 branches/v2_0_0_prep/libraries/libFMap_data/src/org/gvsig/fmap/data/feature/impl/commands/AbstractCommandsRecord.java
AbstractCommandsRecord.java | ||
---|---|---|
6 | 6 |
|
7 | 7 |
import org.gvsig.fmap.data.feature.Command; |
8 | 8 |
import org.gvsig.fmap.data.feature.CommandsRecord; |
9 |
import org.gvsig.fmap.data.feature.impl.commands.implementation.AttributeCommand; |
|
10 | 9 |
import org.gvsig.fmap.data.feature.impl.commands.implementation.FeatureCommand; |
11 | 10 |
import org.gvsig.tools.observer.DefaultObservable; |
12 | 11 |
import org.gvsig.tools.observer.Observer; |
... | ... | |
181 | 180 |
return commands; |
182 | 181 |
} |
183 | 182 |
|
184 |
public List getCommandsAttributeDeleted() { // List of Feature |
|
185 |
Stack clonedUndos=(Stack)undos.clone(); |
|
186 |
|
|
187 |
ArrayList commands=new ArrayList(); |
|
188 |
while (!clonedUndos.isEmpty()){ |
|
189 |
Command command=(Command)clonedUndos.pop(); |
|
190 |
if (command.getType().equals(Command.DELETE) && command instanceof AttributeCommand) { |
|
191 |
commands.add(command); |
|
192 |
} |
|
193 |
} |
|
194 |
|
|
195 |
return commands; |
|
196 |
} |
|
197 |
|
|
198 |
public List getCommandsAttributeUpdated() { // List of Feature |
|
199 |
Stack clonedUndos=(Stack)undos.clone(); |
|
200 |
|
|
201 |
ArrayList commands=new ArrayList(); |
|
202 |
while (!clonedUndos.isEmpty()){ |
|
203 |
Command command=(Command)clonedUndos.pop(); |
|
204 |
if (command.getType().equals(Command.UPDATE) && command instanceof AttributeCommand) { |
|
205 |
commands.add(command); |
|
206 |
} |
|
207 |
} |
|
208 |
|
|
209 |
return commands; |
|
210 |
} |
|
211 |
public List getCommandsAttributeInserted() { // List of Feature |
|
212 |
Stack clonedUndos=(Stack)undos.clone(); |
|
213 |
|
|
214 |
ArrayList commands=new ArrayList(); |
|
215 |
while (!clonedUndos.isEmpty()){ |
|
216 |
Command command=(Command)clonedUndos.pop(); |
|
217 |
if (command.getType().equals(Command.INSERT) && command instanceof AttributeCommand) { |
|
218 |
commands.add(command); |
|
219 |
} |
|
220 |
} |
|
221 |
|
|
222 |
return commands; |
|
223 |
} |
|
224 |
|
|
225 | 183 |
public void endComplex(String description) { |
226 | 184 |
if (collection.isEmpty()) { |
227 | 185 |
complex = false; |
Also available in: Unified diff