NameParser parser = context.getNameParser("");
URI userNameUri = new URI(absoluteName);
String pathComponent = userNameUri.getPath();
// Should not ever have an empty path component, since that is /{DN}
if (pathComponent.length() < 1 ) {
throw new InvalidNameException(
"Search returned unparseable absolute name: " +
absoluteName );
}
Name name = parser.parse(pathComponent.substring(1));
return name.toString();
} catch ( URISyntaxException e ) {
throw new InvalidNameException(
"Search returned unparseable absolute name: " +
absoluteName );
}
}
}