1 25 package org.archive.crawler.deciderules; 26 27 import org.archive.crawler.datamodel.CandidateURI; 28 29 30 31 37 public class HasViaDecideRule extends PredicatedDecideRule { 38 39 private static final long serialVersionUID = 1670292311303097735L; 40 41 45 public HasViaDecideRule(String name) { 46 super(name); 47 setDescription("HasViaDecideRule. Applies configured decision " + 48 "to any URI that has a 'via'."); 49 } 50 51 58 protected boolean evaluate(Object object) { 59 try { 60 CandidateURI curi = (CandidateURI)object; 61 return curi.getVia() != null; 62 } catch (ClassCastException e) { 63 return false; 65 } 66 } 67 } 68 | Popular Tags |