From: Xuan B. <med...@us...> - 2008-06-11 04:36:25
|
Update of /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/tmdm/merged In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv10349/src/org/tm4j/topicmap/tmdm/merged Modified Files: MergedAssociation.java Log Message: Fix TM4J2 for testcase resource/tests/mergeAssociations0.xtm (TM4J1 still fails this testcase.). Index: MergedAssociation.java =================================================================== RCS file: /cvsroot/tm4j/tm4j/src/org/tm4j/topicmap/tmdm/merged/MergedAssociation.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MergedAssociation.java 11 Jun 2008 02:20:56 -0000 1.2 --- MergedAssociation.java 11 Jun 2008 04:36:31 -0000 1.3 *************** *** 121,124 **** --- 121,126 ---- assert newMergedAssociation==mergedAssociationForNewKey; + getContainer().indexAssociationToMergedAssociation(associationRole.getParent(),newMergedAssociation); + // delete this MergedAssociation. invalidate(); // maybe invalidate later? *************** *** 134,139 **** */ } ! } } --- 136,155 ---- */ } + } + + protected void addComponent(ReadableAssociation component) { + super.addComponent(component); ! if (!hasOnlyExactlyOneComponent()) { // we have two or more components now ! indexAllIncomingAssociationRoles(component,true); // FIXME: check whether notifyListener==true is correct here, or whether notifyListener should be set as the same value of the notifyListener of the governing merging process (if there is any) ! } ! } ! ! protected void indexAllIncomingAssociationRoles(ReadableAssociation component,boolean notifyListener) { ! for (ReadableAssociationRole associationRole : component.getRoles()) { ! MergedAssociationRoleKey key = getContainer().createAssociationRoleKey(associationRole); ! ! internalIndexAssociationRole(associationRole,key,notifyListener); ! } } } |