} else if (parameters.containsKey(DAV_URI)) {
return getRepository(
new Spi2davRepositoryServiceFactory(), parameters);
} else if (parameters.containsKey(DAVEX_URI)) {
return getRepository(
new Spi2davexRepositoryServiceFactory(), parameters);
} else if (parameters.containsKey(JcrUtils.REPOSITORY_URI)) {
Map copy = new HashMap(parameters);
Object parameter = copy.remove(JcrUtils.REPOSITORY_URI);
try {
URI uri = new URI(parameter.toString().trim());
String scheme = uri.getScheme();
// TODO: Check whether this is a valid dav or davex URI
// TODO: Support tags like <link rel="jackrabbit-spi2dav" ...>
if ("http".equalsIgnoreCase(scheme)
|| "https".equalsIgnoreCase(scheme)) {
copy.put(DAVEX_URI, parameter);
return getRepository(
new Spi2davexRepositoryServiceFactory(), copy);
} else {
return null;
}
} catch (URISyntaxException e) {
return null;