01: package net.xoetrope.builder.editor;
02:
03: import java.io.Reader;
04: import java.util.Enumeration;
05:
06: import net.xoetrope.xml.XmlElement;
07: import net.xoetrope.xui.validation.XValidationFactory;
08:
09: /**
10: * <p>Copyright: Copyright (c) Xoetrope Ltd., 1998-2003</p>
11: * $Revision: 1.3 $
12: */
13: public class XEditorValidationFactory extends XValidationFactory {
14: public XEditorValidationFactory(Reader reader) {
15: super (reader);
16: }
17:
18: public String[] getValidations() {
19: String[] sRet = new String[validations.size()];
20: Enumeration e = validations.keys();
21: int i = 0;
22: while (e.hasMoreElements()) {
23: sRet[i] = (String) e.nextElement();
24: i++;
25: }
26: return sRet;
27: }
28:
29: public XmlElement getValidation(String name) {
30: return (XmlElement) validations.get(name);
31: }
32:
33: }
|