// generated from test.qiml

package com.jxml.quick.examples.href2;
import com.jxml.quick.*;
import com.jxml.quick.engine.*;
import com.jxml.quick.recycle.*;
import com.jxml.quick.access.*;
import com.jxml.quick.tf.*;
import org.xml.sax.*;

public class CreateTest extends QSchemaFactory
{
	protected static QDoc schema=null;

	public static QDoc createSchema()
		throws SAXException, QE, QPE, ClassNotFoundException, InstantiationException, IllegalAccessException
	{
		if (schema!=null)
			return schema;
		return (new CreateTest()).create();
	}

	public QDoc create()
		throws SAXException, QE, QPE, ClassNotFoundException, InstantiationException, IllegalAccessException
	{
		if (schema!=null)
			return schema;
		QSoftDocHash sdh=Quick.schemaHash;
		QDoc rv=sdh.get("test.qiml");
		if (rv!=null)
		{
			schema=rv;
			return schema;
		}
		synchronized(this.getClass())
		{
			if (schema!=null)
				return schema;
			rv=build();
			schema=sdh.add(rv);
			if (schema!=rv)
				return schema;
			QRefHash.add(schema);
			return schema;
		}
	}

	protected QDoc build()
		throws SAXException, QE, QPE, ClassNotFoundException, InstantiationException, IllegalAccessException
	{
		QDocImpl doc=new QDocImpl();
		QCElementFactory rootCE=new QIML();
		doc.setRoot(rootCE);

		QElementFactory var0=new QElementFactory();
		var0.tagName="test";
		doc.setId("test",var0);
		QClassWrapper var1=new QClassWrapper();
		var0.targetFactory=var1;
		var1.wClassName="java.util.ArrayList";
		QCElementFactory var2=new QCElementFactory();
		doc.setId("genid_991889116445",var2);
		var2.access=new com.jxml.quick.access.QMALAccess();

		QElementFactory var3=new QElementFactory();
		var3.tagName="_attributes";
		doc.setId("genid_991889116446",var3);
		var3.targetFactory=new com.jxml.quick.tf.QMALTF();
		QCElementFactory var4=new QCElementFactory();
		doc.setId("genid_991889116447",var4);
		var4.optional=true;
		var4.access=new com.jxml.quick.engine.QIdAccess();

		QElementFactory var5=new QElementFactory();
		var5.tagName="ID";
		doc.setId("test.att.ID",var5);
		var5.targetFactory=new QPropertyEditor("java.lang.String","sun.beans.editors.StringEditor");

		var5.addToFactory(var4);
		var4.addToFactory(var3);

		var3.addToFactory(var2);
		var2.addToFactory(var0);
		QCMSelFactory var6=new QCMSelFactory();
		doc.setId("genid_991889116448",var6);
		var6.optional=true;
		var6.repeating=true;
		var6.access=new com.jxml.quick.access.QListAccess();
		QCElementFactory var7=new QCElementFactory();
		doc.setId("genid_991889116449",var7);
		QElementFactory var8=var0;
		var8.addToFactory(var7);
		var7.addToFactory(var6);
		QCElementFactory var9=new QCElementFactory();
		doc.setId("genid_991889116450",var9);

		QElementFactory var10=new QElementFactory();
		var10.tagName="link";
		doc.setId("link",var10);
		var10.targetFactory=new com.jxml.quick.engine.QHRefTF();
		QCElementFactory var11=new QCElementFactory();
		doc.setId("genid_991889116451",var11);
		var11.access=new com.jxml.quick.access.QMALAccess();

		QElementFactory var12=new QElementFactory();
		var12.tagName="_attributes";
		doc.setId("genid_991889116452",var12);
		var12.targetFactory=new com.jxml.quick.tf.QMALTF();
		QCElementFactory var13=new QCElementFactory();
		doc.setId("genid_991889116453",var13);
		var13.defaultValue="java.util.ArrayList";
		var13.fixed=true;
		var13.optional=true;
		QFieldAccess var14=new QFieldAccess();
		var13.access=var14;
		var14.field="expects";

		QElementFactory var15=new QElementFactory();
		var15.tagName="expects";
		doc.setId("link.expects",var15);
		var15.targetFactory=new QPropertyEditor("java.lang.String","sun.beans.editors.StringEditor");

		var15.addToFactory(var13);
		var13.addToFactory(var12);
		QCElementFactory var16=new QCElementFactory();
		doc.setId("genid_991889116454",var16);
		QFieldAccess var17=new QFieldAccess();
		var16.access=var17;
		var17.field="href";

		QElementFactory var18=new QElementFactory();
		var18.tagName="href";
		doc.setId("link.href",var18);
		var18.targetFactory=new QPropertyEditor("java.lang.String","sun.beans.editors.StringEditor");

		var18.addToFactory(var16);
		var16.addToFactory(var12);
		QCElementFactory var19=new QCElementFactory();
		doc.setId("genid_991889116455",var19);
		var19.defaultValue="test.qiml";
		var19.fixed=true;
		var19.optional=true;
		QFieldAccess var20=new QFieldAccess();
		var19.access=var20;
		var20.field="schema";

		QElementFactory var21=new QElementFactory();
		var21.tagName="schema";
		doc.setId("link.schema",var21);
		var21.targetFactory=new QPropertyEditor("java.lang.String","sun.beans.editors.StringEditor");

		var21.addToFactory(var19);
		var19.addToFactory(var12);
		QCElementFactory var22=new QCElementFactory();
		doc.setId("genid_991889116456",var22);
		var22.defaultValue="com.jxml.quick.examples.href2.CreateTest";
		var22.fixed=true;
		var22.optional=true;
		QFieldAccess var23=new QFieldAccess();
		var22.access=var23;
		var23.field="schemaClass";

		QElementFactory var24=new QElementFactory();
		var24.tagName="schemaClass";
		doc.setId("link.schemaClass",var24);
		var24.targetFactory=new QPropertyEditor("java.lang.String","sun.beans.editors.StringEditor");

		var24.addToFactory(var22);
		var22.addToFactory(var12);

		var12.addToFactory(var11);
		var11.addToFactory(var10);

		var10.addToFactory(var9);
		var9.addToFactory(var6);
		var6.addToFactory(var0);

		var0.addToFactory(rootCE);
		doc.setSchema(Quick.QIMLSchema());
		doc.setKey("test.qiml");
		doc.pool=new QContextPool(doc);
		return doc;
	}
}
