// generated from timesheet.qiml

package com.jxml.quick.examples.timesheet;
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("timesheet.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="dummy";
		doc.setId("dummy",var0);
		QClassWrapper var1=new QClassWrapper();
		var0.targetFactory=var1;
		var1.wClassName="java.lang.Object";

		QElementFactory var2=new QElementFactory();
		var2.tagName="day";
		doc.setId("day",var2);
		QClassWrapper var3=new QClassWrapper();
		var2.targetFactory=var3;
		var3.wClassName="com.jxml.quick.examples.timesheet.Day";
		QCElementFactory var4=new QCElementFactory();
		doc.setId("genid_991898494580",var4);
		var4.access=new com.jxml.quick.access.QMALAccess();

		QElementFactory var5=new QElementFactory();
		var5.tagName="_attributes";
		doc.setId("genid_991898494581",var5);
		var5.targetFactory=new com.jxml.quick.tf.QMALTF();
		QCElementFactory var6=new QCElementFactory();
		doc.setId("genid_991898494582",var6);
		QFieldAccess var7=new QFieldAccess();
		var6.access=var7;
		var7.field="date";

		QElementFactory var8=new QElementFactory();
		var8.tagName="date";
		doc.setId("day.att.date",var8);
		var8.targetFactory=new QPropertyEditor("com.jxml.quick.examples.timesheet.Date","com.jxml.quick.examples.timesheet.YYYYMMDDEditor");

		var8.addToFactory(var6);
		var6.addToFactory(var5);

		var5.addToFactory(var4);
		var4.addToFactory(var2);
		QCElementFactory var9=new QCElementFactory();
		doc.setId("genid_991898494583",var9);
		var9.repeating=true;
		QListFieldAccess var10=new QListFieldAccess();
		var9.access=var10;
		var10.field="entries";

		QElementFactory var11=new QElementFactory();
		var11.tagName="entry";
		doc.setId("entry",var11);
		QClassWrapper var12=new QClassWrapper();
		var11.targetFactory=var12;
		var12.wClassName="com.jxml.quick.examples.timesheet.Entry";
		QCElementFactory var13=new QCElementFactory();
		doc.setId("genid_991898494584",var13);
		var13.access=new com.jxml.quick.access.QMALAccess();

		QElementFactory var14=new QElementFactory();
		var14.tagName="_attributes";
		doc.setId("genid_991898494585",var14);
		var14.targetFactory=new com.jxml.quick.tf.QMALTF();
		QCElementFactory var15=new QCElementFactory();
		doc.setId("genid_991898494586",var15);
		QFieldAccess var16=new QFieldAccess();
		var15.access=var16;
		var16.field="hours";

		QElementFactory var17=new QElementFactory();
		var17.tagName="hours";
		doc.setId("entry.att.hours",var17);
		var17.targetFactory=new QPropertyEditor("java.lang.Float","sun.beans.editors.FloatEditor");

		var17.addToFactory(var15);
		var15.addToFactory(var14);
		QCElementFactory var18=new QCElementFactory();
		doc.setId("genid_991898494587",var18);
		QFieldAccess var19=new QFieldAccess();
		var18.access=var19;
		var19.field="project";

		QElementFactory var20=new QElementFactory();
		var20.tagName="project";
		doc.setId("entry.att.project",var20);
		var20.targetFactory=new QPropertyEditor("java.lang.String","sun.beans.editors.StringEditor");

		var20.addToFactory(var18);
		var18.addToFactory(var14);

		var14.addToFactory(var13);
		var13.addToFactory(var11);

		var11.addToFactory(var9);
		var9.addToFactory(var2);

		var2.setSuperclass(var0);
		QElementFactory var21=var11;
		var21.setSuperclass(var0);

		QElementFactory var22=new QElementFactory();
		var22.tagName="timesheet";
		doc.setId("timesheet",var22);
		QClassWrapper var23=new QClassWrapper();
		var22.targetFactory=var23;
		var23.wClassName="com.jxml.quick.examples.timesheet.Timesheet";
		QCElementFactory var24=new QCElementFactory();
		doc.setId("genid_991898494588",var24);
		var24.access=new com.jxml.quick.access.QMALAccess();

		QElementFactory var25=new QElementFactory();
		var25.tagName="_attributes";
		doc.setId("genid_991898494589",var25);
		var25.targetFactory=new com.jxml.quick.tf.QMALTF();
		QCElementFactory var26=new QCElementFactory();
		doc.setId("genid_991898494590",var26);
		QFieldAccess var27=new QFieldAccess();
		var26.access=var27;
		var27.field="name";

		QElementFactory var28=new QElementFactory();
		var28.tagName="name";
		doc.setId("timesheet.att.name",var28);
		var28.targetFactory=new QPropertyEditor("java.lang.String","sun.beans.editors.StringEditor");

		var28.addToFactory(var26);
		var26.addToFactory(var25);

		var25.addToFactory(var24);
		var24.addToFactory(var22);
		QCElementFactory var29=new QCElementFactory();
		doc.setId("genid_991898494591",var29);
		var29.repeating=true;
		QListFieldAccess var30=new QListFieldAccess();
		var29.access=var30;
		var30.field="days";
		QElementFactory var31=var2;
		var31.addToFactory(var29);
		var29.addToFactory(var22);

		var22.setSuperclass(var0);
		QCElementFactory var32=new QCElementFactory();
		doc.setId("genid_991898494592",var32);
		var32.access=new com.jxml.quick.access.QMALAccess();

		QElementFactory var33=new QElementFactory();
		var33.tagName="_attributes";
		doc.setId("genid_991898494593",var33);
		var33.targetFactory=new com.jxml.quick.tf.QMALTF();

		var33.addToFactory(var32);
		var32.addToFactory(var0);

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