if ( m_repository == null ) {
try {
m_repository = (SlideRepository) m_manager.lookup(SlideRepository.ROLE);
} catch (ServiceException se) {
throw new SourceException("Unable to lookup repository.", se);
}
}
if (getLogger().isDebugEnabled()) {
getLogger().debug("Creating source object for " + location);
}
final String[] parts = SourceUtil.parseUrl(location);
final String scheme = parts[SourceUtil.SCHEME];
final String authority = parts[SourceUtil.AUTHORITY];
final String query = parts[SourceUtil.QUERY];
String path = parts[SourceUtil.PATH];
String principal;
String namespace;
// parse the authority string for [usr][:pwd]@ns
int index = authority.indexOf('@');
if (index == -1) {
principal = "guest";
namespace = authority;
}
else {
principal = authority.substring(0,index);
namespace = authority.substring(index+1);
}
if (path == null || path.length() == 0) {
path = "/";
}
NamespaceAccessToken nat = m_repository.getNamespaceToken(namespace);
if (nat == null) {
throw new SourceException("No such namespace: " + namespace);
}
SourceParameters queryParameters = null;
if (query == null || query.length() == 0) {