List of usage examples for org.apache.commons.httpclient URI hasQuery
public boolean hasQuery()
From source file:org.opens.tanaguru.ruleimplementation.link.AbstractDownloadableLinkRuleImplementation.java
/** * // w ww . j a v a 2 s . c o m * @param uri * @return whether the current link has a proper extension (link.html) * @throws URIException */ private boolean isLinkWithProperExtension(URI uri) throws URIException { if (uri.hasQuery()) { return false; } String path = uri.getPath(); if (StringUtils.isBlank(path) || StringUtils.equals(path, SLASH_CHAR)) { return false; } int lastSlash = StringUtils.lastIndexOf(path, SLASH_CHAR); if (StringUtils.substring(path, lastSlash).contains(POINT_CHAR)) { return true; } return false; }