removing obsolete validator class

This commit is contained in:
bjl23 2011-01-14 22:00:37 +00:00
parent d7209cf2d8
commit 1e2070299d

View file

@ -1,37 +0,0 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.vitro.webapp.edit.validator.impl;
import edu.cornell.mannlib.vedit.validator.ValidationObject;
import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory;
public class URIValidator {
private WebappDaoFactory wadf = null;
public URIValidator(WebappDaoFactory wadf) {
this.wadf = wadf;
}
public ValidationObject validate (Object obj) throws IllegalArgumentException {
ValidationObject vo = new ValidationObject();
if (obj != null && obj instanceof String) {
String errMsg = wadf.checkURI((String)obj);
if (errMsg != null) {
vo.setValid(false);
vo.setMessage(errMsg);
} else {
vo.setValid(true);
}
} else {
vo.setValid(false);
vo.setMessage("Please enter a URI");
}
vo.setValidatedObject(obj);
return vo;
}
}