1 package net.sourceforge.formview.validator; 2 3 import java.io.IOException ; 4 import java.io.InputStream ; 5 import java.util.Collection ; 6 import java.util.Iterator ; 7 import java.util.List ; 8 9 import org.apache.commons.validator.FormSet; 10 import org.apache.commons.validator.ValidatorResources; 11 import org.xml.sax.SAXException ; 12 13 19 public class ExtendedValidatorResources extends ValidatorResources{ 20 21 private static final long serialVersionUID = 1L; 22 23 public ExtendedValidatorResources(InputStream in) 24 throws IOException , SAXException { 25 super(in); 26 } 27 28 public ExtendedValidatorResources(InputStream [] in) 29 throws IOException , SAXException { 30 super(in); 31 } 32 33 public FormSet getFormSet() { 34 if (hFormSets != null) { 35 Collection formSetList = hFormSets.values(); 36 if (formSetList != null) { 37 for (Iterator iter = formSetList.iterator(); iter.hasNext();) { 38 List formsets = (List ) iter.next(); 39 return (FormSet)formsets.get(0); 40 } 41 } 42 } 43 return null; 44 } 45 } 46 | Popular Tags |