return getRequired(wbRequest, field, null);
}
private HostMatchFilter getExactHostFilter(WaybackRequest wbRequest) {
HostMatchFilter filter = null;
String exactHostFlag = wbRequest.get(
WaybackConstants.REQUEST_EXACT_HOST_ONLY);
if(exactHostFlag != null &&
exactHostFlag.equals(WaybackConstants.REQUEST_YES)) {
String searchUrl = wbRequest.get(WaybackConstants.REQUEST_URL);
try {
UURI searchURI = UURIFactory.getInstance(searchUrl);
String exactHost = searchURI.getHost();
filter = new HostMatchFilter(exactHost);
} catch (URIException e) {
// Really, this isn't gonna happen, we've already canonicalized
// it... should really optimize and do that just once.
e.printStackTrace();