private static String cleanIdentifier ( final String identifier ) { final String id = identifier . split ( "#" ) [ 0 ] . split ( "\\?" ) [ 0 ] ; if ( id . endsWith ( "/" ) ) { return id . substring ( 0 , id . length ( ) - 1 ) ; } return id ; }
Clean the identifier .