@@ -0,0 +1,1140 @@
+package mpicbg.spim.data.generic.sequence;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.HashMap;%0Aimport java.util.List;%0Aimport java.util.Map;%0A%0Aimport mpicbg.spim.data.generic.base.EntityUtils;%0A%0Apublic class AbstractSequenceDescriptionUtils%0A%7B%0A%09public static %3C V extends BasicViewSetup %3E void changeIds(%0A%09%09%09final AbstractSequenceDescription%3C V, ?, ? %3E seq,%0A%09%09%09final Map%3C Integer, Integer %3E oldIdToNewIdMap )%0A%09%7B%0A%09%09final List%3C V %3E setups = new ArrayList%3C V %3E( seq.getViewSetupsOrdered() );%0A%09%09EntityUtils.changeIds( setups, oldIdToNewIdMap );%0A%09%09final HashMap%3C Integer, V %3E setupsMap = new HashMap%3C Integer, V %3E();%0A%09%09for ( final V setup : setups )%0A%09%09%09setupsMap.put( setup.getId(), setup );%0A%09%09seq.setViewSetups( setupsMap );%0A%09%7D%0A%0A%09public static %3C V extends BasicViewSetup %3E void changeIds(%0A%09%09%09final AbstractSequenceDescription%3C V, ?, ? %3E seq,%0A%09%09%09final int... oldIdToNewIdMap )%0A%09%7B%0A%09%09assert ( oldIdToNewIdMap.length %25 2 == 0 );%0A%09%09final Map%3C Integer, Integer %3E map = new HashMap%3C Integer, Integer %3E();%0A%09%09for ( int i = 0; i %3C oldIdToNewIdMap.length; i += 2 )%0A%09%09%09map.put( oldIdToNewIdMap%5B i %5D, oldIdToNewIdMap%5B i + 1 %5D );%0A%09%09changeIds( seq, map );%0A%09%7D%0A%7D%0A

add utility methods to change ViewSetup ids in AbstractSequenceDescription