private static String changeIDs ( String text , Map < String , String > mapIds ) { String result = text ; for ( String key : mapIds . keySet ( ) ) { result = result . replace ( key , mapIds . get ( key ) ) ; } return result ; }
method to change the ids in a text according to map