public static String flipAlignment ( String xml ) throws IOException , StructureException { AFPChain [ ] afps = parseMultiXML ( xml ) ; if ( afps . length < 1 ) return null ; if ( afps . length == 1 ) { AFPChain newChain = AFPChainFlipper . flipChain ( afps [ 0 ] ) ; if ( newChain . getAlgorithmName ( ) == null ) { newChain . setAlgorithmName ( DEFAULT_ALGORITHM_NAME ) ; } return AFPChainXMLConverter . toXML ( newChain ) ; } throw new StructureException ( "not Implemented yet!" ) ; }
Takes an XML representation of the alignment and flips the positions of name1 and name2