public static String toSchemaWithoutInlineBatches ( String schema ) { StringBuilder sb = new StringBuilder ( schema ) ; int i = sb . indexOf ( batchSpecificComments ) ; if ( i != - 1 ) { sb . delete ( i , i + batchSpecificComments . length ( ) ) ; } i = sb . indexOf ( startBatch ) ; if ( i != - 1 ) { sb . delete ( i , i + startBatch . length ( ) ) ; } i = sb . indexOf ( endBatch ) ; if ( i != - 1 ) { sb . delete ( i , i + endBatch . length ( ) ) ; } return sb . toString ( ) ; }
Given a schema strips out inline batch statements and associated comments .