private static URI normalize(URI uri) {
String fragment = uri.fragment();
String query = uri.query();
URI trimmedURI = uri.trimFragment().trimQuery();
URI result = trimmedURI;
String scheme = result.scheme();
if (scheme == null) {
if (result.hasAbsolutePath()) {
result = URI.createURI("file:" + result);
} else {
result = URI.createFileURI(new File(result.toString())