// generated from map.qiml

package com.jxml.quick.examples.map2;
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("map.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="file:map.dtd";
		doc.setRoot(rootCE);

		QElementFactory var0=new QElementFactory();
		var0.tagName="goals";
		doc.setId("goals",var0);
		QClassWrapper var1=new QClassWrapper();
		var0.targetFactory=var1;
		var1.wClassName="com.jxml.quick.examples.map2.Goals";
		QCElementFactory var2=new QCElementFactory();
		doc.setId("genid_992252898392",var2);
		var2.access=new com.jxml.quick.access.QMALAccess();

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

		var3.addToFactory(var2);
		var2.addToFactory(var0);
		QCElementFactory var4=new QCElementFactory();
		doc.setId("genid_992252898394",var4);
		var4.optional=true;
		var4.repeating=true;
		QMapFieldAccess var5=new QMapFieldAccess();
		var4.access=var5;
		var5.field="map";

		QElementFactory var6=new QElementFactory();
		var6.tagName="posessions";
		doc.setId("posessions",var6);
		QClassWrapper var7=new QClassWrapper();
		var6.targetFactory=var7;
		var7.wClassName="com.jxml.quick.examples.map2.Posessions";
		QCElementFactory var8=new QCElementFactory();
		doc.setId("genid_992252898395",var8);
		var8.access=new com.jxml.quick.access.QMALAccess();

		QElementFactory var9=new QElementFactory();
		var9.tagName="_attributes";
		doc.setId("genid_992252898396",var9);
		var9.targetFactory=new com.jxml.quick.tf.QMALTF();
		QCElementFactory var10=new QCElementFactory();
		doc.setId("genid_992252898397",var10);
		var10.optional=true;
		QFieldAccess var11=new QFieldAccess();
		var10.access=var11;
		var11.field="key";

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

		var12.addToFactory(var10);
		var10.addToFactory(var9);

		var9.addToFactory(var8);
		var8.addToFactory(var6);
		QCElementFactory var13=new QCElementFactory();
		doc.setId("genid_992252898398",var13);
		var13.optional=true;
		var13.repeating=true;
		QListFieldAccess var14=new QListFieldAccess();
		var13.access=var14;
		var14.field="what";

		QElementFactory var15=new QElementFactory();
		var15.tagName="item";
		doc.setId("item",var15);
		var15.targetFactory=new QPropertyEditor("java.lang.String","sun.beans.editors.StringEditor");
		QCElementFactory var16=new QCElementFactory();
		doc.setId("genid_992252898399",var16);
		var16.access=new com.jxml.quick.access.QMALAccess();

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

		var17.addToFactory(var16);
		var16.addToFactory(var15);

		var15.addToFactory(var13);
		var13.addToFactory(var6);

		var6.addToFactory(var4);
		var4.addToFactory(var0);

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