// generated from QuickTest.qiml
package com.jxml.quick.examples.content;
import com.jxml.quick.*;
import com.jxml.quick.engine.*;
import com.jxml.quick.recycle.*;
import com.jxml.quick.access.*;
import com.jxml.quick.qmap.*;
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("QuickTest.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();
		QIML rootCE=new QIML();
		
		rootCE.SYSTEM="classpath:///com/jxml/quick/examples/content/QuickTest.dtd";
		doc.setRoot(rootCE);
		QElementFactory var0=new QElementFactory();
		doc.setId("test",var0);
		var0.tagName="test";
		QClassWrapper var1=new QClassWrapper();
		var0.targetFactory=var1;
		var1.wClassName="com.jxml.quick.examples.content.test";
		QCElementFactory var2=new QCElementFactory();
		doc.setId("genid_999833678233",var2);
		var2.access=new com.jxml.quick.access.QMALAccess();
		QElementFactory var3=new QElementFactory();
		doc.setId("genid_999833678234",var3);
		var3.tagName="_attributes";
		var3.targetFactory=new com.jxml.quick.tf.QMALTF();
		var3.addToFactory(var2);
		var2.addToFactory(var0);
		QCElementFactory var4=new QCElementFactory();
		doc.setId("genid_999833678235",var4);
		var4.repeating=true;
		QListFieldAccess var5=new QListFieldAccess();
		var4.access=var5;
		var5.field="repNonOptional";
		QElementFactory var6=new QElementFactory();
		doc.setId("repNonOptional",var6);
		var6.tagName="repNonOptional";
		QDataClass var7=new QDataClass();
		var6.targetFactory=var7;
		var7.wClassName="com.jxml.quick.examples.content.BzGenericString";
		QCElementFactory var8=new QCElementFactory();
		doc.setId("genid_999833678236",var8);
		var8.access=new com.jxml.quick.access.QMALAccess();
		QElementFactory var9=new QElementFactory();
		doc.setId("genid_999833678237",var9);
		var9.tagName="_attributes";
		var9.targetFactory=new com.jxml.quick.tf.QMALTF();
		var9.addToFactory(var8);
		var8.addToFactory(var6);
		var6.addToFactory(var4);
		var4.addToFactory(var0);
		QCElementFactory var10=new QCElementFactory();
		doc.setId("genid_999833678238",var10);
		QFieldAccess var11=new QFieldAccess();
		var10.access=var11;
		var11.field="required";
		QElementFactory var12=new QElementFactory();
		doc.setId("required",var12);
		var12.tagName="required";
		QDataClass var13=new QDataClass();
		var12.targetFactory=var13;
		var13.wClassName="com.jxml.quick.examples.content.BzGenericString";
		QCElementFactory var14=new QCElementFactory();
		doc.setId("genid_999833678239",var14);
		var14.access=new com.jxml.quick.access.QMALAccess();
		QElementFactory var15=new QElementFactory();
		doc.setId("genid_999833678240",var15);
		var15.tagName="_attributes";
		var15.targetFactory=new com.jxml.quick.tf.QMALTF();
		var15.addToFactory(var14);
		var14.addToFactory(var12);
		var12.addToFactory(var10);
		var10.addToFactory(var0);

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

