From: Mark G. <mg...@us...> - 2005-05-31 17:53:50
|
Update of /cvsroot/gmod/apollo/src/java/apollo/dataadapter/gamexml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2550/src/java/apollo/dataadapter/gamexml Modified Files: GAMEAdapter.java Log Message: annotation change events that were id updates were getting converted to delete & add transaction in transaction manager. splits & merges were affected by this, as they can update ids, as well as explicit id changes (and fly type changes). but TM.generateTransactions looks to see if there are transactions attached to the ACE, and this is now so for splits & merges, and uses the attached trans rather than converting (this is the new way im going with things). so the conversion wasnt happening - and nor should it in genTrans. the conversion should be data adapter specific - some data adapters - like tair - may not want this conversion at all. so theres now a replaceIdUpdatesWithDelAndAdd method in TransMan that is called by ChadoTransactionTransformer, so it is specific to chado now. this needs to work on flat transactions. the transaction manager can now track transactions in flattened & unflattened (with compound trans) form. i fiddled with the idea of making a chado subclass of TransactionOutputAdapter, but then realized the chado transaction transformer was just as good a place for it - that this id change is really part of the chado transform process. changed TransactionOutputAdapter.commit(List) to commitTransactions(TransactionManager) shich allows the transformer to call methods - like coalesce & repIdUpdates - on the TransactionManager. CompoundTransaction now has a recursive getLeafTransactions convenience method. corrected some bugs that were hard to find (nasty) due to trans man doing both flattened & unflattened - the flattened trans has to be nulled out on clear. Index: GAMEAdapter.java =================================================================== RCS file: /cvsroot/gmod/apollo/src/java/apollo/dataadapter/gamexml/GAMEAdapter.java,v retrieving revision 1.137 retrieving revision 1.138 diff -C2 -d -r1.137 -r1.138 *** GAMEAdapter.java 20 May 2005 21:19:18 -0000 1.137 --- GAMEAdapter.java 31 May 2005 17:53:41 -0000 1.138 *************** *** 345,349 **** output.setTransformer(new ChadoTransactionTransformer()); output.setTarget(fileName); ! output.commit(curation.getTransactionManager().getTransactions()); } } --- 345,349 ---- output.setTransformer(new ChadoTransactionTransformer()); output.setTarget(fileName); ! output.commitTransactions(curation.getTransactionManager()); } } |