private URI parseURI(String source) {
try {
URI uri = new URI(source);
if (uri.getScheme() != null && !uri.getScheme().toLowerCase(Locale.US).equals(
getRepositoryScheme().toLowerCase(Locale.US))) {
throw new URISyntaxException(source, "Wrong scheme in URI. Expected "
+ getRepositoryScheme() + " as scheme!");
}
if (uri.getHost() == null && getHost() == null) {
throw new URISyntaxException(source, "Missing host in URI or in resolver");
}
if (uri.getPath() == null) {
throw new URISyntaxException(source, "Missing path in URI");
}
//if (uri.getUserInfo() == null && getUser() == null) {
// throw new URISyntaxException(source, "Missing username in URI or in resolver");
//}
return uri;