}
@Override
public DocumentView getDocumentViewFromUrl(String url) {
Pattern pattern = Pattern.compile(getPrefix() + ID_URL_PATTERN);
DocumentViewCodec codec = null;
Matcher m = pattern.matcher(url);
if (m.matches()) {
codec = new DocumentIdCodec();
} else {
pattern = Pattern.compile(getPrefix() + PATH_URL_PATTERN);
m = pattern.matcher(url);
if (m.matches()) {
codec = new DocumentPathCodec();
}
}
if (codec != null) {
codec.setPrefix(getPrefix());
DocumentView docView = codec.getDocumentViewFromUrl(url);
updateDocumentView(docView);
return docView;
}
return null;
}