class ProjectWhiteListSupport {

	public boolean isWhitelisted(String uriAsString, Collection<URI> whitelist) {
		URI uri;
		try {
			uri = new URI(uriAsString);
		} catch (URISyntaxException e) {
			throw new NotAcceptableException("Not a valid uri:"+uriAsString);
		}
		for (URI accepted: whitelist) {
			if (isContained(uri, accepted)) {
				return true;
			}
		}
		
		return false;
	}

}