String scheme = uri.getScheme();
if (uri.getScheme() == null)
scheme = JCR_SCHEME;
if (!scheme.equals(JCR_SCHEME))
throw new URISyntaxException(scheme, "Only 'jcr' scheme is acceptable!");
userInfo = uri.getUserInfo();
repository = uri.getHost();
if (repository == null)
repository = defaultRepository;
workspace = parseWorkpace(uri);
if (workspace == null || workspace.length() == 0)
workspace = defaultWorkspace;
String fragment = uri.getFragment();
if (fragment != null)
{
if (fragment.startsWith("/"))
this.path = fragment;
else
this.id = new Identifier(uri.getFragment());
}
else
throw new URISyntaxException(fragment, "Neither Path nor Identifier defined!");
}