FileDocCategorySizeDatePackage
Element.javaAPI DocGlassfish v2 API8010Fri May 04 22:35:00 BST 2007com.sun.enterprise.tools.common.validation.data

Element

public class Element extends org.netbeans.modules.schema2beans.BaseBean

Fields Summary
static Vector
comparators
public static final String
NAME
public static final String
CHECK
Constructors Summary
public Element()

	// NOI18N

	  
		this(Common.USE_DEFAULT_VALUES);
	
public Element(int options)

		super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
		// Properties (see root bean comments for the bean graph)
		this.createProperty("name", 	// NOI18N
			NAME, 
			Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY, 
			String.class);
		this.createProperty("check", 	// NOI18N
			CHECK, 
			Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 
			Check.class);
		this.initialize(options);
	
Methods Summary
public intaddCheck(com.sun.enterprise.tools.common.validation.data.Check value)

		return this.addValue(CHECK, value);
	
public static voidaddComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.add(c);
	
public voiddump(java.lang.StringBuffer str, java.lang.String indent)

		String s;
		Object o;
		org.netbeans.modules.schema2beans.BaseBean n;
		str.append(indent);
		str.append("Name");	// NOI18N
		str.append(indent+"\t");	// NOI18N
		str.append("<");	// NOI18N
		s = this.getName();
		str.append((s==null?"null":s.trim()));	// NOI18N
		str.append(">\n");	// NOI18N
		this.dumpAttributes(NAME, 0, str, indent);

		str.append(indent);
		str.append("Check["+this.sizeCheck()+"]");	// NOI18N
		for(int i=0; i<this.sizeCheck(); i++)
		{
			str.append(indent+"\t");
			str.append("#"+i+":");
			n = (org.netbeans.modules.schema2beans.BaseBean) this.getCheck(i);
			if (n != null)
				n.dump(str, indent + "\t");	// NOI18N
			else
				str.append(indent+"\tnull");	// NOI18N
			this.dumpAttributes(CHECK, i, str, indent);
		}

	
public java.lang.StringdumpBeanNode()

		StringBuffer str = new StringBuffer();
		str.append("Element\n");	// NOI18N
		this.dump(str, "\n  ");	// NOI18N
		return str.toString();
	
public com.sun.enterprise.tools.common.validation.data.CheckgetCheck(int index)

		return (Check)this.getValue(CHECK, index);
	
public com.sun.enterprise.tools.common.validation.data.Check[]getCheck()

		return (Check[])this.getValues(CHECK);
	
public java.lang.StringgetName()

		return (String)this.getValue(NAME);
	
voidinitialize(int options)

	
	
public intremoveCheck(com.sun.enterprise.tools.common.validation.data.Check value)

		return this.removeValue(CHECK, value);
	
public static voidremoveComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.remove(c);
	
public voidsetCheck(int index, com.sun.enterprise.tools.common.validation.data.Check value)

		this.setValue(CHECK, index, value);
	
public voidsetCheck(com.sun.enterprise.tools.common.validation.data.Check[] value)

		this.setValue(CHECK, value);
	
public voidsetName(java.lang.String value)

		this.setValue(NAME, value);
	
public intsizeCheck()

		return this.size(CHECK);
	
public voidvalidate()

		boolean restrictionFailure = false;
		// Validating property name
		if (getName() == null) {
			throw new org.netbeans.modules.schema2beans.ValidateException("getName() == null", "name", this);	// NOI18N
		}
		// Validating property check
		for (int _index = 0; _index < sizeCheck(); ++_index) {
			com.sun.enterprise.tools.common.validation.data.Check element = getCheck(_index);
			if (element != null) {
				element.validate();
			}
		}