/** * See restores what was saved by makeHash(). */ public void restoreFromHash(Map<Integer,Map<Integer,Integer>> mash, IAtomContainerSet mset) { if(rGroupQuery!=null) { int rootHash = mash.get(-1).get(0); rGroupQuery.setRootStructure(findContainer(rootHash,mset)); Map<Integer,RGroupList> def = rGroupQuery.getRGroupDefinitions(); for (Iterator<Integer>rgpHashItr=mash.keySet().iterator(); rgpHashItr.hasNext();) { int rgpHash = rgpHashItr.next(); restore: for(Iterator<Integer> itr= def.keySet().iterator();itr.hasNext();) { int rgrpNum=itr.next(); List<RGroup> rgpList = def.get(rgrpNum).getRGroups(); for(RGroup rgp : rgpList) { if (rgp!=null && rgp.hashCode()==rgpHash) { rgp.setGroup(findContainer(mash.get(rgpHash).get(0),mset)); if (rgp.getGroup()!=null) { rgp.setFirstAttachmentPoint(findAtom(mash.get(rgpHash).get(1),rgp.getGroup())); rgp.setSecondAttachmentPoint(findAtom(mash.get(rgpHash).get(2),rgp.getGroup())); } break restore; } } } } } }
IAtom apo1=redoRGroupApo.get(redoRGroup).get(1); IAtom apo2=redoRGroupApo.get(redoRGroup).get(2); rgrp.setFirstAttachmentPoint(apo1); rgrp.setSecondAttachmentPoint(apo2);
IAtom apo1=existingRGroupApo.get(undoRGroup).get(1); IAtom apo2=existingRGroupApo.get(undoRGroup).get(2); rgrp.setFirstAttachmentPoint(apo1); rgrp.setSecondAttachmentPoint(apo2);
switch (apo) { case 1: rGroup.setFirstAttachmentPoint(at); break; case 2: break; case 3: { rGroup.setFirstAttachmentPoint(at); rGroup.setSecondAttachmentPoint(at);
rgrp.setFirstAttachmentPoint(apoAtom); break apoBreak; if (apoSet==0) { rgrp.setFirstAttachmentPoint(atom);