* and filters to the token stream.
*/
private TokenStream applyURINormalisation(TokenStream in) {
switch (normalisationType) {
case NONE:
return new URITrailingSlashFilter(in);
// here, trailing slash filter is after localname filtering, in order to
// avoid filtering subdirectory instead of localname
case LOCALNAME:
in = new URILocalnameFilter(in);
return new URITrailingSlashFilter(in);
// here, trailing slash filter is before localname filtering, in order to
// avoid trailing slash checking on every tokens generated by the
// URI normalisation filter
case FULL:
in = new URITrailingSlashFilter(in);
return new URINormalisationFilter(in);
default:
throw new EnumConstantNotPresentException(URINormalisation.class,
normalisationType.toString());