Переглянути джерело

Initial Commit

Mirror of https://svn.code.sf.net/p/ieat/code/ieat/trunk/ as of
2018-09-06.
Thomas Flucke 7 роки тому
коміт
a57531282a
100 змінених файлів з 9161 додано та 0 видалено
  1. 11 0
      .tomcatplugin
  2. 8 0
      README
  3. 628 0
      build.xml
  4. BIN
      defs/design/recipe-type-chooser.psd
  5. 75 0
      defs/docs/demo/README.txt
  6. 269 0
      defs/docs/licenses/apache.txt
  7. 21 0
      defs/docs/licenses/gpl.txt
  8. 24 0
      defs/docs/licenses/ieat.txt
  9. 56 0
      defs/docs/licenses/ironsmith.txt
  10. 509 0
      defs/docs/licenses/lgpl.txt
  11. 6 0
      defs/docs/licenses/mpl.txt
  12. 179 0
      defs/docs/licenses/sun-jaf.txt
  13. 171 0
      defs/docs/licenses/sun-javamail.txt
  14. 33 0
      defs/docs/licenses/xdoclet.txt
  15. 42 0
      defs/docs/licenses/xmlunit.txt
  16. 246 0
      defs/docs/release/README.bin.txt
  17. 8 0
      defs/docs/release/README.src.txt
  18. 6 0
      defs/docs/release/notes/notes-1.1.4.txt
  19. 36 0
      defs/docs/release/notes/notes-1.2.txt
  20. 2 0
      defs/examples/build.properties
  21. 141 0
      defs/examples/env.properties
  22. 28 0
      defs/examples/log4j.properties
  23. 8 0
      defs/examples/test.properties
  24. 924 0
      defs/schema/binding.xml
  25. 202 0
      defs/schema/core.xsd
  26. 51 0
      defs/schema/hbm/magoffin/matt/ieat/domain/impl/BaseImpl.hbm.xml
  27. 51 0
      defs/schema/hbm/magoffin/matt/ieat/domain/impl/CourseImpl.hbm.xml
  28. 51 0
      defs/schema/hbm/magoffin/matt/ieat/domain/impl/DifficultyImpl.hbm.xml
  29. 51 0
      defs/schema/hbm/magoffin/matt/ieat/domain/impl/EthnicityImpl.hbm.xml
  30. 58 0
      defs/schema/hbm/magoffin/matt/ieat/domain/impl/IngredientImpl.hbm.xml
  31. 83 0
      defs/schema/hbm/magoffin/matt/ieat/domain/impl/MealImpl.hbm.xml
  32. 69 0
      defs/schema/hbm/magoffin/matt/ieat/domain/impl/MealRecipeImpl.hbm.xml
  33. 51 0
      defs/schema/hbm/magoffin/matt/ieat/domain/impl/PrepTimeImpl.hbm.xml
  34. 67 0
      defs/schema/hbm/magoffin/matt/ieat/domain/impl/RecipeCommentImpl.hbm.xml
  35. 296 0
      defs/schema/hbm/magoffin/matt/ieat/domain/impl/RecipeImpl.hbm.xml
  36. 97 0
      defs/schema/hbm/magoffin/matt/ieat/domain/impl/RecipeIngredientImpl.hbm.xml
  37. 67 0
      defs/schema/hbm/magoffin/matt/ieat/domain/impl/RecipeRatingImpl.hbm.xml
  38. 49 0
      defs/schema/hbm/magoffin/matt/ieat/domain/impl/RecipeStepImpl.hbm.xml
  39. 60 0
      defs/schema/hbm/magoffin/matt/ieat/domain/impl/RelatedRecipeImpl.hbm.xml
  40. 50 0
      defs/schema/hbm/magoffin/matt/ieat/domain/impl/RelationKindImpl.hbm.xml
  41. 50 0
      defs/schema/hbm/magoffin/matt/ieat/domain/impl/SystemImpl.hbm.xml
  42. 100 0
      defs/schema/hbm/magoffin/matt/ieat/domain/impl/UnitImpl.hbm.xml
  43. 125 0
      defs/schema/hbm/magoffin/matt/ieat/domain/impl/UserImpl.hbm.xml
  44. 1 0
      defs/schema/hibernate.db2.properties
  45. 10 0
      defs/schema/hibernate.mysql.properties
  46. 5 0
      defs/schema/hibernate.properties
  47. 186 0
      defs/schema/ui.xsd
  48. 79 0
      defs/sql/derby/create.sql
  49. 3 0
      defs/sql/derby/hibernate.properties
  50. 86 0
      defs/sql/derby/ieat.hbm.xml
  51. 48 0
      defs/sql/derby/load-ingredients.sql
  52. 137 0
      defs/sql/derby/load.sql
  53. 26 0
      defs/sql/derby/setup.sql
  54. 76 0
      defs/sql/mysql/create.sql
  55. 3 0
      defs/sql/mysql/hibernate.properties
  56. 88 0
      defs/sql/mysql/ieat.hbm.xml
  57. 35 0
      defs/sql/mysql/load-ingredients.sql
  58. 139 0
      defs/sql/mysql/load.sql
  59. 26 0
      defs/sql/mysql/setup.sql
  60. 80 0
      defs/sql/postgres/create.sql
  61. 8 0
      defs/sql/postgres/hibernate.properties
  62. 277 0
      defs/sql/postgres/load-ingredients.sql
  63. 148 0
      defs/sql/postgres/load.sql
  64. 26 0
      defs/sql/postgres/setup.sql
  65. 196 0
      defs/sql/postgres/upgrade-1.0-1.2.sql
  66. 3 0
      defs/version.txt
  67. BIN
      demo/db.zip
  68. 201 0
      demo/jakarta-tomcat/LICENSE
  69. 13 0
      demo/jakarta-tomcat/NOTICE
  70. 248 0
      demo/jakarta-tomcat/RELEASE-NOTES
  71. 144 0
      demo/jakarta-tomcat/RUNNING.txt
  72. BIN
      demo/jakarta-tomcat/bin/LauncherBootstrap.class
  73. BIN
      demo/jakarta-tomcat/bin/bootstrap.jar
  74. 192 0
      demo/jakarta-tomcat/bin/catalina.50.bat
  75. 287 0
      demo/jakarta-tomcat/bin/catalina.50.sh
  76. 192 0
      demo/jakarta-tomcat/bin/catalina.bat
  77. 287 0
      demo/jakarta-tomcat/bin/catalina.sh
  78. 234 0
      demo/jakarta-tomcat/bin/catalina.xml
  79. BIN
      demo/jakarta-tomcat/bin/commons-daemon.jar
  80. BIN
      demo/jakarta-tomcat/bin/commons-launcher.jar
  81. BIN
      demo/jakarta-tomcat/bin/commons-logging-api.jar
  82. 19 0
      demo/jakarta-tomcat/bin/cpappend.bat
  83. 41 0
      demo/jakarta-tomcat/bin/digest.bat
  84. 31 0
      demo/jakarta-tomcat/bin/digest.sh
  85. BIN
      demo/jakarta-tomcat/bin/jmx.jar
  86. BIN
      demo/jakarta-tomcat/bin/jsvc.tar.gz
  87. 23 0
      demo/jakarta-tomcat/bin/launcher.properties
  88. 99 0
      demo/jakarta-tomcat/bin/service.bat
  89. 57 0
      demo/jakarta-tomcat/bin/setclasspath.bat
  90. 61 0
      demo/jakarta-tomcat/bin/setclasspath.sh
  91. 40 0
      demo/jakarta-tomcat/bin/shutdown-using-launcher.bat
  92. 29 0
      demo/jakarta-tomcat/bin/shutdown-using-launcher.sh
  93. 44 0
      demo/jakarta-tomcat/bin/shutdown.bat
  94. 31 0
      demo/jakarta-tomcat/bin/shutdown.sh
  95. 39 0
      demo/jakarta-tomcat/bin/startup-using-launcher.bat
  96. 29 0
      demo/jakarta-tomcat/bin/startup-using-launcher.sh
  97. 44 0
      demo/jakarta-tomcat/bin/startup.bat
  98. 31 0
      demo/jakarta-tomcat/bin/startup.sh
  99. BIN
      demo/jakarta-tomcat/bin/tomcat5.exe
  100. BIN
      demo/jakarta-tomcat/bin/tomcat5w.exe

+ 11 - 0
.tomcatplugin

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tomcatProjectProperties>
+    <rootDir>/web</rootDir>
+    <exportSource>false</exportSource>
+    <reloadable>false</reloadable>
+    <redirectLogger>true</redirectLogger>
+    <updateXml>false</updateXml>
+    <warLocation></warLocation>
+    <extraInfo></extraInfo>
+    <webPath>/ieat</webPath>
+</tomcatProjectProperties>

+ 8 - 0
README

@@ -0,0 +1,8 @@
+=======================================================================
+                 iEat - Internet recipe database
+                 Version 1.1.17 05/19/2009 03:34 PM NZST
+=======================================================================
+
+This is the source distribution of iEat.
+
+This README needs to be written :)

+ 628 - 0
build.xml

@@ -0,0 +1,628 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project basedir="." default="help">
+
+	<property file="build.properties" />
+
+	<property name="dir.base" value="."/>
+	<property name="dir.source" value="src"/>
+	<property name="dir.schema" value="defs/schema"/>
+	<property name="dir.build" value="build/ant" />
+	<property name="dir.build.cvs" value="build/cvs"/>
+	<property name="hibernate.properties" value="${dir.schema}/hibernate.properties"/>
+	<property name="dir.generated" value="${dir.build}/generated/src" />
+	<property name="dir.compile.dest.domain" value="${dir.build}/generated/classes"/>
+	<property name="dir.hibernate.mapping" value="defs/schema/hbm"/>
+	<property name="dir.database" value="defs/sql"/>
+	<property name="dir.dist" value="dist"/>
+	<property name="dir.lib" value="lib"/>
+	<property name="dir.web" value="web"/>
+	<property name="dir.web.lib" value="${dir.web}/WEB-INF/lib"/>
+	
+	<property name="compile.debug" value="true" />
+	<property name="compile.deprecation" value="false" />
+	<property name="compile.optimize" value="true" />
+	<property name="compile.nowarn" value="true" />
+	
+	<property name="build.version" value="1.1.17"/>
+
+	<property name="app.name" value="ieat" />
+	<property name="app.path" value="/${app.name}" />
+	<property name="app.home" value="/data/projects/ieat/web"/>
+	<property name="app.home.backup" value="${app.home}.bak"/>
+	
+	<property name="env.src" value="example" />
+	<property name="dir.env" value="environment"/>
+	<property name="dir.env.src" value="${dir.env}/${env.src}"/>
+	<property name="dir.env.src.defaults" value="${dir.env}/example"/>
+
+	<property name="cvs.root" value="/data/cvs"/>
+	<property name="cvs.compressionlevel" value="6" />
+	<property name="cvs.module.name" value="ieatdb"/>
+	
+	<path id="path.svn">
+		<fileset dir="${dir.lib}/svn" includes="*.jar"/>
+	</path>
+	
+	<taskdef resource="svntask.properties" classpathref="path.svn"/>
+	<property name="svn.tag" value="1.0"/>
+	<property name="svn.path" value="/tags/${svn.tag}"/>
+	<property name="svn.url" 
+		value="https://ieat.svn.sourceforge.net/svnroot/ieat/ieat${svn.path}"/>
+	<property name="svn.username" value=""/>
+	<property name="svn.password" value=""/>
+	<property name="svn.revision" value="HEAD"/>
+	<property name="svn.dir.build" value="${dir.build}/svn"/>
+	<property name="svn.env.src" value="example"/>
+	
+	<tstamp>
+		<format property="build.time" pattern="MM/dd/yyyy hh:mm aa z" />
+	</tstamp>
+	<property name="version.properties" value="version.properties" />
+	<property name="version.txt.name" value="version.txt" />
+		
+	<!-- HyperJAXB 2 properties -->
+	<property name="hjb.dir" value="hyperjaxb2-build"/>
+	<property name="hjb.db.type" value="postgres"/>
+	
+	<path id="jaxb.lib.path">
+		<fileset dir="${dir.web.lib}" includes="*.jar"/>
+		<fileset dir="${dir.lib}" includes="**/*.jar"/>
+	</path>
+  
+	<path id="hibernatedoclet.lib.path">
+		<fileset dir="${dir.web.lib}" includes="*.jar"/>
+		<fileset dir="${dir.lib}" includes="**/*.jar"/>
+	</path>
+	
+	<path id="schemaexport.lib.path">
+		<path refid="compile.path"/>
+	</path>
+	
+	<path id="schemaexport.path">
+		<path refid="compile.path"/>
+	</path>
+	
+	<path id="compile.path">
+		<pathelement location="${dir.build}/${app.name}/WEB-INF/classes"/>
+		<fileset dir="${dir.web.lib}" includes="*.jar"/>
+		<fileset dir="${dir.lib}" includes="**/*.jar"/>
+	</path>
+	
+	<target name="init">
+		<mkdir dir="${dir.build}" />
+		<mkdir dir="${dir.dist}" />
+		<mkdir dir="${dir.generated}" />
+	</target>
+
+	<target name="check-has-env">
+		<available file="${dir.env}" type="dir" property="has.env" />
+	</target>
+	
+	<target name="compile.domain" description="Compile the JAXB classes">
+		<delete dir="${dir.compile.dest.domain}" failonerror="no"/>
+		<mkdir dir="${dir.compile.dest.domain}"/>
+		<javac srcdir="${dir.generated}"
+				destdir="${dir.compile.dest.domain}"
+				debug="${compile.debug}" 
+				deprecation="${compile.deprecation}" 
+				optimize="${compile.optimize}" 
+				nowarn="${compile.nowarn}"
+				target="1.5"
+				source="1.5"
+				fork="true"
+				memoryinitialsize="256m"
+				memorymaximumsize="400m"
+				>
+			<classpath refid="compile.path" />
+		</javac>
+	</target>
+	
+	<!-- HyperJAXB2 targets -->
+	
+	<target name="generate.domain" depends="init" 
+			description="Generate JAXB domain objects from XML schemas">
+		<delete failonerror="no">
+			<fileset dir="${hjb.dir}/src/main/resources">
+				<include name="*.xjb"/>
+				<include name="*.xsd"/>
+			</fileset>
+		</delete>
+		<copy todir="${hjb.dir}/src/main/resources">
+			<fileset dir="defs/schema">
+				<include name="core.xsd"/>
+				<include name="ui.xsd"/>
+			</fileset>
+		</copy>
+		<copy todir="${hjb.dir}/src/main/resources">
+			<fileset dir="defs/schema">
+				<include name="binding.xml"/>
+			</fileset>
+			<mapper type="glob" from="*.xml" to="*.xjb"/>
+		</copy>
+		<delete>
+			<fileset dir="${hjb.dir}/src/main/java">
+				<include name="**"/>
+			</fileset>
+		</delete>
+		<delete failonerror="no">
+			<fileset dir="${hjb.dir}/target/generated-sources/xjc">
+				<include name="magoffin/matt/ieat/domain/**"/>
+			</fileset>
+		</delete>
+		
+		<javac srcdir="${hjb.dir}/src/main/java"
+				destdir="${hjb.dir}/src/main/java"
+				debug="${compile.debug}" 
+				deprecation="${compile.deprecation}" 
+				optimize="${compile.optimize}" 
+				nowarn="${compile.nowarn}"
+				target="1.5"
+				source="1.5">
+			<!--classpath refid="unit-test.path" /-->
+		</javac>				
+		<ant antfile="build.xml" inheritall="false" target="generate-sources" dir="${hjb.dir}">
+			<property name="hyperjaxb2.export.schema.properties.file" 
+				value="${basedir}/${dir.database}/${hjb.db.type}/hibernate.properties"/>
+		</ant>
+		<delete>
+			<fileset dir="${dir.generated}">
+				<include name="magoffin/matt/ieat/domain/*.*"/>
+				<include name="magoffin/matt/ieat/domain/impl/**"/>
+			</fileset>
+		</delete>
+		<copy todir="${dir.generated}">
+			<fileset dir="${hjb.dir}/target/generated-sources/xjc">
+				<include name="magoffin/matt/ieat/domain/**"/>
+			</fileset>
+		</copy>
+		<!-- TODO copy tofile="${dir.database}/create-tables.${hjb.db.type}.sql"
+			file="${hjb.dir}/sql/schema.sql"/-->
+	</target>
+	
+	<!--
+		Generate database DDL for entity tables. Pass the hjb.db.type parameter
+		to change the exported DDL SQL syntax using one of the sub-directory names
+		within defs/sql, e.g.
+		
+		ant -Dhjb.db.type=mysql export.database.schema
+		
+		Will use the defs/sql/mysql/hibernate.properties environment properties
+		and generate the defs/sql/mysql/create.sql DDL script.
+	-->
+	<target name="export.database.schema" depends="compile" 
+		description="Generate RDBMS creation scripts via Hibernate">
+
+		<taskdef name="schemaexport"
+			classname="org.hibernate.tool.hbm2ddl.SchemaExportTask"
+			classpathref="schemaexport.path"/>
+
+		<mkdir dir="${dir.database}"/>
+		
+		<delete dir="${dir.build}/schema-export" failonerror="no"/>
+		<mkdir dir="${dir.build}/schema-export"/>
+		<unjar src="${dir.web.lib}/${app.name}-xml.jar" 
+			dest="${dir.build}/schema-export"/>
+
+		<schemaexport
+			properties="${dir.database}/${hjb.db.type}/hibernate.properties"
+			quiet="no"
+			text="yes"
+			drop="no"
+			delimiter=";"
+			output="${dir.database}/${hjb.db.type}/create.sql">
+			<fileset dir="${dir.build}/schema-export">
+				<include name="**/*.hbm.xml"/>
+			</fileset>
+		</schemaexport>
+
+	</target>
+
+	<target name="jar.domain" description="Create source and binary JAR out of the JAXB classes">
+		<!-- Generate the binary JAR with source attached -->
+		<jar destfile="${dir.web.lib}/${app.name}-xml.jar">
+			<fileset dir="${dir.compile.dest.domain}">
+				<include name="magoffin/matt/ieat/domain/**"/>
+			</fileset>
+			<fileset dir="${dir.generated}">
+				<include name="magoffin/matt/ieat/domain/**"/>
+			</fileset>
+		</jar>
+	</target>
+	
+	<target name="generate-xml" description="Generate new JAXB jar from scratch"
+		depends="generate.domain,compile.domain,jar.domain"/>
+
+	<target name="prepare-war">
+
+		<!-- Create build directories as needed -->
+		<mkdir dir="${dir.build}/${app.name}" />
+
+		<!-- Copy static content of this web application -->
+		<copy todir="${dir.build}/${app.name}">
+			<fileset dir="${dir.base}/${dir.web}">
+				<exclude name="WEB-INF/web.xml"/>
+				<exclude name="WEB-INF/classes/**"/>
+			</fileset>
+		</copy>
+
+		<!-- Copy environment properties -->
+		<copy todir="${dir.build}/${app.name}/WEB-INF/classes">
+			<fileset dir="${dir.base}/environment/${env.src}"
+				excludes="README.txt"/>
+		</copy>
+		
+		<!-- Copy class resources -->
+		<copy todir="${dir.build}/${app.name}/WEB-INF/classes">
+			<fileset dir="${dir.source}" excludes="**/*.java"/>
+		</copy>
+		
+	</target>
+
+	<target name="compile" description="Compile source files">
+		<mkdir dir="${dir.build}/${app.name}/WEB-INF/classes"/>
+		<javac srcdir="${dir.source}"
+				destdir="${dir.build}/${app.name}/WEB-INF/classes"
+				debug="${compile.debug}" 
+				deprecation="${compile.deprecation}" 
+				optimize="${compile.optimize}" 
+				nowarn="${compile.nowarn}"
+				target="1.5"
+				source="1.5">
+			<classpath refid="compile.path" />
+		</javac>
+	</target>
+	
+	<target name="war" depends="prepare-war,compile" description="Create application WAR">
+		<mkdir dir="${dir.build}"/>
+		<war warfile="${dir.build}/${app.name}.war" 
+			basedir="${dir.build}/${app.name}" 
+			webxml="${dir.base}/${dir.web}/WEB-INF/web.xml" />
+	</target>
+  
+	<target name="clean" description="Delete build files">
+		<delete dir="${dir.generated}" />
+		<delete dir="${dir.build}" />
+	</target>
+	
+	<target name="help" description="Display build help">
+		<echo>iEat v${build.version}</echo>
+	</target>
+
+	<target name="demo" description="Create the Live Demo">
+		
+		<antcall target="prepare-war" inheritall="true">
+			<param name="env.src" value="demo"/>
+		</antcall>
+		
+		<antcall target="compile" inheritall="true"/>
+		
+		<mkdir dir="${dir.build}/${app.name}-demo"/>
+		<copy todir="${dir.build}/${app.name}-demo">
+			<fileset dir="${dir.base}/demo">
+				<include name="jakarta-tomcat/**"/>
+				<include name="*.sh"/>
+				<include name="*.bat"/>
+			</fileset>
+		</copy>
+		
+		<!-- Expand database zip -->
+		<unzip dest="${dir.build}/${app.name}-demo" src="${dir.base}/demo/db.zip"/>
+		
+		<!-- fix file permissions -->
+		<chmod perm="755">
+			<fileset dir="${dir.build}/${app.name}-demo">
+				<include name="**/*.sh"/>
+			</fileset>
+		</chmod>
+		
+		<!-- create required empty directories -->
+		<mkdir dir="${dir.build}/${app.name}-demo/jakarta-tomcat/logs"/>
+		<mkdir dir="${dir.build}/${app.name}-demo/jakarta-tomcat/work"/>
+		<mkdir dir="${dir.build}/${app.name}-demo/jakarta-tomcat/temp"/>
+		
+		<!-- copy Xalan to endorsed dir-->
+		<mkdir dir="${dir.build}/${app.name}-demo/jakarta-tomcat/common/endorsed"/>
+		<copy todir="${dir.build}/${app.name}-demo/jakarta-tomcat/common/endorsed">
+			<fileset dir="${dir.base}/lib/xalan" includes="*.jar"/>
+		</copy>
+		
+		<!-- add JavaMail, Derby, etc JARs -->
+		<copy todir="${dir.build}/${app.name}-demo/jakarta-tomcat/common/lib">
+			<fileset dir="${dir.base}/lib/javamail" includes="*.jar"/>
+			<fileset dir="${dir.base}/lib/derby" includes="*.jar"/>
+		</copy>
+		
+		<!-- copy app webapp -->
+		<copy todir="${dir.build}/${app.name}-demo/jakarta-tomcat/webapps">
+			<fileset dir="${dir.build}" includes="${app.name}/**"
+				excludes="${app.name}/WEB-INF/classes/ieat.hbm.xml"/>
+		</copy>
+		<copy todir="${dir.build}/${app.name}-demo/jakarta-tomcat/webapps/${app.name}/WEB-INF">
+			<fileset dir="${dir.base}/${dir.web}/WEB-INF" includes="web.xml"/>
+		</copy>
+		<copy todir="${dir.build}/${app.name}-demo/jakarta-tomcat/webapps/${app.name}/WEB-INF/classes">
+			<fileset dir="${dir.base}/defs/sql/derby" includes="ieat.hbm.xml"/>
+		</copy>
+		
+		<!-- copy readme -->
+		<copy filtering="true" todir="${dir.build}/${app.name}-demo">
+			<fileset dir="${dir.base}/defs/docs/demo"
+				includes="README*.txt"/>
+			<mapper type="glob" from="*.txt" to="*"/>
+			<filterset>
+				<filter token="VERSION" value="${svn.tag}" />
+				<filter token="BUILD_DATE" value="${build.time}" />
+			</filterset>
+		</copy>
+		
+	</target>	
+
+	<!-- 
+		Subversion build targets 
+		
+		Build from SVN by first checking out the code using svn-checkout. Pass the tag
+		to build with -Dsvn.tag=X, e.g.
+		
+		ant -Dsvn.tag=1.2 svn-checkout
+		
+		It helps to define the svn.dir.build environment property to a directory OUTSIDE
+		the dir.build directory, so the checked-out sources are not deleted after every
+		build. Then you can switch to a new release using the svn-switch task, e.g.
+		
+		ant -Dsvn.tag=1.3 svn-switch
+		
+		To perform a release, do
+		
+		ant -Dsvn.tag=X (svn-checkout or svn-switch) svn-src-release svn-bin-release svn-demo-release
+		
+	-->
+
+	<target name="svn-checkout" description="Checkout sources from SVN">
+		<delete dir="${svn.dir.build}"/>
+		<mkdir dir="${svn.dir.build}"/>
+		<svn username="${svn.username}" password="${svn.password}">
+			<checkout url="${svn.url}" destPath="${svn.dir.build}"
+				revision="${svn.revision}"/>
+		</svn>
+	</target>
+	
+	<target name="svn-update" description="Update sources previously checked out from SVN">
+		<svn username="${svn.username}" password="${svn.password}">
+			<update dir="${svn.dir.build}" revision="${svn.revision}"/>
+		</svn>
+	</target>
+	
+	<target name="svn-switch" 
+		description="Switch sources previously checked out from SVN to another branch">
+		<svn username="${svn.username}" password="${svn.password}">
+			<switch path="${svn.dir.build}" url="${svn.url}" revision="${svn.revision}"/>
+		</svn>
+	</target>
+	
+	<!-- Copy environment properties (to catch local env) -->
+	<target name="svn-prepare">
+		<mkdir dir="${svn.dir.build}/${dir.env.src}"/>
+		<copy todir="${svn.dir.build}/${dir.env.src}">
+			<fileset dir="${dir.base}/${dir.env.src}" includes="**" excludes="README*"/>
+		</copy>
+	</target>
+
+	<target name="svn-build" depends="clean,svn-prepare" description="Build from SVN tag versions">
+		
+		<property name="app.archive.name" value="${app.name}-${svn.tag}"/>
+		
+		<echo />
+		<echo message="Building application version ${svn.tag} (${svn.revision})..."/>
+
+		<ant dir="${svn.dir.build}" target="war" inheritall="true">
+			<property name="build.version" value="${svn.tag}"/>
+			<property name="dir.build" value="${dir.build}"/>
+			<property name="app.name" value="${app.archive.name}"/>
+			<property name="env.src" value="${svn.env.src}"/>
+		</ant>
+	</target>
+	
+	<target name="svn-demo-release" description="Create the Live Demo from SVN sources"
+		depends="clean,init">
+		
+		<property name="app.archive.name" value="${app.name}-${svn.tag}"/>
+		<property name="demo.build.dir" value="${app.archive.name}-livedemo"/>
+		
+		<!-- call the demo target on the code checked out from SVN -->
+		<ant dir="${svn.dir.build}" inheritall="true" target="demo">
+			<property name="dir.build" value="${dir.build}"/>
+			<property name="build.version" value="${svn.tag}"/>
+			<property name="env.src" value="demo"/>
+		</ant>
+		
+		<!-- copy licenses -->
+		<echo message="Copying licenses" />
+		<mkdir dir="${dir.build}/${demo.build.dir}/licenses"/>
+		<copy todir="${dir.build}/${demo.build.dir}/licenses" flatten="true">
+			<fileset dir="${svn.dir.build}/defs/docs/licenses" includes="**/*.txt"/>
+			<mapper type="glob" from="*.txt" to="*"/>
+			<filterset>
+				<filter token="VERSION" value="${svn.tag}" />
+				<filter token="BUILD_DATE" value="${build.time}" />
+			</filterset>
+		</copy>
+		
+		<!-- copy demo build -->
+		<echo message="Copying demo build into SVN tar structure"/>
+		<copy todir="${dir.build}/${demo.build.dir}">
+			<fileset dir="${dir.build}/${app.name}-demo" includes="**"/>
+		</copy>
+		
+		<!-- fix file permissions -->
+		<chmod perm="755">
+			<fileset dir="${dir.build}/${demo.build.dir}">
+				<include name="**/*.sh"/>
+			</fileset>
+		</chmod>
+		
+		<!-- tar it up -->
+		<tar destfile="${dir.dist}/${app.archive.name}-livedemo.tbz2" 
+				compression="bzip2" longfile="gnu">
+			<tarfileset dir="${dir.build}" mode="775">
+				<include name="${demo.build.dir}/**/*.sh"/>
+			</tarfileset>
+			<tarfileset dir="${dir.build}">
+				<include name="${demo.build.dir}/**"/>
+				<exclude name="${demo.build.dir}/**/*.sh"/>
+			</tarfileset>
+		</tar>
+	</target>
+
+	<target name="svn-src-release" 
+		description="Build source release TAR from SVN tag versions">
+
+		<property name="app.archive.name" 
+			value="${app.name}-${svn.tag}"/>
+		<property name="release-source-dir-name"
+			value="${app.archive.name}-src"/>
+		<property name="release-source-dir" 
+			value="${dir.build}/${release-source-dir-name}" />
+		<property name="release-source-name" 
+			value="${dir.dist}/${app.archive.name}-src.tbz2" />
+
+		<echo message="Building source release ${release-source-name}" />
+
+		<mkdir dir="${dir.dist}"/>
+		<delete dir="${release-source-dir}" />
+		<delete file="${release-source-name}" />
+
+		<echo message="Creating source README" />
+		<copy file="${svn.dir.build}/defs/docs/release/README.src.txt" 
+			tofile="${release-source-dir}/README" filtering="true">
+			<filterset>
+				<filter token="VERSION" value="${svn.tag}" />
+				<filter token="BUILD_DATE" value="${build.time}" />
+			</filterset>
+		</copy>
+
+		<echo message="Copying source to tar base directory" />
+		<copy todir="${release-source-dir}">
+			<fileset dir="${svn.dir.build}">
+				<include name="**" />
+				<include name=".*" />
+				<exclude name="build/**" />
+				<exclude name="dist/**" />
+				<exclude name="${dir.env}/local/**" />
+			</fileset>
+		</copy>
+
+		<tar tarfile="${release-source-name}" compression="bzip2" 
+			longfile="gnu">
+			<tarfileset dir="${dir.build}" 
+				includes="${release-source-dir-name}/**" />
+		</tar>
+	</target>
+	
+	<!-- create binary release -->
+	<target name="svn-bin-release" description="Build binary release TAR from SVN tag versions"
+		depends="svn-build">
+		
+		<property name="release-dir-name"
+			value="${app.archive.name}"/>
+		<property name="release-dir" 
+			value="${dir.build}/${release-dir-name}" />
+		<property name="release-name" 
+			value="${dir.dist}/${app.archive.name}.tbz2" />
+
+		<echo message="Building binary release ${release-name}" />
+
+		<delete dir="${release-dir}" />
+		<delete file="${release-name}" />
+
+		<echo message="Creating README" />
+		<copy file="${svn.dir.build}/defs/docs/release/README.bin.txt" 
+			tofile="${release-dir}/README" filtering="true">
+			<filterset>
+				<filter token="VERSION" value="${svn.tag}" />
+				<filter token="BUILD_DATE" value="${build.time}" />
+			</filterset>
+		</copy>
+
+		<echo message="Creating NOTES" />
+		<copy filtering="true" todir="${release-dir}">
+			<fileset dir="${svn.dir.build}/defs/docs/release/notes"
+				includes="notes-${svn.tag}.txt"/>
+			<mapper type="merge" to="NOTES"/>
+			<filterset>
+				<filter token="VERSION" value="${svn.tag}" />
+				<filter token="BUILD_DATE" value="${build.time}" />
+			</filterset>
+		</copy>
+
+		<!-- create setup scripts -->
+		<echo message="Creating setup scripts" />
+		<mkdir dir="${release-dir}/setup/sql"/>
+		<copy filtering="false" todir="${release-dir}/setup/sql">
+			<fileset dir="${svn.dir.build}/defs/sql"
+				includes="**"/>
+		</copy>
+		
+		<!-- copy JDBC drivers -->
+		<echo message="Copying JDBC drivers" />
+		<mkdir dir="${release-dir}/setup/lib"/>
+		<copy todir="${release-dir}/setup/lib">
+			<fileset dir="${svn.dir.build}/lib/jdbc"
+				includes="**"/>
+		</copy>
+
+		<!-- copy JavaMail libraries -->
+		<echo message="Copying Java Mail JARs" />
+		<mkdir dir="${release-dir}/setup/lib/javamail"/>
+		<copy todir="${release-dir}/setup/lib/javamail">
+			<fileset dir="${svn.dir.build}/lib/javamail"
+				includes="**"/>
+		</copy>
+
+		<!-- copy Xalan/Xerces libraries -->
+		<echo message="Copying Xalan/Xerces JARs" />
+		<mkdir dir="${release-dir}/setup/lib/xalan"/>
+		<copy todir="${release-dir}/setup/lib/xalan">
+			<fileset dir="${svn.dir.build}/lib/xalan"
+				includes="**"/>
+		</copy>
+
+		<!-- copy misc README files -->
+		<echo message="Copying README files" />
+		<copy filtering="true" todir="${release-dir}">
+			<fileset dir="${svn.dir.build}/defs/docs"
+				includes="README-*.txt"/>
+			<mapper type="glob" from="*.txt" to="*"/>
+			<filterset>
+				<filter token="VERSION" value="${svn.tag}" />
+				<filter token="BUILD_DATE" value="${build.time}" />
+			</filterset>
+		</copy>
+		
+		<!-- copy licenses -->
+		<echo message="Copying licenses" />
+		<mkdir dir="${release-dir}/licenses"/>
+		<copy todir="${release-dir}/licenses" flatten="true">
+			<fileset dir="${svn.dir.build}/defs/docs/licenses" includes="**/*.txt"/>
+			<mapper type="glob" from="*.txt" to="*"/>
+			<filterset>
+				<filter token="VERSION" value="${svn.tag}" />
+				<filter token="BUILD_DATE" value="${build.time}" />
+			</filterset>
+		</copy>
+		
+		<!-- copy war, removing version from name -->
+		<copy file="${dir.build}/${app.archive.name}.war" 
+			tofile="${release-dir}/${app.name}.war"/>
+
+		<!-- tar it alll up -->
+		<mkdir dir="${dir.dist}"/>
+		<tar tarfile="${release-name}" compression="bzip2" longfile="gnu">
+			<tarfileset dir="${dir.build}" 
+				includes="${release-dir-name}/**">
+			</tarfileset>
+		</tar>
+
+	</target>
+	
+</project>

BIN
defs/design/recipe-type-chooser.psd


+ 75 - 0
defs/docs/demo/README.txt

@@ -0,0 +1,75 @@
+=======================================================================
+                 iEat - Internet recipe database
+             Live Demo @VERSION@ @BUILD_DATE@
+=======================================================================
+
+This is the Live Demo distribution of iEat. This is a complete 
+stand-alone iEat application pre-configured to run without any 
+modification so you can see how iEat works. The only thing you need
+besides the Live Demo (which you have if you're reading this) is a
+Java 5 Runtime Environment (i.e. version 1.5) or higher. You can get a
+JRE from Sun at http://java.sun.com/. Other vendors make JREs, any one
+of them should work as long as they are version 1.5 or higher.
+
+Starting the Live Demo  -----------------------------------------------
+
+To start iEat simply run './start.sh' or '.\start.bat' script (as 
+appropriate for your operating system). This will start the iEat 
+application running with the included servlet container. After a brief 
+moment you should be able to go to the following URL in a browser:
+
+  http://localhost:8080/ieat
+
+If you get an error that the JAVA_HOME environment variable is not 
+defined, you need to set this environment variable, which varies 
+depending on the operating system you're using. For Unix-like OSes 
+using sh-derived shells you can run
+
+  $ JAVA_HOME=/path/to/jdk ./start.sh
+  
+For Windows users you can run
+
+  > set JAVA_HOME=\path\to\jdk
+  > .\start.bat
+  
+From the iEat homepage you can browse recipes. The first time you 
+start the Live Demo, however, there will not be any recipes available.
+To add recipes you must log in and add or import recipes.
+  
+
+Stopping the Live Demo  -----------------------------------------------
+
+To stop iEat simply run './stop.sh' or '.\stop.bat' script (as 
+appropriate for your operating system).
+
+
+Logging into the Live Demo --------------------------------------------
+
+The Live Demo comes configured with an admin-level user so you can log 
+into the application and add recipes, users, etc. Log in with the 
+following information:
+
+  Username: demo
+  Password: demo
+  
+
+Limitations of Live Demo ----------------------------------------------
+
+The Live Demo has some limitations from a regular iEat configuration:
+
+  - Self registration is disabled. Because registration requires 
+    configuring an SMTP mail server to send emails with this feature 
+    has been disabled. If you want to enable it, you must edit the 
+    
+    <LIVE DEMO HOME>/jakarta-tomcat/conf/Catalina/localhost/ieat.xml
+    
+    file and change the value of the 'mail.smtp.host' property to a 
+    valid SMTP server you can send emails from. Then run the setup
+    wizard (Admin > Setup Wizard) to enable the Registration Feature.
+
+    
+Troubleshooting the Live Demo -----------------------------------------
+
+If you run into problems getting the Live Demo running, look at the 
+<LIVE DEMO HOME>/jakarta-tomcat/logs directory for the application log 
+files. They may provide clues as to the cause of the problem.

+ 269 - 0
defs/docs/licenses/apache.txt

@@ -0,0 +1,269 @@
+iEat includes unmodified packages governed by the Apache Software 
+License. Some of these packages are governed by the Apache License 
+1.1, some by the Apache License 2.0. Both of these licenses are 
+included here.
+
+Apache 1.1:
+
+- EHCache 1.0
+- Log4J 1.2.8
+- Xerces 2.6.2
+
+Apache 2.0:
+
+- Derby (Cloudscape) 10.0
+- Lucene 1.4.1
+- Spring 1.1.5
+- Xalan 2.6.0
+
+---------------------------------------------------------------------
+The Apache Software License, Version 1.1
+
+Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
+reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in
+   the documentation and/or other materials provided with the
+   distribution.
+
+3. The end-user documentation included with the redistribution, if
+   any, must include the following acknowlegement:
+      "This product includes software developed by the
+       Apache Software Foundation (http://www.apache.org/)."
+   Alternately, this acknowlegement may appear in the software itself,
+   if and wherever such third-party acknowlegements normally appear.
+
+4. The names "The Jakarta Project", "Commons", and "Apache Software
+   Foundation" must not be used to endorse or promote products derived
+   from this software without prior written permission. For written
+   permission, please contact apache@apache.org.
+
+5. Products derived from this software may not be called "Apache"
+   nor may "Apache" appear in their names without prior written
+   permission of the Apache Group.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+---------------------------------------------------------------------
+
+---------------------------------------------------------------------
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+

+ 21 - 0
defs/docs/licenses/gpl.txt

@@ -0,0 +1,21 @@
+iEat includes unmodified packages governed by the GNU General Public 
+License. This license is included here.
+
+- mm-base 1.14.10
+- MySQL Connector/J 3.1
+
+---------------------------------------------------------------------
+This program is free software; you can redistribute it and/or 
+modify it under the terms of the GNU General Public License as 
+published by the Free Software Foundation; either version 2 of 
+the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful, 
+but WITHOUT ANY WARRANTY; without even the implied warranty of 
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License 
+along with this program; if not, write to the Free Software 
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 
+02111-1307 USA

+ 24 - 0
defs/docs/licenses/ieat.txt

@@ -0,0 +1,24 @@
+=======================================================================
+                 iEat - Internet recipe database
+                 Version @VERSION@ @BUILD_DATE@
+=======================================================================
+
+iEat is released under the GPL, as noted below:
+
+---------------------------------------------------------------------
+This program is free software; you can redistribute it and/or 
+modify it under the terms of the GNU General Public License as 
+published by the Free Software Foundation; either version 2 of 
+the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful, 
+but WITHOUT ANY WARRANTY; without even the implied warranty of 
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License 
+along with this program; if not, write to the Free Software 
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 
+02111-1307 USA
+---------------------------------------------------------------------
+$Id: ieat.txt,v 1.1 2004/11/19 16:20:20 matt Exp $

+ 56 - 0
defs/docs/licenses/ironsmith.txt

@@ -0,0 +1,56 @@
+iEat includes unmodified packages governed by the IronSmith Software
+License. This license is included here.
+
+- QDox 1.5
+
+---------------------------------------------------------------------
+/* ====================================================================
+ * The IronSmith Software License, Version 1.1
+ *
+ * (this license is derived and fully compatible with the Apache Software
+ * License - see http://www.apache.org/LICENSE.txt)
+ *
+ * Copyright (c) 2002 The IronSmith Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ *    if any, must include the following acknowledgment:
+ *       "This product includes software developed by the
+ *        IronSmith Project (http://www.ironsmith.org/)."
+ *    Alternately, this acknowledgment may appear in the software itself,
+ *    if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "IronSmith" and "The IronSmith Project"
+ *    must not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact help@ironsmith.org.
+ *
+ * 5. Products derived from this software may not be called "IronSmith"
+ *    or "QDox", nor may "IronSmith" or "QDox" appear in their
+ *    name, without prior written permission of the IronSmith Project.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ */

+ 509 - 0
defs/docs/licenses/lgpl.txt

@@ -0,0 +1,509 @@
+iEat includes unmodified packages governed by the GNU Lesser General 
+Public License. This license is included here.
+
+- Hibernate 2.1.8
+- Programmers Friend 2.1
+
+---------------------------------------------------------------------
+		  GNU LESSER GENERAL PUBLIC LICENSE
+		       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+  
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+			    NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+		     
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!

+ 6 - 0
defs/docs/licenses/mpl.txt

@@ -0,0 +1,6 @@
+iEat includes unmodified packages governed by the Mozilla Public 
+License. This license is included here.
+
+- HyperJAXB
+
+---------------------------------------------------------------------

+ 179 - 0
defs/docs/licenses/sun-jaf.txt

@@ -0,0 +1,179 @@
+iEat includes the unmodified Java Activation Framework developed by 
+Sun Microsystems. The license covering this code is included here.
+
+- Java Activation Framework 1.0.2
+
+---------------------------------------------------------------------
+                           Sun Microsystems, Inc.
+                        Binary Code License Agreement
+
+READ THE TERMS OF THIS AGREEMENT AND ANY PROVIDED SUPPLEMENTAL LICENSE TERMS
+(COLLECTIVELY "AGREEMENT") CAREFULLY BEFORE OPENING THE SOFTWARE MEDIA
+PACKAGE.  BY OPENING THE SOFTWARE MEDIA PACKAGE, YOU AGREE TO THE TERMS OF
+THIS AGREEMENT.  IF YOU ARE ACCESSING THE SOFTWARE ELECTRONICALLY, INDICATE
+YOUR ACCEPTANCE OF THESE TERMS BY SELECTING THE "ACCEPT" BUTTON AT THE END
+OF THIS AGREEMENT.  IF YOU DO NOT AGREE TO ALL THESE TERMS, PROMPTLY RETURN
+THE UNUSED SOFTWARE TO YOUR PLACE OF PURCHASE FOR A REFUND OR, IF THE
+SOFTWARE IS ACCESSED ELECTRONICALLY, SELECT THE "DECLINE" BUTTON AT THE END
+OF THIS AGREEMENT.
+
+1.  LICENSE TO USE.  Sun grants you a non-exclusive and non-transferable
+license for the internal use only of the accompanying software and
+documentation and any error corrections provided by Sun (collectively
+"Software"), by the number of users and the class of computer hardware for
+which the corresponding fee has been paid.
+
+2.  RESTRICTIONS.  Software is confidential and copyrighted. Title to
+Software and all associated intellectual property rights is retained by Sun
+and/or its licensors.  Except as specifically authorized in any Supplemental
+License Terms, you may not make copies of Software, other than a single copy
+of Software for archival purposes.  Unless enforcement is prohibited by
+applicable law, you may not modify, decompile, or reverse engineer
+Software.  You acknowledge that Software is not designed, licensed or
+intended for use in the design, construction, operation or maintenance of
+any nuclear facility.  Sun disclaims any express or implied warranty of
+fitness for such uses.  No right, title or interest in or to any trademark,
+service mark, logo or trade name of Sun or its licensors is granted under
+this Agreement.
+
+3. LIMITED WARRANTY.  Sun warrants to you that for a period of ninety (90)
+days from the date of purchase, as evidenced by a copy of the receipt, the
+media on which Software is furnished (if any) will be free of defects in
+materials and workmanship under normal use.  Except for the foregoing,
+Software is provided "AS IS".  Your exclusive remedy and Sun's entire
+liability under this limited warranty will be at Sun's option to replace
+Software media or refund the fee paid for Software.
+
+4.  DISCLAIMER OF WARRANTY.  UNLESS SPECIFIED IN THIS AGREEMENT, ALL EXPRESS
+OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED
+WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
+NON-INFRINGEMENT ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT THESE DISCLAIMERS
+ARE HELD TO BE LEGALLY INVALID.
+
+5.  LIMITATION OF LIABILITY.  TO THE EXTENT NOT PROHIBITED BY LAW, IN NO
+EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR
+DATA, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
+DAMAGES, HOWEVER CAUSED REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT
+OF OR RELATED TO THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS
+BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.  In no event will Sun's
+liability to you, whether in contract, tort (including negligence), or
+otherwise, exceed the amount paid by you for Software under this Agreement.
+The foregoing limitations will apply even if the above stated warranty fails
+of its essential purpose.
+
+6.  Termination.  This Agreement is effective until terminated.  You may
+terminate this Agreement at any time by destroying all copies of Software.
+This Agreement will terminate immediately without notice from Sun if you
+fail to comply with any provision of this Agreement.  Upon Termination, you
+must destroy all copies of Software.
+
+7. Export Regulations. All Software and technical data delivered under this
+Agreement are subject to US export control laws and may be subject to export
+or import regulations in other countries.  You agree to comply strictly with
+all such laws and regulations and acknowledge that you have the
+responsibility to obtain such licenses to export, re-export, or import as
+may be required after delivery to you.
+
+8.   U.S. Government Restricted Rights.  If Software is being acquired by or
+on behalf of the U.S. Government or by a U.S. Government prime contractor or
+subcontractor (at any tier), then the Government's rights in Software and
+accompanying documentation will be only as set forth in this Agreement; this
+is in accordance with 48 CFR 227.7201 through 227.7202-4 (for Department of
+Defense (DOD) acquisitions) and with 48 CFR 2.101 and 12.212 (for non-DOD
+acquisitions).
+
+9.  Governing Law.  Any action related to this Agreement will be governed by
+California law and controlling U.S. federal law.  No choice of law rules of
+any jurisdiction will apply.
+
+10.  Severability. If any provision of this Agreement is held to be
+unenforceable, this Agreement will remain in effect with the provision
+omitted, unless omission would frustrate the intent of the parties, in which
+case this Agreement will immediately terminate.
+
+11.  Integration.  This Agreement is the entire agreement between you and
+Sun relating to its subject matter.  It supersedes all prior or
+contemporaneous oral or written communications, proposals, representations
+and warranties and prevails over any conflicting or additional terms of any
+quote, order, acknowledgment, or other communication between the parties
+relating to its subject matter during the term of this Agreement.  No
+modification of this Agreement will be binding, unless in writing and signed
+by an authorized representative of each party.
+
+                           JAVA OPTIONAL PACKAGE
+
+              JAVABEANS(TM) ACTIVATION FRAMEWORK, VERSION 1.0.2
+                         SUPPLEMENTAL LICENSE TERMS
+
+These supplemental license terms ("Supplemental Terms") add to or modify the
+terms of the Binary Code License Agreement (collectively, the "Agreement").
+Capitalized terms not defined in these Supplemental Terms shall have the
+same meanings ascribed to them in the Agreement. These Supplemental Terms
+shall supersede any inconsistent or conflicting terms in the Agreement, or
+in any license contained within the Software.
+
+1. Software Internal Use and Development License Grant.  Subject to the
+terms and conditions of this Agreement, including, but not limited to
+Section 3 (Java(TM) Technology Restrictions) of these Supplemental Terms,
+Sun grants you a non-exclusive, non-transferable, limited license to
+reproduce internally and use internally the binary form of the Software,
+complete and unmodified, for the sole purpose of designing, developing and
+testing your Java applets and applications ("Programs").
+
+2. License to Distribute Software.  In addition to the license granted in
+Section 1 (Software Internal Use and Development License Grant) of these
+Supplemental Terms, subject to the terms and conditions of this Agreement,
+including but not limited to, Section 3 (Java Technology Restrictions) of
+these Supplemental Terms, Sun grants you a non-exclusive, non-transferable,
+limited license to reproduce and distribute the Software in binary code form
+only, provided that you (i) distribute the Software complete and unmodified
+and only bundled as part of your Programs, (ii) do not distribute additional
+software intended to replace any component(s) of the Software, (iii) do not
+remove or alter any proprietary legends or notices contained in the
+Software, (iv) only distribute the Software subject to a license agreement
+that protects Sun's interests consistent with the terms contained in this
+Agreement, and (v) agree to defend and indemnify Sun and its licensors from
+and against any damages, costs, liabilities, settlement amounts and/or
+expenses (including attorneys' fees) incurred in connection with any claim,
+lawsuit or action by any third party that arises or results from the use or
+distribution of any and all Programs and/or Software.
+
+3. Java Technology Restrictions. You may not modify the Java Platform
+Interface ("JPI", identified as classes contained within the "java" package
+or any subpackages of the "java" package), by creating additional classes
+within the JPI or otherwise causing the addition to or modification of the
+classes in the JPI.  In the event that you create an additional class and
+associated API(s) which (i) extends the functionality of the Java platform,
+and (ii) is exposed to third party software developers for the purpose of
+developing additional software which invokes such additional API, you must
+promptly publish broadly an accurate specification for such API for free use
+by all developers.  You may not create, or authorize your licensees to
+create additional classes, interfaces, or subpackages that are in any way
+identified as "java", "javax", "sun" or similar convention as specified by
+Sun in any naming convention designation.
+
+4. No Support. Sun is under no obligation to support the Software or to
+provide you with updates or error corrections. You acknowledge that the
+Software may have defects or deficiencies which cannot or will not be
+corrected by Sun.
+
+5. Trademarks and Logos. You acknowledge and agree as between you and Sun
+that Sun owns the SUN, SOLARIS, JAVA, JINI, FORTE, and iPLANET trademarks
+and all SUN, SOLARIS, JAVA, JINI, FORTE, and iPLANET-related trademarks,
+service marks, logos and other brand designations ("Sun Marks"), and you
+agree to comply with the Sun Trademark and Logo Usage Requirements currently
+located at http://www.sun.com/policies/trademarks. Any use you make of the
+Sun Marks inures to Sun's benefit.
+
+6. Source Code. Software may contain source code that is provided solely for
+reference purposes pursuant to the terms of this Agreement.  Source code may
+not be redistributed unless expressly provided for in this Agreement.
+
+7. Termination for Infringement.  Either party may terminate this Agreement
+immediately should any Software become, or in either party's opinion be
+likely to become, the subject of a claim of infringement of any intellectual
+property right.
+
+For inquiries please contact: Sun Microsystems, Inc.  901 San Antonio Road,
+Palo Alto, California 94303
+(LFI#115020/Form ID#011801)

+ 171 - 0
defs/docs/licenses/sun-javamail.txt

@@ -0,0 +1,171 @@
+iEat includes the unmodified JavaMail API developed by Sun 
+Microsystems. The license covering this code is included here.
+
+- JavaMail 1.3.2
+
+---------------------------------------------------------------------
+Sun Microsystems, Inc. 
+Binary Code License Agreement
+
+READ THE TERMS OF THIS AGREEMENT AND ANY PROVIDED SUPPLEMENTAL LICENSE
+TERMS (COLLECTIVELY "AGREEMENT") CAREFULLY BEFORE OPENING THE SOFTWARE
+MEDIA PACKAGE.  BY OPENING THE SOFTWARE MEDIA PACKAGE, YOU AGREE TO THE
+TERMS OF THIS AGREEMENT.  IF YOU ARE ACCESSING THE SOFTWARE
+ELECTRONICALLY, INDICATE YOUR ACCEPTANCE OF THESE TERMS BY SELECTING
+THE "ACCEPT" BUTTON AT THE END OF THIS AGREEMENT.  IF YOU DO NOT AGREE
+TO ALL THESE TERMS, PROMPTLY RETURN THE UNUSED SOFTWARE TO YOUR PLACE
+OF PURCHASE FOR A REFUND OR, IF THE SOFTWARE IS ACCESSED
+ELECTRONICALLY, SELECT THE "DECLINE" BUTTON AT THE END OF THIS
+AGREEMENT.
+
+1.  LICENSE TO USE.  Sun grants you a non-exclusive and
+non-transferable license for the internal use only of the accompanying
+software and documentation and any error corrections provided by Sun
+(collectively "Software"), by the number of users and the class of
+computer hardware for which the corresponding fee has been paid.
+
+2.  RESTRICTIONS.  Software is confidential and copyrighted. Title to
+Software and all associated intellectual property rights is retained by
+Sun and/or its licensors.  Except as specifically authorized in any
+Supplemental License Terms, you may not make copies of Software, other
+than a single copy of Software for archival purposes.  Unless
+enforcement is prohibited by applicable law, you may not modify,
+decompile, or reverse engineer Software.  Licensee acknowledges that
+Licensed Software is not designed or intended for use in the design,
+construction, operation or maintenance of any nuclear facility. Sun
+Microsystems, Inc. disclaims any express or implied warranty of fitness
+for such uses.   No right, title or interest in or to any trademark,
+service mark, logo or trade name of Sun or its licensors is granted
+under this Agreement.
+
+3.  LIMITED WARRANTY.  Sun warrants to you that for a period of ninety
+(90) days from the date of purchase, as evidenced by a copy of the
+receipt, the media on which Software is furnished (if any) will be free
+of defects in materials and workmanship under normal use.  Except for
+the foregoing, Software is provided "AS IS".  Your exclusive remedy and
+Sun's entire liability under this limited warranty will be at Sun's
+option to replace Software media or refund the fee paid for Software.
+
+4.  DISCLAIMER OF WARRANTY.  UNLESS SPECIFIED IN THIS AGREEMENT, ALL
+EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
+INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE OR NON-INFRINGEMENT ARE DISCLAIMED, EXCEPT TO THE
+EXTENT THAT THESE DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.
+
+5.  LIMITATION OF LIABILITY.  TO THE EXTENT NOT PROHIBITED BY LAW, IN
+NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE,
+PROFIT OR DATA, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR
+PUNITIVE DAMAGES, HOWEVER CAUSED REGARDLESS OF THE THEORY OF LIABILITY,
+ARISING OUT OF OR RELATED TO THE USE OF OR INABILITY TO USE SOFTWARE,
+EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.  In no
+event will Sun's liability to you, whether in contract, tort (including
+negligence), or otherwise, exceed the amount paid by you for Software
+under this Agreement.  The foregoing limitations will apply even if the
+above stated warranty fails of its essential purpose.
+
+6.  Termination.  This Agreement is effective until terminated.  You
+may terminate this Agreement at any time by destroying all copies of
+Software.  This Agreement will terminate immediately without notice
+from Sun if you fail to comply with any provision of this Agreement. 
+Upon Termination, you must destroy all copies of Software.
+
+7.  Export Regulations. All Software and technical data delivered under
+this Agreement are subject to US export control laws and may be subject
+to export or import regulations in other countries.  You agree to
+comply strictly with all such laws and regulations and acknowledge that
+you have the responsibility to obtain such licenses to export,
+re-export, or import as may be required after delivery to you.
+
+8.  U.S. Government Restricted Rights.  If Software is being acquired
+by or on behalf of the U.S. Government or by a U.S. Government prime
+contractor or subcontractor (at any tier), then the Government's rights
+in Software and accompanying documentation will be only as set forth in
+this Agreement; this is in accordance with 48 CFR 227.7201 through
+227.7202-4 (for Department of Defense (DOD) acquisitions) and with 48
+CFR 2.101 and 12.212 (for non-DOD acquisitions).
+
+9.  Governing Law.  Any action related to this Agreement will be
+governed by California law and controlling U.S. federal law.  No choice
+of law rules of any jurisdiction will apply.
+
+10. Severability. If any provision of this Agreement is held to be
+unenforceable, this Agreement will remain in effect with the provision
+omitted, unless omission would frustrate the intent of the parties, in
+which case this Agreement will immediately terminate.
+
+11. Integration.  This Agreement is the entire agreement between you
+and Sun relating to its subject matter.  It supersedes all prior or
+contemporaneous oral or written communications, proposals,
+representations and warranties and prevails over any conflicting or
+additional terms of any quote, order, acknowledgment, or other
+communication between the parties relating to its subject matter during
+the term of this Agreement.  No modification of this Agreement will be
+binding, unless in writing and signed by an authorized representative
+of each party.
+
+JAVAMAIL, VERSION 1.3.2
+SUPPLEMENTAL LICENSE TERMS
+
+These supplemental license terms ("Supplemental Terms") add to or
+modify the terms of the Binary Code License Agreement (collectively,
+the "Agreement"). Capitalized terms not defined in these Supplemental
+Terms shall have the same meanings ascribed to them in the Agreement.
+These Supplemental Terms shall supersede any inconsistent or
+conflicting terms in the Agreement, or in any license contained within
+the Software.
+
+1. Software Internal Use and Development License Grant.  Subject to the
+terms and conditions of this Agreement, including, but not limited to
+Section 3 (Java Technology Restrictions) of these Supplemental Terms,
+Sun grants you a non-exclusive, non-transferable, limited license to
+reproduce internally and use internally the binary form of the
+Software, complete and unmodified, for the sole purpose of designing,
+developing and testing your Java applets and applications
+("Programs").
+
+2. License to Distribute Software. Subject to the terms and conditions
+of this Agreement, including, but not limited to Section 3 (Java
+Technology Restrictions) of these Supplemental Terms, Sun grants you a
+non-exclusive, non-transferable, limited license to reproduce and
+distribute the Software in binary code form only, provided that (i) you
+distribute the Software complete and unmodified and only bundled as
+part of, and for the sole purpose of  running, your Java applets or
+applications ("Programs"), (ii) the Programs add significant and
+primary functionality to the Software, (iii) you do not distribute
+additional software intended to replace any component(s) of the
+Software, (iv) you do not remove or alter any proprietary legends or
+notices contained in the Software, (v) you only distribute the Software
+subject to a license agreement that protects Sun's interests consistent
+with the terms contained in this Agreement, and (vi) you agree to
+defend and indemnify Sun and its licensors from and against any dam
+
+3. Java Technology Restrictions.  You may not create, modify, or change
+the behavior of, or authorize your licensees to create, modify, or
+change the behavior of, classes, interfaces, or subpackages that are in
+any way identified as "java", "javax", "sun" or similar convention as
+specified by Sun in any naming convention designation.
+
+4. Trademarks and Logos. You acknowledge and agree as between you and
+Sun that Sun owns the SUN, SOLARIS, JAVA, JINI, FORTE, STAROFFICE,
+STARPORTAL and iPLANET trademarks and all SUN, SOLARIS, JAVA, JINI,
+FORTE, STAROFFICE, STARPORTAL and iPLANET-related trademarks, service
+marks, logos and other brand designations ("Sun Marks"), and you agree
+to comply with the Sun Trademark and Logo Usage Requirements currently
+located at http://www.sun.com/policies/trademarks. Any use you make of
+the Sun Marks inures to Sun's benefit.
+
+5. Source Code. Software may contain source code that is provided
+solely for reference purposes pursuant to the terms of this Agreement.
+Source code may not be redistributed unless expressly provided for in
+this Agreement.
+
+6. Termination for Infringement.  Either party may terminate this
+Agreement immediately should any Software become, or in either party's
+opinion be likely to become, the subject of a claim of infringement of
+any intellectual property right.
+
+For inquiries please contact:
+Sun Microsystems, Inc.,
+4150 Network Circle,
+Santa Clara, California 95054, U.S.A
+(LFI#143977/Form ID#011801)

+ 33 - 0
defs/docs/licenses/xdoclet.txt

@@ -0,0 +1,33 @@
+iEat includes unmodified packages governed by the XDoclet Software
+License. This license is included here.
+
+- XDoclet 1.2.1
+
+---------------------------------------------------------------------
+Copyright (c) 2000-2004, XDoclet Team
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this list
+of conditions and the following disclaimer.
+
+Redistributions in binary form must reproduce the above copyright notice, this
+list of conditions and the following disclaimer in the documentation and/or
+other materials provided with the distribution.
+
+Neither the name of the XDoclet team nor the names of its contributors may be
+used to endorse or promote products derived from this software without specific
+prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 42 - 0
defs/docs/licenses/xmlunit.txt

@@ -0,0 +1,42 @@
+iEat includes unmodified packages governed by the XMLUnit Software
+License. This license is included here.
+
+- XMLUnit 1.0
+
+---------------------------------------------------------------------
+/*
+******************************************************************
+Copyright (c) 2001, Jeff Martin, Tim Bacon
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above
+      copyright notice, this list of conditions and the following
+      disclaimer in the documentation and/or other materials provided
+      with the distribution.
+    * Neither the name of the xmlunit.sourceforge.net nor the names
+      of its contributors may be used to endorse or promote products
+      derived from this software without specific prior written
+      permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+******************************************************************
+*/
+

+ 246 - 0
defs/docs/release/README.bin.txt

@@ -0,0 +1,246 @@
+=======================================================================
+iEat - the Internet recipe database
+Version @VERSION@ @BUILD_DATE@
+=======================================================================
+
+This is the binary distribution of iEat. iEat requires a Java 5 
+runtime environment, a relational database, and a J2EE application 
+server to run. Open source software exists for all of these 
+components. iEat is developed using the Sun Java 5 JDK, the PostgreSQL
+relational database, and the Apache Tomcat J2EE application server. The 
+MySQL relational database is another popular product, and iEat is also
+tested against it. See the following URLs for information on these 
+products:
+
+- Java:       http://java.sun.com/
+- PostgreSQL: http://www.postgresql.org/
+- MySQL:      http://www.mysql.com/
+- Tomcat:     http://tomcat.apache.org/
+
+
+UPGRADE FROM iEat 1.0 =================================================
+  
+  The database schema has changed significantly in this release from
+  the 1.0 release. You will not be able to run the @VERSION@ version of
+  iEat against the 1.0 database. Look for a SQL script named
+  "upgrade-1.0-1.2.sql" in the setup/sql/<db> directory included in
+  this distribution that will upgrade a 1.0 database to the new format,
+  preserving your data. Run this script as your exisitng iEat database
+  user.
+  
+  Note that not all database types have upgrade scripts yet!
+  
+
+FIRST-TIME DATABASE CREATION ==========================================
+
+  You must initialize your database for first-time use. Currently 
+  PostgreSQL 7.x or later and MySQL 4.1 or later are directly 
+  supported:
+  
+  POSTGRES ------------------------------------------------------------
+  
+  1) Create a database user for iEat
+    
+    As a Postgres super-user, execute:
+    
+    $ createuser -ADEP ieat
+    
+    You will be prompted to enter the ieat user's password. If you 
+    get a permissions error when you attempt to run this command, 
+    make sure you are executing it as a Postgres user with sufficient
+    privileges. You can explicity run as the Postgres super-user with
+    
+    $ createuser -U postgres -ADEP ieat
+    
+    in which you may be prompted for the postgres user's password.
+    
+  2) Create a database for iEat
+  
+    As a Postgres super-user, execute:
+    
+    $ createdb -E UNICODE -O ieat ieat
+    
+    Again, you may need to pass the -U flag to specify a Postgres
+    super-user account to execute the command as. The database
+    must be created with the Unicode encoding!
+    
+  MYSQL ---------------------------------------------------------------
+  
+  1) Create a database for iEat
+  
+    As a MySQL super-user, execute the following in the MySQL shell,
+    i.e. enter 'mysql -u root mysql' to enter the MySQL shell as the 
+    'root' user:
+    
+    mysql> create database ieat character set utf8;
+    
+  2) Grant privileges for an iEat database user
+  
+    Still in the MySQL shell, execute:
+    
+    mysql> grant all privileges on ieat.* to ieat identified by 'ieat';
+    
+    Here the "identified by 'ieat'" creates the user's password, which 
+    you should set to whatever you please. Note this allows the 
+    database user 'ieat' to connect to the 'ieat' database from any 
+    host. If you plan on running the iEat application on the same 
+    machine as MySLQ is running on, you could limit the ieat user 
+    to connect only from the local machine with
+    
+    mysql> grant all privileges on ieat.* to 'ieat'@'localhost' 
+        -> identified by 'ieat';
+    
+  3) Flush the privileges
+  
+    To make sure MySQL is ready to be used with the new ieat user,
+    execute the following (still in the MySQL shell):
+    
+    mysql> flush privileges;
+    
+
+FIRST-TIME DATABASE SETUP =============================================
+
+  After creating the database for the first time, you must run
+  several SQL scripts to create the iEat database tables.
+  
+  POSTGRES ------------------------------------------------------------
+  
+  Execute:
+  
+  $ psql -U ieat -f setup/sql/postgres/setup.sql ieat
+  
+  Ignore any warnings about "table X does not exist". Then repeat
+  the above command for the following SQL scripts (substitue 
+  these paths for the -f argument):
+  
+  - setup/sql/postgres/create.sql
+  - setup/sql/postgres/load.sql
+  - setup/sql/postgres/load-ingredients.sql
+  
+  MYSQL ---------------------------------------------------------------
+  
+  Execute:
+  
+  $ mysql -f -u ieat -p ieat <setup/sql/mysql/setup.sql
+  
+  Enter the ieat user password if prompted. Ignore warnings about
+  tables that don't exist Then repeat the above command for the
+  following SQL scripts (substitute these paths for the 
+  'setup/sql/mysql/setup.sql' above):
+  
+  - setup/sql/mysql/create.sql
+  - setup/sql/mysql/load.sql
+  - setup/sql/mysql/load-ingredients.sql
+  
+
+FIRST-TIME APPLICATION SERVER SETUP ===================================
+
+  iEat depends on the application server it is running in to provide a 
+  JDBC DataSource to connect to the database with and a JavaMail
+  Session to send emails with. Thus you must configure the deployment 
+  descriptor for iEat the first time you install iEat.
+  
+  For Tomcat 5.5 or later, create a file located at 
+  
+  <TOMCAT HOME/conf/Catalina/localhost/ieat.xml
+  
+  The structure of this file should look like this:
+  
+  <Context path="/ieat" reloadable="false" 
+  		docBase="/path/to/ieat-1.0.0.war">
+	<Resource name="jdbc/ieat" 
+		type="javax.sql.DataSource" scope="Shareable"
+		driverClassName="org.postgresql.Driver" 
+		url="jdbc:postgresql://localhost:5432/ieat"
+		username="ieat" password="ieat" maxWait="5000"
+		maxActive="5" maxIdle="2" removeAbandoned="true"
+		removeAbandonedTimeout="60" logAbandoned="true"
+	/>
+	<Resource name="mail/ieat" 
+		auth="Container" 
+		type="javax.mail.Session"
+		mail.smtp.host="localhost"
+	/>
+  </Context>
+  
+  The docBase attribute should point to the absolute path of the 
+  iEat WAR included in this package. Then customize the DataSource
+  and Session definitions to match your environment. For example, 
+  if you plan to use MySQL instead of PostgreSQL, your DataSource
+  configuration should look more like this:
+  
+	<Resource name="jdbc/ieat" 
+		type="javax.sql.DataSource" scope="Shareable"
+		driverClassName="com.mysql.jdbc.Driver" 
+		url="jdbc:mysql://localhost:3306/ieat"
+		username="ieat" password="ieat" maxWait="5000"
+		maxActive="5" maxIdle="2" removeAbandoned="true"
+		removeAbandonedTimeout="60" logAbandoned="true"
+	/>
+
+
+JDBC DRIVERS AND JAVAMAIL =============================================
+
+  Your J2EE application server will need access to the JDBC driver for
+  the database you are using. Drivers for PostgreSQL and MySQL are 
+  provided in the setup/lib directory of this package. Copy the 
+  appropriate JAR file into the appropriate library directory of your
+  application server. For Tomcat this is <TOMCAT HOME>/common/lib.
+  
+  In addition your application server must make the Java Mail API 
+  available to iEat. If it does not have this (by default Tomcat 5 
+  does NOT provide this) you can copy the activation.jar and mail.jar 
+  files from the setup/lib/javamail directory into the appropriate 
+  directory for your application server. For Tomcat this is 
+  <TOMCAT HOME>/common/lib.
+  
+
+APPLICATION SETUP =====================================================
+
+  To install, copy the WAR file included in this package to the path
+  you specified in your application server config (e.g. the "docBase"
+  attribute from the deployment descriptor).
+  
+  Finally, you might want to adjust the application logging, which 
+  by default will attempt to log via Log4J to /var/tmp/ieat.log. You 
+  can adjust the verbosity and location of this log by unpacking the 
+  WAR and editing the <IEAT HOME>/WEB-INF/classes/log4j.properties 
+  Log4J configuration. Then either change your application server 
+  configuration to point to the unpacked WAR directory or zip up the 
+  unpacked WAR directory back to the original file name.
+  
+  ** Note to MySQL users: you must perform an additional step, to 
+     replace the <IEAT HOME>/WEB-INF/classes/ieat.hbm.xml with 
+     the setup/sql/mysql/ieat.hbm.xml version, which has MySQL 
+     implementations of the iEat SQL queries.
+
+
+FIRST-TIME USE ========================================================
+
+  Start up your application server. Once started, visit 
+  
+  http://<your server>:<port>/ieat
+  
+  where <your server> is the machine iEat is running on (i.e. 
+  localhost) and <port> is the port the applicaiton server is 
+  listening on (i.e. for Tomcat this defaults to 8080).
+  
+  You should see the iEat Setup Wizard page. The Setup Wizard will 
+  guide you through configuring the remaining iEat optinos as well as 
+  create your first admin-level user account.
+
+
+EXSLT/Xerces SUPPORT  =================================================
+
+  iEat requires a JAXP transformer that includes EXSLT support. Xalan 
+  supports EXLST. You may experience problems using the JAXP parser 
+  supplied with your JDK, however. To get around this, you can use 
+  Xalan and Xerces in place of your JDK's JAXP implementation. To do 
+  this, place the Xalan and Xerces JAR files (available in the 
+  setup/lib/xalan directory) in your app server's "endorsed" 
+  classpath. For Tomcat this means placing these JARs in the 
+  <TOMCAT HOME>/common/endorsed directory.
+
+
+=======================================================================
+Happy eating!

+ 8 - 0
defs/docs/release/README.src.txt

@@ -0,0 +1,8 @@
+=======================================================================
+                 iEat - Internet recipe database
+                 Version @VERSION@ @BUILD_DATE@
+=======================================================================
+
+This is the source distribution of iEat.
+
+This README needs to be written :)

+ 6 - 0
defs/docs/release/notes/notes-1.1.4.txt

@@ -0,0 +1,6 @@
+=======================================================================
+iEat (Development) Release Notes
+@VERSION@ @BUILD_DATE@
+=======================================================================
+
+This is a test release to test the new Subversion build system.

+ 36 - 0
defs/docs/release/notes/notes-1.2.txt

@@ -0,0 +1,36 @@
+=======================================================================
+iEat Release Notes
+@VERSION@ @BUILD_DATE@
+=======================================================================
+
+This release is an under-the-hood update to bring much of the code 
+base up to date and refactor out a large amount of non-iEat-specific 
+code into shared libraries. These common libraries are shared between 
+iEat and other projects such as Tidbits. Along the way some small bugs 
+from iEat 1.0 have been addressed.
+
+The database schema has changed in this release. You should not run 
+this against an installation of iEat 1.0. First make sure you back up
+your iEat 1.0 database, shut down the iEat server, and then run the 
+provided upgrade-1.0-1.2.sql SQL script (in the setup/sql/<db> 
+directory) against the 1.0 database. This script will update your iEat
+1.0 database to the new schema. Once upgraded, bring the iEat 1.2
+application up. You'll be forced to go through the Setup Admin again,
+and once you've completed that you can restart your application server
+and start using iEat 1.2.
+
+Major updates in this release:
+
+- Update to Java 5
+- Update to Lucene 2
+- Update to HyperJAXB2
+- Update to Hibernate 3
+- Update to Spring 1.2.8
+- Update to shared libraries mmagoff and xweb
+- Fix bug clean-registration job ran every 2 minutes instead of once 
+  per day at 2AM
+- Fix UI schema error with allow-unlimited optional attribute
+- Fix various XSL problems with Java 5 default implementation (XSLTC)
+- Fix Ehcache configuration so that caches do not spool to disk
+- Fix some logic bugs in advanced search
+- Fix some bugs in the RecipeML import process

+ 2 - 0
defs/examples/build.properties

@@ -0,0 +1,2 @@
+catalina.home=/java/jakarta/jakarta-tomcat-4.1.30
+

+ 141 - 0
defs/examples/env.properties

@@ -0,0 +1,141 @@
+###############################################################################
+# lucene.index.base.path <directory path>
+# 
+# The path to a directory that the application will manage the Lucene search
+# indices. This directory must allow write access to the user or group the 
+# application runs as, as it will try to create directories and files here.
+
+lucene.index.base.path=/data/ieat-index
+
+
+###############################################################################
+# index.update.buff.size <int>
+#
+# This sets the size of index update buffer, meaning the number of item updates
+# that are queued before indexing them in one operation. The larger the number,
+# the more efficient updates will be, but the longer it will take for updates 
+# to show up in search results. Setting this to '1' means the index will be 
+# updated after every change.
+
+index.update.buffer.size=1
+
+
+###############################################################################
+# crypto.salt <string>
+# 
+# The "salt" used for encrypting passwords. Set this to a random string of
+# characters as desired, but beware the more characters used the longer the 
+# encrypted passwords will become and they can end up loger than the default
+# database column width defined for user passwords. Around 20 characters is a
+# good maximum to keep in mind. If you don't want to use any salt then set this
+# to an empty value.
+
+crypto.salt=#$8e#&*fJ39eJE(3j#E()
+
+
+###############################################################################
+# crypto.provider <string>
+# 
+# The JCE provider to use. The default one included with Java is 'SunJCE'.
+# Only change this if you want to use a different provider (for example to use
+# a different encryption scheme).
+
+crypto.provider=SunJCE
+
+
+###############################################################################
+# crypto.key.type <string>
+# 
+# The JCE secret key type used for password-based encryption schemes. For 
+# example: 'PBEWithMD5AndDES'. Also see the crypto.pge.salt property.
+
+crypto.key.type=PBEWithMD5AndDES
+
+
+###############################################################################
+# crypto.cipher.type <string>
+# 
+# The JCE cipher to use for encryption. For example: 'PBEWithMD5AndDES'
+
+crypto.cipher.type=PBEWithMD5AndDES
+
+
+###############################################################################
+# crypto.key <string>
+# 
+# The password to use for password-based encryption.
+
+crypto.key=34i.X34U(#*=>jys
+
+
+###############################################################################
+# crypto.pge.salt <string>
+# 
+# The salt to use for password-based encryption schemes. The encryption 
+# scheme may have specific length requirements. For example the 
+# PBEWithMD5AndDES key type requires an 8-byte salt length.
+
+crypto.pbe.salt=|"dk;P~s
+
+
+###############################################################################
+# smtp.host <inet host>
+# 
+# The SMTP server to use for sending mail messages to.
+
+smtp.host=localhost
+
+
+###############################################################################
+# mail.from <email>
+# 
+# The email address to send mail from.
+
+mail.from=ieat@localhost.local
+
+
+###############################################################################
+# url.registration.confirm <url>
+# 
+# The relative URL to confirm an account registration. This URL should inlcude 
+# two variables: $[user.login] to hold the login of the user being confirmed,
+# and $[result] for the confirmation code. For example:
+# '/confirmAccount.do?login=$[user.login]&amp;code=$[result]'. If you set up
+# an Apache rewrite rule, you can shorten this URL, for example
+# '/confirm/$[user.login]/$[result]'.
+
+url.registration.confirm=/confirmAccount.do?login=$[user.login]&code=$[result]
+
+###############################################################################
+# url.welcome <url>
+# 
+# The relative URL to use in the welcome email template. Typically this will
+# just be the home page.
+
+url.welcome=/home.do
+
+###############################################################################
+# url.welcome <url>
+# 
+# The relative URL to use in the welcome email template. Typically this will
+# just be the home page.
+
+###############################################################################
+# hibernate.dialect <Hibernite dialect>
+# 
+# The Hibernate dialect to use. For PostgreSQL:
+# 
+# org.hibernate.dialect.PostgreSQLDialect
+# 
+# For MySQL:
+# 
+# org.hibernate.dialect.MySQLDialect
+
+hibernate.dialect=org.hibernate.dialect.MySQLDialect
+
+###############################################################################
+# hibernate.show_sql <true|false>
+# 
+# Set to 'true' to enable SQL debugging. Otherwise set to 'false'.
+
+hibernate.show_sql=false

+ 28 - 0
defs/examples/log4j.properties

@@ -0,0 +1,28 @@
+###########################################################################
+# Log4j Configuration
+###########################################################################
+# $Id $
+###########################################################################
+
+log4j.rootCategory=DEBUG, consoleAppender
+
+log4j.category.org.apache=INFO
+
+###########################################################################
+# General Appenders
+###########################################################################
+
+log4j.appender.consoleAppender=org.apache.log4j.ConsoleAppender
+log4j.appender.consoleAppender.layout=org.apache.log4j.PatternLayout
+log4j.appender.consoleAppender.layout.ConversionPattern=%d{MMM-dd HH:mm:ss} %-5p %c{5} - %m%n
+
+log4j.appender.defaultAppAppender=org.apache.log4j.RollingFileAppender
+log4j.appender.defaultAppAppender.layout=org.apache.log4j.PatternLayout
+log4j.appender.defaultAppAppender.layout.ConversionPattern=(%d{dd MMM yyyy HH:mm:ss}) %-5p %c{3} - %m%n
+log4j.appender.defaultAppAppender.File=/var/tmp/ma.log
+log4j.appender.defaultAppAppender.MaxFileSize=1MB
+log4j.appender.defaultAppAppender.MaxBackupIndex=2
+
+###########################################################################
+# Special Purpose Appenders
+###########################################################################

+ 8 - 0
defs/examples/test.properties

@@ -0,0 +1,8 @@
+jdbc.driver=org.postgresql.Driver
+jdbc.url=jdbc:postgresql://localhost/ieat
+jdbc.user=ieat
+jdbc.pass=ieat
+hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
+
+test.load.recipe.id=1
+test.load.base.id=1

+ 924 - 0
defs/schema/binding.xml

@@ -0,0 +1,924 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jaxb:bindings version="1.0" 
+	xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" 
+	xmlns:xs="http://www.w3.org/2001/XMLSchema" 
+	xmlns:hj="http://hyperjaxb2.jvnet.org/customizations"
+	xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
+	jaxb:extensionBindingPrefixes="hj xjc">
+	
+	<jaxb:bindings schemaLocation="core.xsd" node="/xs:schema">	
+
+		<jaxb:globalBindings bindingStyle="modelGroupBinding" choiceContentProperty="true" 
+				generateIsSetMethod="false">
+			<jaxb:javaType name="java.lang.Integer"  xmlType="xs:int"/>
+			<jaxb:javaType name="java.lang.Long" xmlType="xs:long"/>
+			
+			<!-- The SerializeableUID value should be set the the date 
+				(yyyymmdd) plus version (1, 2, 3, etc) to signify the 
+				unique version of these objects. -->
+			<xjc:serializable uid="200905041"/>
+			
+		</jaxb:globalBindings>
+
+		<jaxb:schemaBindings>
+			<jaxb:package name="magoffin.matt.ieat.domain"/>
+		</jaxb:schemaBindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='base']">
+			<hj:class>
+				<hj:table name="base"/>
+				<hj:cache usage="read-write"/>
+				<hj:discriminator formula="'magoffin.matt.ieat.domain.Base'"> 
+					<hj:no-column/> 
+				</hj:discriminator>
+			</hj:class>
+
+			<!-- Primary Key -->
+			
+			<jaxb:bindings node="xs:simpleContent/xs:extension/xs:attribute[@name='baseId']">
+				<hj:id unsaved-value="null">
+					<hj:column name="baseid" not-null="true"/>
+					<hj:generator generatorClass="native">
+						<hj:param name="sequence" value="hibernate_integer_seq"/>
+					</hj:generator>
+				</hj:id>
+			</jaxb:bindings>
+			
+		</jaxb:bindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='course']">
+			<hj:class>
+				<hj:table name="course"/>
+				<hj:cache usage="read-write"/>
+				<hj:discriminator formula="'magoffin.matt.ieat.domain.Course'"> 
+					<hj:no-column/> 
+				</hj:discriminator>
+			</hj:class>
+
+			<!-- Primary Key -->
+			
+			<jaxb:bindings node="xs:simpleContent/xs:extension/xs:attribute[@name='courseId']">
+				<hj:id unsaved-value="null">
+					<hj:column name="courseid" not-null="true"/>
+					<hj:generator generatorClass="native">
+						<hj:param name="sequence" value="hibernate_integer_seq"/>
+					</hj:generator>
+				</hj:id>
+			</jaxb:bindings>
+			
+		</jaxb:bindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='difficulty']">
+			<hj:class>
+				<hj:table name="difficulty"/>
+				<hj:cache usage="read-write"/>
+				<hj:discriminator formula="'magoffin.matt.ieat.domain.Difficulty'"> 
+					<hj:no-column/> 
+				</hj:discriminator>
+			</hj:class>
+
+			<!-- Primary Key -->
+			
+			<jaxb:bindings node="xs:simpleContent/xs:extension/xs:attribute[@name='difficultyId']">
+				<hj:id unsaved-value="null">
+					<hj:column name="difficultyid" not-null="true"/>
+					<hj:generator generatorClass="native">
+						<hj:param name="sequence" value="hibernate_integer_seq"/>
+					</hj:generator>
+				</hj:id>
+			</jaxb:bindings>
+			
+		</jaxb:bindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='ethnicity']">
+			<hj:class>
+				<hj:table name="ethnicity"/>
+				<hj:cache usage="read-write"/>
+				<hj:discriminator formula="'magoffin.matt.ieat.domain.Ethnicity'"> 
+					<hj:no-column/> 
+				</hj:discriminator>
+			</hj:class>
+
+			<!-- Primary Key -->
+			
+			<jaxb:bindings node="xs:simpleContent/xs:extension/xs:attribute[@name='ethnicityId']">
+				<hj:id unsaved-value="null">
+					<hj:column name="ethnicityid" not-null="true"/>
+					<hj:generator generatorClass="native">
+						<hj:param name="sequence" value="hibernate_integer_seq"/>
+					</hj:generator>
+				</hj:id>
+			</jaxb:bindings>
+			
+		</jaxb:bindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='ingredient']">
+			<hj:class>
+				<hj:table name="ingredient"/>
+				<hj:cache usage="read-write"/>
+				<hj:discriminator formula="'magoffin.matt.ieat.domain.Ingredient'"> 
+					<hj:no-column/> 
+				</hj:discriminator>
+			</hj:class>
+
+			<!-- Primary Key -->
+			
+			<jaxb:bindings node="xs:attribute[@name='ingredientId']">
+				<hj:id unsaved-value="null">
+					<hj:column name="ingredientid" not-null="true"/>
+					<hj:generator generatorClass="native">
+						<hj:param name="sequence" value="hibernate_integer_seq"/>
+					</hj:generator>
+				</hj:id>
+			</jaxb:bindings>
+			
+			<!-- Elements -->
+						
+			<jaxb:bindings node="xs:sequence/xs:element[@name='description']">
+				<hj:simpleSingleProperty>
+					<hj:column name="description" length="512"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:sequence/xs:element[@name='name']">
+				<hj:simpleSingleProperty>
+					<hj:column name="ingr_name" length="128" not-null="true"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+		</jaxb:bindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='meal']">
+			<hj:class>
+				<hj:table name="meal"/>
+				<hj:cache usage="read-write"/>
+				<hj:discriminator formula="'magoffin.matt.ieat.domain.Meal'"> 
+					<hj:no-column/> 
+				</hj:discriminator>
+			</hj:class>
+
+			<!-- Primary Key -->
+			
+			<jaxb:bindings node="xs:attribute[@name='mealId']">
+				<hj:id unsaved-value="null">
+					<hj:column name="mealid" not-null="true"/>
+					<hj:generator generatorClass="native"/>
+				</hj:id>
+			</jaxb:bindings>
+			
+			<!-- Elements -->
+						
+			<jaxb:bindings node="xs:sequence/xs:element[@name='name']">
+				<hj:simpleSingleProperty>
+					<hj:column name="meal_name" length="128" not-null="true"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:sequence/xs:element[@name='owner']">
+				<hj:complexSingleProperty>
+					<hj:many-to-one foreign-key="meal_user_fk"
+							insert="true" update="false" cascade="none">
+						<hj:column name="ownerid"/>
+					</hj:many-to-one>
+				</hj:complexSingleProperty>	
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:sequence/xs:element[@name='recipe']">
+				<hj:complexCollectionProperty lazy="false">
+					<hj:cache usage="read-write"/>
+					<hj:key foreign-key="mealrecipe_meal_fk">
+						<hj:column name="mealid"/>
+					</hj:key>
+					<hj:list-index> 
+						<hj:column name="pos"/> 
+					</hj:list-index>
+					<hj:one-to-many/>
+				</hj:complexCollectionProperty>	
+			</jaxb:bindings>
+			
+		</jaxb:bindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='meal-recipe']">
+			<hj:class>
+				<hj:table name="mealrecipe"/>
+				<hj:cache usage="read-write"/>
+				<hj:discriminator formula="'magoffin.matt.ieat.domain.MealRecipe'"> 
+					<hj:no-column/> 
+				</hj:discriminator>
+			</hj:class>
+			
+			<!-- Primary Key -->
+
+			<hj:id unsaved-value="null">
+				<hj:column name="mealrecipeid" not-null="true"/>
+				<hj:generator generatorClass="native"/>
+			</hj:id>
+
+			<!-- Attributes -->
+
+			<jaxb:bindings node="xs:attribute[@name='quantity']">
+				<hj:simpleSingleProperty>
+					<hj:column name="quantity"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+
+			<!-- Elements -->
+						
+			<jaxb:bindings node="xs:sequence/xs:element[@name='recipe']">
+				<hj:complexSingleProperty>
+					<hj:many-to-one foreign-key="mealrecipe_recipe_fk"
+							 insert="true" update="true" cascade="none">
+						<hj:column name="recipeid"/>
+					</hj:many-to-one>
+				</hj:complexSingleProperty>	
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:sequence/xs:element[@name='course']">
+				<hj:complexSingleProperty>
+					<hj:many-to-one foreign-key="mealrecipe_course_fk"
+							 insert="true" update="true" cascade="none">
+						<hj:column name="courseid"/>
+					</hj:many-to-one>
+				</hj:complexSingleProperty>	
+			</jaxb:bindings>
+			
+		</jaxb:bindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='prep-time']">
+			<hj:class>
+				<hj:table name="preptime"/>
+				<hj:cache usage="read-write"/>
+				<hj:discriminator formula="'magoffin.matt.ieat.domain.PrepTime'"> 
+					<hj:no-column/> 
+				</hj:discriminator>
+			</hj:class>
+
+			<!-- Primary Key -->
+			
+			<jaxb:bindings node="xs:simpleContent/xs:extension/xs:attribute[@name='prepTimeId']">
+				<hj:id unsaved-value="null">
+					<hj:column name="preptimeid" not-null="true"/>
+					<hj:generator generatorClass="native">
+						<hj:param name="sequence" value="hibernate_integer_seq"/>
+					</hj:generator>
+				</hj:id>
+			</jaxb:bindings>
+			
+		</jaxb:bindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='recipe']">
+			<hj:class>
+				<hj:table name="recipe"/>
+				<hj:cache usage="read-write"/>
+				<hj:discriminator formula="'magoffin.matt.ieat.domain.Recipe'"> 
+					<hj:no-column/> 
+				</hj:discriminator>
+			</hj:class>
+
+			<!-- Primary Key -->
+			
+			<jaxb:bindings node="xs:attribute[@name='recipeId']">
+				<hj:id unsaved-value="null">
+					<hj:column name="recipeid" not-null="true"/>
+					<hj:generator generatorClass="native"/>
+				</hj:id>
+			</jaxb:bindings>
+			
+			<!-- Attributes -->
+
+			<jaxb:bindings node="xs:attribute[@name='servingSize']">
+				<hj:simpleSingleProperty>
+					<hj:column name="servingsize" not-null="true"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+
+			<jaxb:bindings node="xs:attribute[@name='createdDate']">
+				<hj:simpleSingleProperty>
+					<hj:column name="createddate"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+
+			<jaxb:bindings node="xs:attribute[@name='modifiedDate']">
+				<hj:simpleSingleProperty>
+					<hj:column name="modifieddate"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+
+			<!-- Elements -->
+						
+			<jaxb:bindings node="xs:sequence/xs:element[@name='base']">
+				<hj:complexSingleProperty>
+					<hj:many-to-one foreign-key="recipe_base_fk"
+							  insert="true" update="true" cascade="none">
+						<hj:column name="baseid"/>
+					</hj:many-to-one>
+				</hj:complexSingleProperty>	
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:sequence/xs:element[@name='comment']">
+				<hj:complexCollectionProperty lazy="false">
+					<hj:cache usage="read-write"/>
+					<hj:key foreign-key="recipecomment_recipe_fk">
+						<hj:column name="recipeid"/>
+					</hj:key>
+					<hj:list-index> 
+						<hj:column name="pos"/> 
+					</hj:list-index>
+					<hj:one-to-many/>
+				</hj:complexCollectionProperty>	
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:sequence/xs:element[@name='course']">
+				<hj:complexSingleProperty>
+					<hj:many-to-one foreign-key="recipe_course_fk"
+							   insert="true" update="true" cascade="none">
+						<hj:column name="courseid"/>
+					</hj:many-to-one>
+				</hj:complexSingleProperty>	
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:sequence/xs:element[@name='difficulty']">
+				<hj:complexSingleProperty>
+					<hj:many-to-one foreign-key="recipe_difficulty_fk"
+							   insert="true" update="true" cascade="none">
+						<hj:column name="difficultyid"/>
+					</hj:many-to-one>
+				</hj:complexSingleProperty>	
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:sequence/xs:element[@name='directions']">
+				<hj:simpleSingleProperty>
+					<hj:column name="directions"/>
+					<hj:type name="text"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:sequence/xs:element[@name='ethnicity']">
+				<hj:complexSingleProperty>
+					<hj:many-to-one foreign-key="recipe_ethnicity_fk"
+							   insert="true" update="true" cascade="none">
+						<hj:column name="ethnicityid"/>
+					</hj:many-to-one>
+				</hj:complexSingleProperty>	
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:sequence/xs:element[@name='excerpt']">
+				<hj:simpleSingleProperty>
+					<hj:column name="excerpt"/>
+					<hj:type name="text"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:sequence/xs:element[@name='image']">
+				<hj:simpleSingleProperty>
+					<hj:column name="image" length="255"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:sequence/xs:element[@name='ingredient']">
+				<hj:complexCollectionProperty lazy="false">
+					<hj:cache usage="read-write"/>
+					<hj:key foreign-key="recipeingredient_recipe_fk">
+						<hj:column name="recipeid"/>
+					</hj:key>
+					<hj:list-index> 
+						<hj:column name="pos"/> 
+					</hj:list-index>
+					<hj:one-to-many/>
+				</hj:complexCollectionProperty>	
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:sequence/xs:element[@name='name']">
+				<hj:simpleSingleProperty>
+					<hj:column name="recipe_name" length="128" not-null="true"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:sequence/xs:element[@name='owner']">
+				<hj:complexSingleProperty>
+					<hj:many-to-one foreign-key="recipe_user_fk"
+							   insert="true" update="false" cascade="none">
+						<hj:column name="ownerid"/>
+					</hj:many-to-one>
+				</hj:complexSingleProperty>	
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:sequence/xs:element[@name='prep-time']">
+				<hj:complexSingleProperty>
+					<hj:many-to-one foreign-key="recipe_preptime_fk"
+							   insert="true" update="true" cascade="none">
+						<hj:column name="preptimeid"/>
+					</hj:many-to-one>
+				</hj:complexSingleProperty>	
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:sequence/xs:element[@name='rating']">
+				<hj:complexCollectionProperty lazy="false">
+					<hj:cache usage="read-write"/>
+					<hj:key foreign-key="reciperating_recipe_fk">
+						<hj:column name="recipeid"/>
+					</hj:key>
+					<hj:list-index> 
+						<hj:column name="pos"/> 
+					</hj:list-index>
+					<hj:one-to-many/>
+				</hj:complexCollectionProperty>	
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:sequence/xs:element[@name='related-recipe']">
+				<hj:complexCollectionProperty lazy="false">
+					<hj:cache usage="read-write"/>
+					<hj:key foreign-key="relatedrecipe_recipe_fk">
+						<hj:column name="recipeid"/>
+					</hj:key>
+					<hj:list-index> 
+						<hj:column name="pos"/> 
+					</hj:list-index>
+					<hj:one-to-many/>
+				</hj:complexCollectionProperty>	
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:sequence/xs:element[@name='source']">
+				<hj:simpleSingleProperty>
+					<hj:column name="source" length="128"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:sequence/xs:element[@name='step']">
+				<hj:complexCollectionProperty lazy="false">
+					<hj:cache usage="read-write"/>
+					<hj:key foreign-key="recipestep_recipe_fk">
+						<hj:column name="recipeid"/>
+					</hj:key>
+					<hj:list-index> 
+						<hj:column name="pos"/> 
+					</hj:list-index>
+					<hj:one-to-many/>
+				</hj:complexCollectionProperty>	
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:sequence/xs:element[@name='system']">
+				<hj:complexSingleProperty>
+					<hj:many-to-one foreign-key="recipe_system_fk"
+							   insert="true" update="true" cascade="none">
+						<hj:column name="systemid"/>
+					</hj:many-to-one>
+				</hj:complexSingleProperty>	
+			</jaxb:bindings>
+			
+		</jaxb:bindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='recipe-comment']">
+			<hj:class>
+				<hj:table name="recipecomment"/>
+				<hj:cache usage="read-write"/>
+				<hj:discriminator formula="'magoffin.matt.ieat.domain.RecipeComment'"> 
+					<hj:no-column/> 
+				</hj:discriminator>
+				<hj:key foreign-key="recipecomment_recipe_fk"/>
+			</hj:class>
+
+			<!-- Primary Key -->
+			
+			<jaxb:bindings node="xs:simpleContent/xs:extension/xs:attribute[@name='commentId']">
+				<hj:id unsaved-value="null">
+					<hj:column name="commentid" not-null="true"/>
+					<hj:generator generatorClass="native">
+						<hj:param name="sequence" value="hibernate_integer_seq"/>
+					</hj:generator>
+				</hj:id>
+			</jaxb:bindings>
+			
+			<!-- Attributes -->
+
+			<jaxb:bindings node="xs:simpleContent/xs:extension/xs:attribute[@name='createdDate']">
+				<hj:simpleSingleProperty>
+					<hj:column name="createddate" not-null="true"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:simpleContent/xs:extension/xs:attribute[@name='userId']">
+				<hj:simpleSingleProperty>
+					<hj:column name="userid" not-null="true"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+		</jaxb:bindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='recipe-ingredient']">
+			<hj:class>
+				<hj:table name="recipeingredient"/>
+				<hj:cache usage="read-write"/>
+				<hj:discriminator formula="'magoffin.matt.ieat.domain.RecipeIngredient'"> 
+					<hj:no-column/> 
+				</hj:discriminator>
+				<hj:key foreign-key="recipeingredient_recipe_fk"/>
+			</hj:class>
+
+			<!-- Primary Key -->
+
+			<hj:id unsaved-value="null">
+				<hj:column name="recipeingredientid" not-null="true"/>
+				<hj:generator generatorClass="native"/>
+			</hj:id>
+
+			
+			<!-- Attributes -->
+
+			<jaxb:bindings node="xs:attribute[@name='optional']">
+				<hj:simpleSingleProperty>
+					<hj:column name="optional" not-null="true"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:attribute[@name='quantity']">
+				<hj:simpleSingleProperty>
+					<hj:column name="quantity" not-null="true"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:attribute[@name='qualifier']">
+				<hj:simpleSingleProperty>
+					<hj:column name="qualifier" length="255"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+			<!-- Elements -->
+						
+			<jaxb:bindings node="xs:sequence/xs:element[@name='ingredient']">
+				<hj:complexSingleProperty>
+					<hj:many-to-one foreign-key="recipeingredient_ingredient_fk"
+							  insert="true" update="true" cascade="none">
+						<hj:column name="ingredientid"/>
+					</hj:many-to-one>
+				</hj:complexSingleProperty>	
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:sequence/xs:element[@name='recipe']">
+				<hj:complexSingleProperty>
+					<hj:many-to-one foreign-key="recipeingredient_ingredientrecipe_fk"
+							  insert="true" update="true" cascade="none">
+						<hj:column name="ingredientrecipeid"/>
+					</hj:many-to-one>
+				</hj:complexSingleProperty>	
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:sequence/xs:element[@name='unit']">
+				<hj:complexSingleProperty>
+					<hj:many-to-one foreign-key="recipeingredient_unit_fk"
+							  insert="true" update="true" cascade="none">
+						<hj:column name="unitid"/>
+					</hj:many-to-one>
+				</hj:complexSingleProperty>	
+			</jaxb:bindings>
+			
+		</jaxb:bindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='recipe-rating']">
+			<hj:class>
+				<hj:table name="reciperating"/>
+				<hj:cache usage="read-write"/>
+				<hj:discriminator formula="'magoffin.matt.ieat.domain.RecipeRating'"> 
+					<hj:no-column/> 
+				</hj:discriminator>
+				<hj:key foreign-key="reciperating_recipe_fk"/>
+			</hj:class>
+
+			<!-- Primary Key -->
+
+			<jaxb:bindings node="xs:attribute[@name='ratingId']">
+				<hj:id unsaved-value="null">
+					<hj:column name="ratingid" not-null="true"/>
+					<hj:generator generatorClass="native"/>
+				</hj:id>
+			</jaxb:bindings>
+			
+			<!-- Attributes -->
+
+			<jaxb:bindings node="xs:attribute[@name='createdDate']">
+				<hj:simpleSingleProperty>
+					<hj:column name="createddate" not-null="true"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:attribute[@name='rating']">
+				<hj:simpleSingleProperty>
+					<hj:column name="rating" not-null="true"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:attribute[@name='userId']">
+				<hj:simpleSingleProperty>
+					<hj:column name="userid" not-null="true"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+		</jaxb:bindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='recipe-step']">
+			<hj:class>
+				<hj:table name="recipestep"/>
+				<hj:cache usage="read-write"/>
+				<hj:discriminator formula="'magoffin.matt.ieat.domain.RecipeStep'"> 
+					<hj:no-column/> 
+				</hj:discriminator>
+				<hj:key foreign-key="recipestep_recipe_fk"/>
+			</hj:class>
+
+			<!-- Primary Key -->
+
+			<hj:id unsaved-value="null">
+				<hj:column name="stepid" not-null="true"/>
+				<hj:generator generatorClass="native"/>
+			</hj:id>
+			
+		</jaxb:bindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='related-recipe']">
+			<hj:class>
+				<hj:table name="relatedrecipe"/>
+				<hj:cache usage="read-write"/>
+				<hj:discriminator formula="'magoffin.matt.ieat.domain.RelatedRecipe'"> 
+					<hj:no-column/> 
+				</hj:discriminator>
+			</hj:class>
+			
+			<!-- Primary Key -->
+
+			<hj:id unsaved-value="null">
+				<hj:column name="relatedrecipeid" not-null="true"/>
+				<hj:generator generatorClass="native"/>
+			</hj:id>
+
+			<!-- Elements -->
+						
+			<jaxb:bindings node="xs:sequence/xs:element[@name='kind']">
+				<hj:complexSingleProperty>
+					<hj:many-to-one foreign-key="relatedrecipe_relationkind_fk"
+							 insert="true" update="true" cascade="none">
+						<hj:column name="relationkindid"/>
+					</hj:many-to-one>
+				</hj:complexSingleProperty>	
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:sequence/xs:element[@name='recipe']">
+				<hj:complexSingleProperty>
+					<hj:many-to-one foreign-key="relatedrecipe_recipe_fk"
+							 insert="true" update="true" cascade="none">
+						<hj:column name="recipeid"/>
+					</hj:many-to-one>
+				</hj:complexSingleProperty>	
+			</jaxb:bindings>
+			
+		</jaxb:bindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='relation-kind']">
+			<hj:class>
+				<hj:table name="relationkind"/>
+				<hj:cache usage="read-write"/>
+				<hj:discriminator formula="'magoffin.matt.ieat.domain.RelationKind'"> 
+					<hj:no-column/> 
+				</hj:discriminator>
+			</hj:class>
+
+			<!-- Primary Key -->
+			
+			<jaxb:bindings node="xs:simpleContent/xs:extension/xs:attribute[@name='relationKindId']">
+				<hj:id unsaved-value="null">
+					<hj:column name="relationkindid" not-null="true"/>
+					<hj:generator generatorClass="native">
+						<hj:param name="sequence" value="hibernate_integer_seq"/>
+					</hj:generator>
+				</hj:id>
+			</jaxb:bindings>
+			
+		</jaxb:bindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='system']">
+			<hj:class>
+				<hj:table name="measurement_system"/>
+				<hj:cache usage="read-write"/>
+				<hj:discriminator formula="'magoffin.matt.ieat.domain.System'"> 
+					<hj:no-column/> 
+				</hj:discriminator>
+			</hj:class>
+
+			<!-- Primary Key -->
+			
+			<jaxb:bindings node="xs:simpleContent/xs:extension/xs:attribute[@name='systemId']">
+				<hj:id unsaved-value="null">
+					<hj:column name="systemid" not-null="true"/>
+					<hj:generator generatorClass="native">
+						<hj:param name="sequence" value="hibernate_integer_seq"/>
+					</hj:generator>
+				</hj:id>
+			</jaxb:bindings>
+			
+		</jaxb:bindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='unit']">
+			<hj:class>
+				<hj:table name="unit"/>
+				<hj:cache usage="read-write"/>
+				<hj:discriminator formula="'magoffin.matt.ieat.domain.Unit'"> 
+					<hj:no-column/> 
+				</hj:discriminator>
+			</hj:class>
+
+			<!-- Primary Key -->
+			
+			<jaxb:bindings node="xs:simpleContent/xs:extension/xs:attribute[@name='unitId']">
+				<hj:id unsaved-value="null">
+					<hj:column name="unitid" not-null="true"/>
+					<hj:generator generatorClass="native">
+						<hj:param name="sequence" value="hibernate_integer_seq"/>
+					</hj:generator>
+				</hj:id>
+			</jaxb:bindings>
+			
+			<!-- Attributes -->
+			
+			<jaxb:bindings node="xs:simpleContent/xs:extension/xs:attribute[@name='abbreviation']">
+				<hj:simpleSingleProperty>
+					<hj:column name="abbreviation" not-null="true" length="8"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:simpleContent/xs:extension/xs:attribute[@name='mass']">
+				<hj:simpleSingleProperty>
+					<hj:column name="mass" not-null="true"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:simpleContent/xs:extension/xs:attribute[@name='systemId']">
+				<hj:simpleSingleProperty>
+					<hj:column name="systemid"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:simpleContent/xs:extension/xs:attribute[@name='toImperial']">
+				<hj:simpleSingleProperty>
+					<hj:column name="toimperial"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:simpleContent/xs:extension/xs:attribute[@name='toMetric']">
+				<hj:simpleSingleProperty>
+					<hj:column name="tometric"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:simpleContent/xs:extension/xs:attribute[@name='toUS']">
+				<hj:simpleSingleProperty>
+					<hj:column name="tous"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+		</jaxb:bindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='user']">
+			<hj:class>
+				<hj:table name="users"/>
+				<hj:cache usage="read-write"/>
+				<hj:discriminator formula="'magoffin.matt.ieat.domain.User'"> 
+					<hj:no-column/> 
+				</hj:discriminator>
+			</hj:class>
+
+			<!-- Primary Key -->
+			
+			<jaxb:bindings node="xs:attribute[@name='userId']">
+				<hj:id unsaved-value="null">
+					<hj:column name="userid" not-null="true"/>
+					<hj:generator generatorClass="native">
+						<hj:param name="sequence" value="hibernate_integer_seq"/>
+					</hj:generator>
+				</hj:id>
+			</jaxb:bindings>
+			
+			<!-- Attributes -->
+			
+			<jaxb:bindings node="xs:attribute[@name='accessLevel']">
+				<hj:simpleSingleProperty>
+					<hj:column name="accesslevel"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:attribute[@name='country']">
+				<hj:simpleSingleProperty>
+					<hj:column name="country" not-null="true" length="3"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:attribute[@name='createdDate']">
+				<hj:simpleSingleProperty>
+					<hj:column name="createddate" not-null="true"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:attribute[@name='language']">
+				<hj:simpleSingleProperty>
+					<hj:column name="language" not-null="true" length="3"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:attribute[@name='lastLoginDate']">
+				<hj:simpleSingleProperty>
+					<hj:column name="lastlogindate"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:attribute[@name='login']">
+				<hj:simpleSingleProperty>
+					<hj:column name="login" not-null="true" length="32"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+			<!-- Elements -->
+			
+			<jaxb:bindings node="xs:sequence/xs:element[@name='email']">
+				<hj:simpleSingleProperty>
+					<hj:column name="email" length="128" not-null="true"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:sequence/xs:element[@name='name']">
+				<hj:simpleSingleProperty>
+					<hj:column name="user_name" length="64" not-null="true"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+			<jaxb:bindings node="xs:sequence/xs:element[@name='password']">
+				<hj:simpleSingleProperty>
+					<hj:column name="password" length="64" not-null="true"/>
+				</hj:simpleSingleProperty>
+			</jaxb:bindings>
+			
+		</jaxb:bindings>
+		
+	</jaxb:bindings>
+	
+	<jaxb:bindings schemaLocation="ui.xsd" node="/xs:schema">
+		
+		<jaxb:bindings node="xs:complexType[@name='advanced-search-criteria']">
+			<hj:ignored/>
+		</jaxb:bindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='recipe-search-criteria']">
+			<hj:ignored/>
+		</jaxb:bindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='ui-base']">
+			<hj:ignored/>
+		</jaxb:bindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='ui-data']">
+			<hj:ignored/>
+		</jaxb:bindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='ui-edit']">
+			<hj:ignored/>
+		</jaxb:bindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='ui-index']">
+			<hj:ignored/>
+			<jaxb:bindings node="xs:sequence/xs:element[@name='index-section']/xs:complexType">
+				<hj:ignored/>
+			</jaxb:bindings>
+		</jaxb:bindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='ui-ingredient-match']">
+			<hj:ignored/>
+		</jaxb:bindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='ui-meta-support']">
+			<hj:ignored/>
+		</jaxb:bindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='ui-pagination-support']">
+			<hj:ignored/>
+		</jaxb:bindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='ui-parameter']">
+			<hj:ignored/>
+		</jaxb:bindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='ui-recipe-match']">
+			<hj:ignored/>
+		</jaxb:bindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='ui-search-results']">
+			<hj:ignored/>
+		</jaxb:bindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='ui-session-data']">
+			<hj:ignored/>
+		</jaxb:bindings>
+		
+		<jaxb:bindings node="xs:complexType[@name='ui-user-match']">
+			<hj:ignored/>
+		</jaxb:bindings>
+		
+	</jaxb:bindings>
+	
+</jaxb:bindings>

+ 202 - 0
defs/schema/core.xsd

@@ -0,0 +1,202 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<schema
+	xmlns="http://www.w3.org/2001/XMLSchema"
+	xml:lang="EN"
+	targetNamespace="http://msqr.us/xsd/ieat"
+	jaxb:version="1.0"
+	xmlns:eat="http://msqr.us/xsd/ieat"
+	xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+	xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
+	jaxb:extensionBindingPrefixes="xjc"
+	xmlns:xs="http://www.w3.org/2001/XMLSchema"
+	elementFormDefault="qualified"
+	attributeFormDefault="unqualified">
+    
+	<complexType name="base">
+		<simpleContent>
+			<extension base="string">
+				<attribute name="baseId" type="int"/>
+			</extension>
+		</simpleContent>
+	</complexType>
+
+	<complexType name="course">
+		<simpleContent>
+			<extension base="string">
+				<attribute name="courseId" type="int"/>
+			</extension>
+		</simpleContent>
+	</complexType>
+
+	<complexType name="difficulty">
+		<simpleContent>
+			<extension base="string">
+				<attribute name="difficultyId" type="int"/>
+			</extension>
+		</simpleContent>
+	</complexType>
+
+	<complexType name="ethnicity">
+		<simpleContent>
+			<extension base="string">
+				<attribute name="ethnicityId" type="int"/>
+			</extension>
+		</simpleContent>
+	</complexType>
+
+	<complexType name="ingredient">
+		<sequence>
+			<element name="name" type="string"/>
+			<element name="description" type="string" minOccurs="0"/>
+		</sequence>
+		<attribute name="ingredientId" type="int"/>
+	</complexType>
+
+	<complexType name="meal">
+		<sequence>
+			<element name="name" type="string"/>
+			<element name="recipe" type="eat:meal-recipe" maxOccurs="unbounded"/>
+			<element name="owner" type="eat:user" minOccurs="0"/>
+		</sequence>
+		<attribute name="mealId" type="long"/>
+	</complexType>
+	
+	<complexType name="meal-recipe">
+		<sequence>
+			<element name="recipe" type="eat:recipe"/>
+			<element name="course" type="eat:course"/>
+		</sequence>
+		<attribute name="quantity" type="double" use="optional" default="1.0"/>
+	</complexType>
+	
+	<complexType name="prep-time">
+		<simpleContent>
+			<extension base="string">
+				<attribute name="prepTimeId" type="int"/>
+			</extension>
+		</simpleContent>
+	</complexType>
+
+	<complexType name="recipe">
+		<sequence>
+			<element name="name" type="string"/>
+			<element name="excerpt" type="string" minOccurs="0"/>
+			<element name="source" type="string" minOccurs="0"/>
+			<element name="directions" type="string" minOccurs="0"/>
+			<element name="image" type="string" minOccurs="0">
+				<annotation>
+					<documentation>
+						The URL of an image file to display with the recipe.
+					</documentation>
+				</annotation>
+			</element>
+			<element name="base" type="eat:base" minOccurs="0"/>
+			<element name="course" type="eat:course" minOccurs="0"/>
+			<element name="ethnicity" type="eat:ethnicity" minOccurs="0"/>
+			<element name="difficulty" type="eat:difficulty" minOccurs="0"/>
+			<element name="owner" type="eat:user" minOccurs="0"/>
+			<element name="prep-time" type="eat:prep-time" minOccurs="0"/>
+			<element name="system" type="eat:system"/>
+			<element name="ingredient" type="eat:recipe-ingredient" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="related-recipe" type="eat:related-recipe" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="step" type="eat:recipe-step" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="comment" type="eat:recipe-comment" minOccurs="0" maxOccurs="unbounded"/>
+			<element name="rating" type="eat:recipe-rating" minOccurs="0" maxOccurs="unbounded"/>
+		</sequence>
+		<attribute name="recipeId" type="long"/>
+		<attribute name="servingSize" type="int"/>
+		<attribute name="createdDate" type="dateTime"/>
+		<attribute name="modifiedDate" type="dateTime" use="optional"/>
+	</complexType>
+	
+	<complexType name="recipe-comment">
+		<simpleContent>
+			<extension base="string">
+				<attribute name="commentId" type="long"/>
+				<attribute name="createdDate" type="dateTime"/>
+				<attribute name="userId" type="int"/>
+			</extension>
+		</simpleContent>
+	</complexType>
+	
+	<complexType name="recipe-ingredient">
+		<sequence>
+			<element name="unit" type="eat:unit" minOccurs="0"/>
+			<!-- Removing choice for backwards compatibility with HJAXB1 -->
+			<!--choice minOccurs="1" maxOccurs="1"-->
+				<element name="ingredient" type="eat:ingredient" minOccurs="0"/>
+				<element name="recipe" type="eat:recipe" minOccurs="0"/>
+			<!--/choice-->
+		</sequence>
+		<attribute name="quantity" type="double"/>
+		<attribute name="qualifier" type="string" use="optional"/>
+		<attribute name="optional" type="boolean"/>
+	</complexType>
+
+	<complexType name="recipe-rating">
+		<attribute name="ratingId" type="long"/>
+		<attribute name="rating" type="short"/>
+		<attribute name="createdDate" type="dateTime"/>
+		<attribute name="userId" type="int"/>
+	</complexType>
+	
+	<complexType name="recipe-step">
+		<simpleContent>
+			<extension base="string"/>
+		</simpleContent>
+	</complexType>
+
+	<complexType name="related-recipe">
+		<sequence>
+			<element name="kind" type="eat:relation-kind"/>
+			<element name="recipe" type="eat:recipe"/>
+		</sequence>
+	</complexType>
+
+	<complexType name="relation-kind">
+		<simpleContent>
+			<extension base="string">
+				<attribute name="relationKindId" type="int"/>
+			</extension>
+		</simpleContent>
+	</complexType>
+
+	<complexType name="system">
+		<simpleContent>
+			<extension base="string">
+				<attribute name="systemId" type="int"/>
+			</extension>
+		</simpleContent>
+	</complexType>
+
+	<complexType name="unit">
+		<simpleContent>
+			<extension base="string">
+				<attribute name="unitId" type="int"/>
+				<attribute name="abbreviation" type="string"/>
+				<attribute name="systemId" type="int"/>
+				<attribute name="toMetric" type="double" use="optional"/>
+				<attribute name="toImperial" type="double" use="optional"/>
+				<attribute name="toUS" type="double" use="optional"/>
+				<attribute name="mass" type="boolean" use="optional" default="false"/>
+			</extension>
+		</simpleContent>
+	</complexType>
+
+	<complexType name="user">
+		<sequence>
+			<element name="name" type="string"/>
+			<element name="email" type="string"/>
+			<element name="password" type="string"/>
+		</sequence>
+		<attribute name="accessLevel" type="int"/>
+		<attribute name="country" type="string"/>
+		<attribute name="createdDate" type="dateTime"/>
+		<attribute name="userId" type="int"/>
+		<attribute name="language" type="string"/>
+		<attribute name="lastLoginDate" type="dateTime"/>
+		<attribute name="login" type="string"/>
+	</complexType>
+	
+</schema>

+ 51 - 0
defs/schema/hbm/magoffin/matt/ieat/domain/impl/BaseImpl.hbm.xml

@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 2.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
+
+<hibernate-mapping
+        auto-import="false"
+>
+    <class
+        name="magoffin.matt.ieat.domain.impl.BaseImpl"
+        table="Base"
+    >
+        <cache usage="read-write" />
+
+        <id
+            name="baseId"
+            column="baseId"
+            type="java.lang.Integer"
+            unsaved-value="null"
+        >
+            <generator class="native">
+                <param name="sequence">base_id_seq</param>
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-BaseImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <property
+            name="value"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="value"
+            length="64"
+            not-null="true"
+            unique="true"
+        />
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-BaseImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

+ 51 - 0
defs/schema/hbm/magoffin/matt/ieat/domain/impl/CourseImpl.hbm.xml

@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 2.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
+
+<hibernate-mapping
+        auto-import="false"
+>
+    <class
+        name="magoffin.matt.ieat.domain.impl.CourseImpl"
+        table="Course"
+    >
+        <cache usage="read-write" />
+
+        <id
+            name="courseId"
+            column="courseId"
+            type="java.lang.Integer"
+            unsaved-value="null"
+        >
+            <generator class="native">
+                <param name="sequence">course_id_seq</param>
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-CourseImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <property
+            name="value"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="value"
+            length="64"
+            not-null="true"
+            unique="true"
+        />
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-CourseImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

+ 51 - 0
defs/schema/hbm/magoffin/matt/ieat/domain/impl/DifficultyImpl.hbm.xml

@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 2.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
+
+<hibernate-mapping
+        auto-import="false"
+>
+    <class
+        name="magoffin.matt.ieat.domain.impl.DifficultyImpl"
+        table="Difficulty"
+    >
+        <cache usage="read-write" />
+
+        <id
+            name="difficultyId"
+            column="difficultyId"
+            type="java.lang.Integer"
+            unsaved-value="null"
+        >
+            <generator class="native">
+                <param name="sequence">difficulty_id_seq</param>
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-DifficultyImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <property
+            name="value"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="value"
+            length="64"
+            not-null="true"
+            unique="true"
+        />
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-DifficultyImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

+ 51 - 0
defs/schema/hbm/magoffin/matt/ieat/domain/impl/EthnicityImpl.hbm.xml

@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 2.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
+
+<hibernate-mapping
+        auto-import="false"
+>
+    <class
+        name="magoffin.matt.ieat.domain.impl.EthnicityImpl"
+        table="Ethnicity"
+    >
+        <cache usage="read-write" />
+
+        <id
+            name="ethnicityId"
+            column="ethnicityId"
+            type="java.lang.Integer"
+            unsaved-value="null"
+        >
+            <generator class="native">
+                <param name="sequence">ethnicity_id_seq</param>
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-EthnicityImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <property
+            name="value"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="value"
+            length="64"
+            not-null="true"
+            unique="true"
+        />
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-EthnicityImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

+ 58 - 0
defs/schema/hbm/magoffin/matt/ieat/domain/impl/IngredientImpl.hbm.xml

@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 2.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
+
+<hibernate-mapping
+        auto-import="false"
+>
+    <class
+        name="magoffin.matt.ieat.domain.impl.IngredientImpl"
+        table="Ingredient"
+    >
+        <cache usage="read-write" />
+
+        <id
+            name="ingredientId"
+            column="ingredientId"
+            type="java.lang.Integer"
+            unsaved-value="null"
+        >
+            <generator class="native">
+                <param name="sequence">ingredient_id_seq</param>
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-IngredientImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <property
+            name="description"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="description"
+            length="512"
+        />
+
+        <property
+            name="name"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="name"
+            length="128"
+        />
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-IngredientImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

+ 83 - 0
defs/schema/hbm/magoffin/matt/ieat/domain/impl/MealImpl.hbm.xml

@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 2.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
+
+<hibernate-mapping
+        auto-import="false"
+>
+    <class
+        name="magoffin.matt.ieat.domain.impl.MealImpl"
+        table="Meal"
+    >
+        <cache usage="read-write" />
+
+        <id
+            name="mealId"
+            column="mealId"
+            type="java.lang.Integer"
+            unsaved-value="null"
+        >
+            <generator class="native">
+                <param name="sequence">meal_id_seq</param>
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-MealImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <many-to-one
+            name="owner"
+            class="magoffin.matt.ieat.domain.impl.UserImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="owner"
+        />
+
+        <property
+            name="name"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="name"
+            length="128"
+            not-null="true"
+        />
+
+        <list
+            name="recipeInternal"
+            table="Meal_RecipeInternal"
+            lazy="false"
+            cascade="all-delete-orphan"
+            where="RecipeInternal_index is not null"
+        >
+
+            <key
+                column="MealImpl_id"
+            >
+            </key>
+
+            <index
+                column="RecipeInternal_index"
+            />
+
+            <one-to-many
+                  class="magoffin.matt.ieat.domain.impl.MealRecipeImpl"
+            />
+
+        </list>
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-MealImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

+ 69 - 0
defs/schema/hbm/magoffin/matt/ieat/domain/impl/MealRecipeImpl.hbm.xml

@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 2.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
+
+<hibernate-mapping
+        auto-import="false"
+>
+    <class
+        name="magoffin.matt.ieat.domain.impl.MealRecipeImpl"
+        table="MealRecipe"
+    >
+        <cache usage="read-write" />
+
+        <id
+            name="idInternal"
+            column="idInternal"
+            type="java.lang.String"
+            length="32"
+            unsaved-value="null"
+        >
+            <generator class="uuid.hex">
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-MealRecipeImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <many-to-one
+            name="recipe"
+            class="magoffin.matt.ieat.domain.impl.RecipeImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="recipe"
+        />
+
+        <many-to-one
+            name="course"
+            class="magoffin.matt.ieat.domain.impl.CourseImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="course"
+        />
+
+        <property
+            name="quantity"
+            type="double"
+            update="true"
+            insert="true"
+            column="quantity"
+            not-null="true"
+        />
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-MealRecipeImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

+ 51 - 0
defs/schema/hbm/magoffin/matt/ieat/domain/impl/PrepTimeImpl.hbm.xml

@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 2.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
+
+<hibernate-mapping
+        auto-import="false"
+>
+    <class
+        name="magoffin.matt.ieat.domain.impl.PrepTimeImpl"
+        table="PrepTime"
+    >
+        <cache usage="read-write" />
+
+        <id
+            name="prepTimeId"
+            column="prepTimeId"
+            type="java.lang.Integer"
+            unsaved-value="null"
+        >
+            <generator class="native">
+                <param name="sequence">prep_time_id_seq</param>
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-PrepTimeImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <property
+            name="value"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="value"
+            length="64"
+            not-null="true"
+            unique="true"
+        />
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-PrepTimeImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

+ 67 - 0
defs/schema/hbm/magoffin/matt/ieat/domain/impl/RecipeCommentImpl.hbm.xml

@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 2.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
+
+<hibernate-mapping
+        auto-import="false"
+>
+    <class
+        name="magoffin.matt.ieat.domain.impl.RecipeCommentImpl"
+        table="RecipeComment"
+    >
+        <cache usage="read-write" />
+
+        <id
+            name="commentId"
+            column="commentId"
+            type="java.lang.Integer"
+            unsaved-value="null"
+        >
+            <generator class="native">
+                <param name="sequence">recipe_comment_id_seq</param>
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-RecipeCommentImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <property
+            name="value"
+            type="text"
+            update="true"
+            insert="true"
+            column="value"
+            not-null="true"
+        />
+
+        <property
+            name="userId"
+            type="java.lang.Integer"
+            update="true"
+            insert="true"
+            column="userId"
+            not-null="true"
+        />
+
+        <property
+            name="createdDate"
+            type="java.util.Calendar"
+            update="true"
+            insert="true"
+            column="createdDate"
+            not-null="true"
+        />
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-RecipeCommentImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

+ 296 - 0
defs/schema/hbm/magoffin/matt/ieat/domain/impl/RecipeImpl.hbm.xml

@@ -0,0 +1,296 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 2.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
+
+<hibernate-mapping
+        auto-import="false"
+>
+    <class
+        name="magoffin.matt.ieat.domain.impl.RecipeImpl"
+        table="Recipe"
+    >
+        <cache usage="read-write" />
+
+        <id
+            name="recipeId"
+            column="recipeId"
+            type="java.lang.Integer"
+            unsaved-value="null"
+        >
+            <generator class="native">
+                <param name="sequence">recipe_id_seq</param>
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-RecipeImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <many-to-one
+            name="owner"
+            class="magoffin.matt.ieat.domain.impl.UserImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="owner"
+        />
+
+        <property
+            name="image"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="image"
+            length="255"
+        />
+
+        <property
+            name="excerpt"
+            type="text"
+            update="true"
+            insert="true"
+            column="excerpt"
+            not-null="true"
+        />
+
+        <property
+            name="source"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="source"
+            length="64"
+        />
+
+        <many-to-one
+            name="course"
+            class="magoffin.matt.ieat.domain.impl.CourseImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="course"
+        />
+
+        <many-to-one
+            name="system"
+            class="magoffin.matt.ieat.domain.impl.SystemImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="system"
+        />
+
+        <property
+            name="directions"
+            type="text"
+            update="true"
+            insert="true"
+            column="directions"
+        />
+
+        <many-to-one
+            name="base"
+            class="magoffin.matt.ieat.domain.impl.BaseImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="base"
+        />
+
+        <many-to-one
+            name="prepTime"
+            class="magoffin.matt.ieat.domain.impl.PrepTimeImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="prepTime"
+        />
+
+        <many-to-one
+            name="ethnicity"
+            class="magoffin.matt.ieat.domain.impl.EthnicityImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="ethnicity"
+        />
+
+        <property
+            name="createdDate"
+            type="java.util.Calendar"
+            update="true"
+            insert="true"
+            column="createdDate"
+            not-null="true"
+        />
+
+        <property
+            name="servingSize"
+            type="java.lang.Integer"
+            update="true"
+            insert="true"
+            column="servingSize"
+            not-null="true"
+        />
+
+        <property
+            name="name"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="name"
+            length="128"
+            not-null="true"
+        />
+
+        <property
+            name="modifiedDate"
+            type="java.util.Calendar"
+            update="true"
+            insert="true"
+            column="modifiedDate"
+        />
+
+        <many-to-one
+            name="difficulty"
+            class="magoffin.matt.ieat.domain.impl.DifficultyImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="difficulty"
+        />
+
+        <list
+            name="commentInternal"
+            table="Recipe_CommentInternal"
+            lazy="false"
+            cascade="all-delete-orphan"
+            where="CommentInternal_index is not null"
+        >
+
+            <key
+                column="RecipeImpl_id"
+            >
+            </key>
+
+            <index
+                column="CommentInternal_index"
+            />
+
+            <one-to-many
+                  class="magoffin.matt.ieat.domain.impl.RecipeCommentImpl"
+            />
+
+        </list>
+
+        <list
+            name="relatedRecipeInternal"
+            table="Recipe_RelatedRecipeInternal"
+            lazy="false"
+            cascade="all-delete-orphan"
+            where="RelatedRecipeInternal_index is not null"
+        >
+
+            <key
+                column="RecipeImpl_id"
+            >
+            </key>
+
+            <index
+                column="RelatedRecipeInternal_index"
+            />
+
+            <one-to-many
+                  class="magoffin.matt.ieat.domain.impl.RelatedRecipeImpl"
+            />
+
+        </list>
+
+        <list
+            name="stepInternal"
+            table="Recipe_StepInternal"
+            lazy="false"
+            cascade="all-delete-orphan"
+            where="StepInternal_index is not null"
+        >
+
+            <key
+                column="RecipeImpl_id"
+            >
+            </key>
+
+            <index
+                column="StepInternal_index"
+            />
+
+            <one-to-many
+                  class="magoffin.matt.ieat.domain.impl.RecipeStepImpl"
+            />
+
+        </list>
+
+        <list
+            name="ingredientInternal"
+            table="Recipe_IngredientInternal"
+            lazy="false"
+            cascade="all-delete-orphan"
+            where="IngredientInternal_index is not null"
+        >
+
+            <key
+                column="RecipeImpl_id"
+            >
+            </key>
+
+            <index
+                column="IngredientInternal_index"
+            />
+
+            <one-to-many
+                  class="magoffin.matt.ieat.domain.impl.RecipeIngredientImpl"
+            />
+
+        </list>
+
+        <list
+            name="ratingInternal"
+            table="Recipe_RatingInternal"
+            lazy="false"
+            cascade="all-delete-orphan"
+            where="RatingInternal_index is not null"
+        >
+
+            <key
+                column="RecipeImpl_id"
+            >
+            </key>
+
+            <index
+                column="RatingInternal_index"
+            />
+
+            <one-to-many
+                  class="magoffin.matt.ieat.domain.impl.RecipeRatingImpl"
+            />
+
+        </list>
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-RecipeImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

+ 97 - 0
defs/schema/hbm/magoffin/matt/ieat/domain/impl/RecipeIngredientImpl.hbm.xml

@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 2.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
+
+<hibernate-mapping
+        auto-import="false"
+>
+    <class
+        name="magoffin.matt.ieat.domain.impl.RecipeIngredientImpl"
+        table="RecipeIngredient"
+    >
+        <cache usage="read-write" />
+
+        <id
+            name="idInternal"
+            column="idInternal"
+            type="java.lang.String"
+            length="32"
+            unsaved-value="null"
+        >
+            <generator class="uuid.hex">
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-RecipeIngredientImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <many-to-one
+            name="ingredient"
+            class="magoffin.matt.ieat.domain.impl.IngredientImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="ingredient"
+        />
+
+        <many-to-one
+            name="unit"
+            class="magoffin.matt.ieat.domain.impl.UnitImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="unit"
+        />
+
+        <property
+            name="optional"
+            type="boolean"
+            update="true"
+            insert="true"
+            column="optional"
+            not-null="true"
+        />
+
+        <many-to-one
+            name="recipe"
+            class="magoffin.matt.ieat.domain.impl.RecipeImpl"
+            cascade="none"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="recipe"
+        />
+
+        <property
+            name="qualifier"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="qualifier"
+            length="255"
+        />
+
+        <property
+            name="quantity"
+            type="double"
+            update="true"
+            insert="true"
+            column="quantity"
+            not-null="true"
+        />
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-RecipeIngredientImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

+ 67 - 0
defs/schema/hbm/magoffin/matt/ieat/domain/impl/RecipeRatingImpl.hbm.xml

@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 2.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
+
+<hibernate-mapping
+        auto-import="false"
+>
+    <class
+        name="magoffin.matt.ieat.domain.impl.RecipeRatingImpl"
+        table="RecipeRating"
+    >
+        <cache usage="read-write" />
+
+        <id
+            name="ratingId"
+            column="ratingId"
+            type="java.lang.Integer"
+            unsaved-value="null"
+        >
+            <generator class="native">
+                <param name="sequence">recipe_rating_id_seq</param>
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-RecipeRatingImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <property
+            name="userId"
+            type="java.lang.Integer"
+            update="true"
+            insert="true"
+            column="userId"
+            not-null="true"
+        />
+
+        <property
+            name="createdDate"
+            type="java.util.Calendar"
+            update="true"
+            insert="true"
+            column="createdDate"
+            not-null="true"
+        />
+
+        <property
+            name="rating"
+            type="short"
+            update="true"
+            insert="true"
+            column="rating"
+            not-null="true"
+        />
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-RecipeRatingImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

+ 49 - 0
defs/schema/hbm/magoffin/matt/ieat/domain/impl/RecipeStepImpl.hbm.xml

@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 2.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
+
+<hibernate-mapping
+        auto-import="false"
+>
+    <class
+        name="magoffin.matt.ieat.domain.impl.RecipeStepImpl"
+        table="RecipeStep"
+    >
+        <cache usage="read-write" />
+
+        <id
+            name="idInternal"
+            column="idInternal"
+            type="java.lang.String"
+            length="32"
+            unsaved-value="null"
+        >
+            <generator class="uuid.hex">
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-RecipeStepImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <property
+            name="value"
+            type="text"
+            update="true"
+            insert="true"
+            column="value"
+            not-null="true"
+        />
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-RecipeStepImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

+ 60 - 0
defs/schema/hbm/magoffin/matt/ieat/domain/impl/RelatedRecipeImpl.hbm.xml

@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 2.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
+
+<hibernate-mapping
+        auto-import="false"
+>
+    <class
+        name="magoffin.matt.ieat.domain.impl.RelatedRecipeImpl"
+        table="RelatedRecipe"
+    >
+        <cache usage="read-write" />
+
+        <id
+            name="idInternal"
+            column="idInternal"
+            type="java.lang.String"
+            length="32"
+            unsaved-value="null"
+        >
+            <generator class="uuid.hex">
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-RelatedRecipeImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <many-to-one
+            name="kind"
+            class="magoffin.matt.ieat.domain.impl.RelationKindImpl"
+            cascade="all"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="kind"
+        />
+
+        <many-to-one
+            name="recipe"
+            class="magoffin.matt.ieat.domain.impl.RecipeImpl"
+            cascade="all"
+            outer-join="auto"
+            update="true"
+            insert="true"
+            column="recipe"
+        />
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-RelatedRecipeImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

+ 50 - 0
defs/schema/hbm/magoffin/matt/ieat/domain/impl/RelationKindImpl.hbm.xml

@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 2.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
+
+<hibernate-mapping
+        auto-import="false"
+>
+    <class
+        name="magoffin.matt.ieat.domain.impl.RelationKindImpl"
+        table="RelationKind"
+    >
+        <cache usage="read-write" />
+
+        <id
+            name="relationKindId"
+            column="relationKindId"
+            type="java.lang.Integer"
+            unsaved-value="null"
+        >
+            <generator class="assigned">
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-RelationKindImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <property
+            name="value"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="value"
+            length="64"
+            not-null="true"
+            unique="true"
+        />
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-RelationKindImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

+ 50 - 0
defs/schema/hbm/magoffin/matt/ieat/domain/impl/SystemImpl.hbm.xml

@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 2.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
+
+<hibernate-mapping
+        auto-import="false"
+>
+    <class
+        name="magoffin.matt.ieat.domain.impl.SystemImpl"
+        table="System"
+    >
+        <cache usage="read-write" />
+
+        <id
+            name="systemId"
+            column="systemId"
+            type="java.lang.Integer"
+            unsaved-value="null"
+        >
+            <generator class="assigned">
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-SystemImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <property
+            name="value"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="value"
+            length="32"
+            not-null="true"
+            unique="true"
+        />
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-SystemImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

+ 100 - 0
defs/schema/hbm/magoffin/matt/ieat/domain/impl/UnitImpl.hbm.xml

@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 2.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
+
+<hibernate-mapping
+        auto-import="false"
+>
+    <class
+        name="magoffin.matt.ieat.domain.impl.UnitImpl"
+        table="Unit"
+    >
+        <cache usage="read-write" />
+
+        <id
+            name="unitId"
+            column="unitId"
+            type="java.lang.Integer"
+            unsaved-value="null"
+        >
+            <generator class="native">
+                <param name="sequence">unit_id_seq</param>
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-UnitImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <property
+            name="value"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="value"
+            length="64"
+            not-null="true"
+        />
+
+        <property
+            name="abbreviation"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="abbreviation"
+            length="8"
+            not-null="true"
+        />
+
+        <property
+            name="mass"
+            type="boolean"
+            update="true"
+            insert="true"
+            column="mass"
+        />
+
+        <property
+            name="toMetric"
+            type="double"
+            update="true"
+            insert="true"
+            column="toMetric"
+        />
+
+        <property
+            name="toUS"
+            type="double"
+            update="true"
+            insert="true"
+            column="toUS"
+        />
+
+        <property
+            name="toImperial"
+            type="double"
+            update="true"
+            insert="true"
+            column="toImperial"
+        />
+
+        <property
+            name="systemId"
+            type="java.lang.Integer"
+            update="true"
+            insert="true"
+            column="systemId"
+        />
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-UnitImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

+ 125 - 0
defs/schema/hbm/magoffin/matt/ieat/domain/impl/UserImpl.hbm.xml

@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+    "-//Hibernate/Hibernate Mapping DTD 2.0//EN" 
+    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
+
+<hibernate-mapping
+        auto-import="false"
+>
+    <class
+        name="magoffin.matt.ieat.domain.impl.UserImpl"
+        table="Users"
+    >
+        <cache usage="read-write" />
+
+        <id
+            name="userId"
+            column="userId"
+            type="java.lang.Integer"
+            unsaved-value="null"
+        >
+            <generator class="native">
+                <param name="sequence">user_id_seq</param>
+              <!--  
+                  To add non XDoclet generator parameters, create a file named 
+                  hibernate-generator-params-UserImpl.xml 
+                  containing the additional parameters and place it in your merge dir. 
+              --> 
+            </generator>
+        </id>
+
+        <property
+            name="password"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="password"
+            length="64"
+            not-null="true"
+        />
+
+        <property
+            name="email"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="email"
+            length="128"
+            not-null="true"
+            unique="true"
+        />
+
+        <property
+            name="createdDate"
+            type="java.util.Calendar"
+            update="true"
+            insert="true"
+            column="createdDate"
+            not-null="true"
+        />
+
+        <property
+            name="country"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="country"
+            length="3"
+        />
+
+        <property
+            name="accessLevel"
+            type="java.lang.Integer"
+            update="true"
+            insert="true"
+            column="accessLevel"
+        />
+
+        <property
+            name="lastLoginDate"
+            type="java.util.Calendar"
+            update="true"
+            insert="true"
+            column="lastLoginDate"
+        />
+
+        <property
+            name="name"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="name"
+            length="64"
+            not-null="true"
+        />
+
+        <property
+            name="login"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="login"
+            length="32"
+            not-null="true"
+            unique="true"
+        />
+
+        <property
+            name="language"
+            type="java.lang.String"
+            update="true"
+            insert="true"
+            column="language"
+            length="3"
+        />
+
+        <!--
+            To add non XDoclet property mappings, create a file named
+                hibernate-properties-UserImpl.xml
+            containing the additional properties and place it in your merge dir.
+        -->
+
+    </class>
+
+</hibernate-mapping>

+ 1 - 0
defs/schema/hibernate.db2.properties

@@ -0,0 +1 @@
+hibernate.dialect=org.hibernate.dialect.DB2Dialect

+ 10 - 0
defs/schema/hibernate.mysql.properties

@@ -0,0 +1,10 @@
+# Specify this property file to build the MySQL hibernate DB scripts
+# Use the hibernate.properties property, like:
+# 
+# hibernate.properties=defs/schema/hibernate.mysql.properties
+
+hibernate.dialect=org.hibernate.dialect.MySQLDialect
+hibernate.connection.driver_class=com.mysql.jdbc.Driver
+hibernate.connection.url=jdbc:mysql://localhost/ieat
+hibernate.connection.username=ieat
+hibernate.connection.password=ieat

+ 5 - 0
defs/schema/hibernate.properties

@@ -0,0 +1,5 @@
+hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
+hibernate.connection.driver_class=org.postgresql.Driver
+hibernate.connection.url=jdbc:postgresql://localhost/ieat
+hibernate.connection.username=ieat
+hibernate.connection.password=ieat

+ 186 - 0
defs/schema/ui.xsd

@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<schema
+    xmlns="http://www.w3.org/2001/XMLSchema"
+    xml:lang="EN"
+    targetNamespace="http://msqr.us/xsd/ieat"
+    xmlns:eat="http://msqr.us/xsd/ieat"
+    xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    elementFormDefault="qualified"
+    attributeFormDefault="unqualified">
+    
+    <include schemaLocation="core.xsd"/>
+    
+	<element name="ui" type="eat:ui-data"/>
+	
+	<element name="edit" type="eat:ui-edit"/>
+	
+	<element name="search-results" type="eat:ui-search-results"/>
+	
+	<element name="session-data" type="eat:ui-session-data"/>
+	
+	<complexType name="ui-base">
+		<attribute name="mode" type="xs:string" use="optional"/>
+	</complexType>
+	
+	<complexType name="ui-data">
+		<complexContent>
+			<extension base="eat:ui-base">
+				<sequence>
+					<element name="search-results" type="eat:ui-search-results" minOccurs="0"/>
+					<element name="meta-support" type="eat:ui-meta-support" minOccurs="0"/>
+					<element name="base" type="eat:base" 
+						minOccurs="0" maxOccurs="unbounded"/>
+					<element name="course" type="eat:course" 
+						minOccurs="0" maxOccurs="unbounded"/>
+					<element name="difficulty" type="eat:difficulty" 
+						minOccurs="0" maxOccurs="unbounded"/>
+					<element name="ethnicity" type="eat:ethnicity" 
+						minOccurs="0" maxOccurs="unbounded"/>
+					<element name="ingredient" type="eat:ingredient" 
+						minOccurs="0" maxOccurs="unbounded"/>
+					<element name="prep-time" type="eat:prep-time" 
+						minOccurs="0" maxOccurs="unbounded"/>
+					<element name="recipe" type="eat:recipe" 
+						minOccurs="0" maxOccurs="unbounded"/>
+					<element name="system" type="eat:system"
+						minOccurs="0" maxOccurs="unbounded"/>
+					<element name="unit" type="eat:unit"
+						minOccurs="0" maxOccurs="unbounded"/>
+					<element name="meal" type="eat:meal"
+						minOccurs="0" maxOccurs="unbounded"/>
+				</sequence>			
+			</extension>
+		</complexContent>
+	</complexType>
+	
+	<complexType name="ui-edit">
+		<complexContent>
+			<extension base="eat:ui-base">
+				<sequence>
+					<element name="ingredient" type="eat:ingredient" minOccurs="0"/>
+					<element name="recipe" type="eat:recipe" minOccurs="0"/>
+					<element name="user" type="eat:user" minOccurs="0"/>
+					<element name="meal" type="eat:meal" minOccurs="0"/>
+					<element name="meal-recipe" type="eat:meal-recipe" minOccurs="0"/>
+					<element name="search-results" type="eat:ui-search-results" minOccurs="0"/>
+				</sequence>
+				<attribute name="ignoreWarnings" type="xs:boolean" use="optional" default="false"/>
+				<attribute name="refresh" type="xs:boolean" use="optional" default="false"/>
+			</extension>
+		</complexContent>
+	</complexType>
+	
+	<complexType name="ui-index">
+		<sequence>
+			<element name="index-section" minOccurs="0" maxOccurs="unbounded">
+				<complexType>
+					<attribute name="index-key" type="xs:string" use="required"/>
+					<attribute name="count" type="xs:int" use="optional" default="0"/>
+					<attribute name="selected" type="xs:boolean" use="optional" default="false"/>
+				</complexType>
+			</element>
+		</sequence>
+	</complexType>
+	
+	<complexType name="recipe-search-criteria">
+		<sequence>
+			<element name="name" type="string" minOccurs="0"/>
+			<element name="simpleQuery" type="string" minOccurs="0"/>
+			<element name="ingredient" type="eat:recipe-ingredient" 
+				minOccurs="0" maxOccurs="unbounded">
+				<annotation><documentation>
+					To search for recipes containing sets of ingredients.
+				</documentation></annotation>
+			</element>
+			<element name="advanced" type="eat:advanced-search-criteria" 
+				minOccurs="0" maxOccurs="unbounded"/>
+		</sequence>
+		<attribute name="mode" type="xs:string"/>
+	</complexType>
+	
+	<complexType name="advanced-search-criteria">
+		<sequence>
+			<element name="query" type="xs:string" minOccurs="0"/>
+		</sequence>
+		<attribute name="type" type="xs:string" use="required"/>
+		<attribute name="op" type="xs:short" use="required"/>
+		<attribute name="choice" type="xs:string" use="optional"/>
+		<attribute name="required" type="xs:boolean" use="optional" default="false"/>
+	</complexType>
+	
+	<complexType name="ui-search-results">
+		<complexContent>
+			<extension base="eat:ui-base">
+				<sequence>
+					<element name="ui-index" type="eat:ui-index" minOccurs="0"/>
+					<element name="pagination" type="eat:ui-pagination-support" minOccurs="0"/>
+					<element name="recipe-criteria" type="eat:recipe-search-criteria"
+						minOccurs="0"/>
+					<element name="recipe" type="eat:ui-recipe-match" 
+						minOccurs="0" maxOccurs="unbounded"/>
+					<element name="ingredient" type="eat:ui-ingredient-match" 
+						minOccurs="0" maxOccurs="unbounded"/>
+					<element name="user" type="eat:ui-user-match"
+						minOccurs="0" maxOccurs="unbounded"/>
+				</sequence>
+				<attribute name="totalResults" type="xs:int" use="required"/>
+				<attribute name="pageSize" type="xs:int" use="optional"/>
+				<attribute name="pageStart" type="xs:int" use="required"/>
+			</extension>
+		</complexContent>
+	</complexType>
+	
+	<complexType name="ui-recipe-match" >
+		<complexContent>
+			<extension base="eat:recipe"/>
+		</complexContent>
+	</complexType>
+	
+	<complexType name="ui-ingredient-match" >
+		<complexContent>
+			<extension base="eat:ingredient"/>
+		</complexContent>
+	</complexType>
+	
+	<complexType name="ui-user-match" >
+		<complexContent>
+			<extension base="eat:user"/>
+		</complexContent>
+	</complexType>
+	
+	<complexType name="ui-session-data">
+		<sequence>
+			<element name="acting-user" type="eat:user" minOccurs="0"/>
+		</sequence>
+		<attribute name="admin" type="xs:boolean"/>
+	</complexType>
+	
+	<complexType name="ui-pagination-support">
+		<sequence>
+			<element name="allowablePageSize" type="xs:int" minOccurs="0" maxOccurs="unbounded"/>
+		</sequence>
+		<attribute name="defaultPageSize" type="xs:int" use="required"/>
+		<attribute name="allowUnlimited" type="xs:boolean" use="optional" default="false"/>
+	</complexType>
+	
+	<!-- 
+		A generic meta data support object for passing configuration 
+		settings from the application to the front end.
+	-->
+	<complexType name="ui-meta-support">
+		<sequence>
+			<element name="meta" type="eat:ui-parameter" minOccurs="0" maxOccurs="unbounded"/>
+		</sequence>
+	</complexType>
+
+	<xs:complexType name="ui-parameter">
+		<xs:simpleContent>
+			<xs:extension base="xs:string">
+				<xs:attribute name="key" type="xs:string" use="required"/>
+			</xs:extension>
+		</xs:simpleContent>
+	</xs:complexType>
+
+</schema>

+ 79 - 0
defs/sql/derby/create.sql

@@ -0,0 +1,79 @@
+alter table meal drop constraint meal_user_fk;
+alter table mealrecipe drop constraint mealrecipe_recipe_fk;
+alter table mealrecipe drop constraint mealrecipe_course_fk;
+alter table mealrecipe drop constraint mealrecipe_meal_fk;
+alter table recipe drop constraint recipe_ethnicity_fk;
+alter table recipe drop constraint recipe_preptime_fk;
+alter table recipe drop constraint recipe_base_fk;
+alter table recipe drop constraint recipe_user_fk;
+alter table recipe drop constraint recipe_course_fk;
+alter table recipe drop constraint recipe_difficulty_fk;
+alter table recipe drop constraint recipe_system_fk;
+alter table recipecomment drop constraint recipecomment_recipe_fk;
+alter table recipeingredient drop constraint recipeingredient_recipe_fk;
+alter table recipeingredient drop constraint recipeingredient_unit_fk;
+alter table recipeingredient drop constraint recipeingredient_ingredientrecipe_fk;
+alter table recipeingredient drop constraint recipeingredient_ingredient_fk;
+alter table reciperating drop constraint reciperating_recipe_fk;
+alter table recipestep drop constraint recipestep_recipe_fk;
+alter table relatedrecipe drop constraint relatedrecipe_recipe_fk;
+alter table relatedrecipe drop constraint relatedrecipe_relationkind_fk;
+drop table base;
+drop table course;
+drop table difficulty;
+drop table ethnicity;
+drop table ingredient;
+drop table meal;
+drop table mealrecipe;
+drop table measurement_system;
+drop table preptime;
+drop table recipe;
+drop table recipecomment;
+drop table recipeingredient;
+drop table reciperating;
+drop table recipestep;
+drop table relatedrecipe;
+drop table relationkind;
+drop table unit;
+drop table users;
+drop table hibernate_unique_key;
+create table base (baseid integer not null, Value_ varchar(255), primary key (baseid));
+create table course (courseid integer not null, Value_ varchar(255), primary key (courseid));
+create table difficulty (difficultyid integer not null, Value_ varchar(255), primary key (difficultyid));
+create table ethnicity (ethnicityid integer not null, Value_ varchar(255), primary key (ethnicityid));
+create table ingredient (ingredientid integer not null, description varchar(512), ingr_name varchar(128) not null, primary key (ingredientid));
+create table meal (mealid bigint not null, ownerid integer, meal_name varchar(128) not null, primary key (mealid));
+create table mealrecipe (mealrecipeid bigint not null, recipeid bigint, courseid integer, quantity double, mealid bigint, pos integer, primary key (mealrecipeid));
+create table measurement_system (systemid integer not null, Value_ varchar(255), primary key (systemid));
+create table preptime (preptimeid integer not null, Value_ varchar(255), primary key (preptimeid));
+create table recipe (recipeid bigint not null, ownerid integer, image varchar(255), excerpt clob(255), source varchar(128), courseid integer, systemid integer, directions clob(255), baseid integer, preptimeid integer, ethnicityid integer, createddate timestamp, servingsize integer not null, recipe_name varchar(128) not null, modifieddate timestamp, difficultyid integer, primary key (recipeid));
+create table recipecomment (commentid bigint not null, Value_ varchar(255), userid integer not null, createddate timestamp not null, recipeid bigint, pos integer, primary key (commentid));
+create table recipeingredient (recipeingredientid bigint not null, ingredientid integer, unitid integer, optional smallint not null, ingredientrecipeid bigint, qualifier varchar(255), quantity double not null, recipeid bigint, pos integer, primary key (recipeingredientid));
+create table reciperating (ratingid bigint not null, userid integer not null, createddate timestamp not null, rating smallint not null, recipeid bigint, pos integer, primary key (ratingid));
+create table recipestep (stepid bigint not null, Value_ varchar(255), recipeid bigint, pos integer, primary key (stepid));
+create table relatedrecipe (relatedrecipeid bigint not null, relationkindid integer, recipeid bigint, pos integer, primary key (relatedrecipeid));
+create table relationkind (relationkindid integer not null, Value_ varchar(255), primary key (relationkindid));
+create table unit (unitid integer not null, Value_ varchar(255), abbreviation varchar(8) not null, mass smallint not null, tometric double, tous double, toimperial double, systemid integer, primary key (unitid));
+create table users (userid integer not null, password varchar(64) not null, email varchar(128) not null, createddate timestamp not null, country varchar(3) not null, accesslevel integer, lastlogindate timestamp, user_name varchar(64) not null, login varchar(32) not null, language varchar(3) not null, primary key (userid));
+alter table meal add constraint meal_user_fk foreign key (ownerid) references users;
+alter table mealrecipe add constraint mealrecipe_recipe_fk foreign key (recipeid) references recipe;
+alter table mealrecipe add constraint mealrecipe_course_fk foreign key (courseid) references course;
+alter table mealrecipe add constraint mealrecipe_meal_fk foreign key (mealid) references meal;
+alter table recipe add constraint recipe_ethnicity_fk foreign key (ethnicityid) references ethnicity;
+alter table recipe add constraint recipe_preptime_fk foreign key (preptimeid) references preptime;
+alter table recipe add constraint recipe_base_fk foreign key (baseid) references base;
+alter table recipe add constraint recipe_user_fk foreign key (ownerid) references users;
+alter table recipe add constraint recipe_course_fk foreign key (courseid) references course;
+alter table recipe add constraint recipe_difficulty_fk foreign key (difficultyid) references difficulty;
+alter table recipe add constraint recipe_system_fk foreign key (systemid) references measurement_system;
+alter table recipecomment add constraint recipecomment_recipe_fk foreign key (recipeid) references recipe;
+alter table recipeingredient add constraint recipeingredient_recipe_fk foreign key (recipeid) references recipe;
+alter table recipeingredient add constraint recipeingredient_unit_fk foreign key (unitid) references unit;
+alter table recipeingredient add constraint recipeingredient_ingredientrecipe_fk foreign key (ingredientrecipeid) references recipe;
+alter table recipeingredient add constraint recipeingredient_ingredient_fk foreign key (ingredientid) references ingredient;
+alter table reciperating add constraint reciperating_recipe_fk foreign key (recipeid) references recipe;
+alter table recipestep add constraint recipestep_recipe_fk foreign key (recipeid) references recipe;
+alter table relatedrecipe add constraint relatedrecipe_recipe_fk foreign key (recipeid) references recipe;
+alter table relatedrecipe add constraint relatedrecipe_relationkind_fk foreign key (relationkindid) references relationkind;
+create table hibernate_unique_key ( next_hi integer );
+insert into hibernate_unique_key values ( 0 );

+ 3 - 0
defs/sql/derby/hibernate.properties

@@ -0,0 +1,3 @@
+## Derby
+
+hibernate.dialect org.hibernate.dialect.DerbyDialect

+ 86 - 0
defs/sql/derby/ieat.hbm.xml

@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE hibernate-mapping
+  PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+    
+	<query name="BaseAll">
+		<![CDATA[from magoffin.matt.ieat.domain.Base base order by lower(base.Value) asc]]>
+	</query>
+
+	<query name="CourseAll">
+		<![CDATA[from magoffin.matt.ieat.domain.Course course order by lower(course.Value) asc]]>
+	</query>
+
+	<query name="DifficultyAll">
+		<![CDATA[from magoffin.matt.ieat.domain.Difficulty difficulty order by difficulty.id asc]]>
+	</query>
+
+	<query name="EthnicityAll">
+		<![CDATA[from magoffin.matt.ieat.domain.Ethnicity ethnicity order by lower(ethnicity.Value) asc]]>
+	</query>
+
+	<query name="IngredientAll">
+		<![CDATA[from magoffin.matt.ieat.domain.Ingredient ingredient order by lower(ingredient.Name) asc]]>
+	</query>
+
+	<query name="MealsForUser">
+		<![CDATA[from magoffin.matt.ieat.domain.Meal meal where meal.Owner.id = ? order by lower(meal.Name) asc]]>
+	</query>
+
+	<query name="PrepTimeAll">
+		<![CDATA[from magoffin.matt.ieat.domain.PrepTime prep order by prep.id asc]]>
+	</query>
+
+	<query name="RecipeAll">
+		<![CDATA[from magoffin.matt.ieat.domain.Recipe recipe order by recipe.id asc]]>
+	</query>
+	
+	<query name="RecipeAllCount">
+		<![CDATA[select count(*) from magoffin.matt.ieat.domain.Recipe]]>
+	</query>
+	
+	<query name="RecipeUsedAsIngredient">
+		<![CDATA[
+			select rr
+			from magoffin.matt.ieat.domain.Recipe rr, 
+				magoffin.matt.ieat.domain.RecipeIngredient ri
+			where ri in elements(rr.Ingredient)
+			and ri.Recipe.id = ?
+			order by lower(rr.Name)
+		]]>
+	</query>
+	
+	<query name="SystemAll">
+		<![CDATA[from magoffin.matt.ieat.domain.System sys order by lower(sys.Value) asc]]>
+	</query>
+
+	<query name="UserByEmail">
+		<![CDATA[from magoffin.matt.ieat.domain.User user where lower(user.Email) = lower(?)]]>
+	</query>
+
+	<query name="UserByLogin">
+		<![CDATA[from magoffin.matt.ieat.domain.User user where user.Login = ?]]>
+	</query>
+
+	<query name="UsersForAccessLevel">
+		<![CDATA[from magoffin.matt.ieat.domain.User user where user.AccessLevel >= ?]]>
+	</query>
+
+	<query name="UnitsAll">
+		<![CDATA[from magoffin.matt.ieat.domain.Unit units order by lower(units.Value) asc]]>
+	</query>
+	
+	<query name="UnitsForSystem">
+		<![CDATA[from magoffin.matt.ieat.domain.Unit units where units.SystemId = ? or units.SystemId is null order by lower(units.Value) asc]]>
+	</query>
+	
+	<!-- SQL queries below -->
+
+	<sql-query name="UsersStaleRegistration">
+		<return alias="users" class="magoffin.matt.ieat.domain.User"/>
+		<![CDATA[select {users.*} from users {users} 
+			where DATE(users.createdDate) < DATE({fn TIMESTAMPADD(SQL_TSI_DAY, -14, CURRENT_DATE)}) 
+			and users.accessLevel < 0]]>
+	</sql-query>
+
+</hibernate-mapping>

+ 48 - 0
defs/sql/derby/load-ingredients.sql

@@ -0,0 +1,48 @@
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (1,'avocado',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (2,'banana',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (3,'chocolate chips (dark)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (4,'chocolate chips (milk)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (5,'cornmeal',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (6,'cumin',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (7,'dill',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (8,'egg',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (9,'fennel',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (10,'flour (buckwheat)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (11,'flour (rye)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (12,'flour (white)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (13,'flour (whole wheat)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (14,'garlic',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (15,'ice cube',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (16,'leek',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (17,'lemon',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (18,'lime',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (19,'milk (cow)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (20,'milk (soy)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (21,'milk (rice)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (22,'mozzarella',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (23,'mushroom (white)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (24,'olive oil (extra virgin)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (25,'parchment paper',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (26,'Parmesan',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (27,'pepper',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (28,'porcini (dried)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (29,'salt',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (30,'vinegar (balsamic)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (31,'vinegar (champagne)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (32,'vinegar (red wine)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (33,'water',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (34,'wine (white)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (35,'wine (red)',null);
+
+UPDATE HIBERNATE_UNIQUE_KEY SET NEXT_HI = 1 + (select max(id) from (
+	select baseid as id from base union 
+	select courseid as id from course union 
+	select difficultyid as id from difficulty union 
+	select ethnicityid as id from ethnicity union 
+	select ingredientid as id from ingredient union 
+	select preptimeid as id from preptime union 
+	select relationkindid as id from relationkind union 
+	select systemid as id from measurement_system union 
+	select unitid as id from unit union 
+	select userid as id from users
+	) as sub);

+ 137 - 0
defs/sql/derby/load.sql

@@ -0,0 +1,137 @@
+INSERT INTO ethnicity (ethnicityid,value_) VALUES (1,'African');
+INSERT INTO ethnicity (ethnicityid,value_) VALUES (2,'American');
+INSERT INTO ethnicity (ethnicityid,value_) VALUES (3,'Chinese');
+INSERT INTO ethnicity (ethnicityid,value_) VALUES (4,'French');
+INSERT INTO ethnicity (ethnicityid,value_) VALUES (5,'German');
+INSERT INTO ethnicity (ethnicityid,value_) VALUES (6,'Greek');
+INSERT INTO ethnicity (ethnicityid,value_) VALUES (7,'Indian');
+INSERT INTO ethnicity (ethnicityid,value_) VALUES (8,'Italian');
+INSERT INTO ethnicity (ethnicityid,value_) VALUES (9,'Japanese');
+INSERT INTO ethnicity (ethnicityid,value_) VALUES (10,'Mexican');
+INSERT INTO ethnicity (ethnicityid,value_) VALUES (11,'Middle Eastern');
+INSERT INTO ethnicity (ethnicityid,value_) VALUES (12,'None');
+INSERT INTO ethnicity (ethnicityid,value_) VALUES (13,'Slavic');
+INSERT INTO ethnicity (ethnicityid,value_) VALUES (14,'Thai');
+
+INSERT INTO measurement_system (systemid,value_) VALUES (1,'USA');
+INSERT INTO measurement_system (systemid,value_) VALUES (2,'Metric');
+--INSERT INTO system (systemid,value_) VALUES (3,'Imperial');
+
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (1,'small','sm',null,0,0,0);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (2,'medium','med',null,0,0,0);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (3,'large','lg',null,0,0,0);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (4,'unit','ea',null,0,0,0);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (5,'slice','sli',null,0,0,0);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (6,'clove','clv',null,0,0,0);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (7,'pinch','pn',null,0,0,0);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (8,'package','pk',null,0,0,0);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (9,'can','cn',null,0,0,0);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (10,'drop','dr',null,0,0,0);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (11,'bunch','bn',null,0,0,0);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (12,'dash','ds',null,0,0,0);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (13,'carton','ct',null,0,0,0);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (14,'sprig','sprig',null,0,0,0);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (15,'leaf','leaf',null,0,0,0);
+
+-- US volumes
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (16,'Teaspoon','t',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'USA'),1,5,0,0);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (17,'Tablespoon','T',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'USA'),3,15,0,0);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (18,'Ounce (fluid)','fl. oz',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'USA'),6,29.56,0,0);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (19,'Cup','c',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'USA'),48,236,0,0);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (20,'Pint','pt',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'USA'),96,473,0,0);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (21,'Quart','q',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'USA'),192,946,0,0);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (22,'Gallon','gal',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'USA'),768,3785.4,0,0);
+		
+-- US mass
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (23,'Ounce','oz',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'USA'),1,28.35,0,1);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (24,'Pound','lb',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'USA'),16,454,0,1);
+
+-- Metric volumes	
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (25,'milliliter','ml',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),0.203,1,0,0);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (26,'cubic centimeter','cc',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),0.203,1,0,0);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (27,'tea spoon','tsp',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),1.015,5,0,0);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (28,'centiliter','cl',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),2.03,10,0,0);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (29,'table spoon','Tbsp',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),3.045,15,0,0);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (30,'deciliter','dl',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),20.3,100,0,0);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (31,'cup','cup',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),50.75,250,0,0);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (32,'liter','L',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),203,1000,0,0);
+
+-- Metric mass
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (33,'milligram','mg',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),3.448275862E-5,1,0,1);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (34,'decagram','dg',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),3.448275862E-4,10,0,1);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (35,'hectogram','hg',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),3.448275862E-3,100,0,1);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (36,'gram','g',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),3.448275862E-2,1000,0,1);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES (37,'kilogram','kg',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),34.48275862,1000000,0,1);
+
+INSERT INTO base (baseid,value_) VALUES (1,'Beef');
+INSERT INTO base (baseid,value_) VALUES (2,'Bread');
+INSERT INTO base (baseid,value_) VALUES (3,'Dairy');
+INSERT INTO base (baseid,value_) VALUES (4,'Egg');
+INSERT INTO base (baseid,value_) VALUES (5,'Fruit');
+INSERT INTO base (baseid,value_) VALUES (6,'Grain');
+INSERT INTO base (baseid,value_) VALUES (7,'Lamb');
+INSERT INTO base (baseid,value_) VALUES (8,'Other');
+INSERT INTO base (baseid,value_) VALUES (9,'Pasta');
+INSERT INTO base (baseid,value_) VALUES (10,'Pork/Ham');
+INSERT INTO base (baseid,value_) VALUES (11,'Poultry');
+INSERT INTO base (baseid,value_) VALUES (12,'Seafood');
+INSERT INTO base (baseid,value_) VALUES (13,'Vegetable');
+
+
+INSERT INTO preptime (preptimeid,value_) VALUES (1,'0 Minutes');
+INSERT INTO preptime (preptimeid,value_) VALUES (2,'1-10 Minutes');
+INSERT INTO preptime (preptimeid,value_) VALUES (3,'10-30 Minutes');
+INSERT INTO preptime (preptimeid,value_) VALUES (4,'30-60 Minutes');
+INSERT INTO preptime (preptimeid,value_) VALUES (5,'60+ Minutes');
+
+
+INSERT INTO difficulty (difficultyid,value_) VALUES (1,'Easy');
+INSERT INTO difficulty (difficultyid,value_) VALUES (2,'Intermediate');
+INSERT INTO difficulty (difficultyid,value_) VALUES (3,'Difficult');
+INSERT INTO difficulty (difficultyid,value_) VALUES (4,'Expert');
+
+
+INSERT INTO course (courseid,value_) VALUES (1,'Breakfast');
+INSERT INTO course (courseid,value_) VALUES (2,'Snack');
+INSERT INTO course (courseid,value_) VALUES (3,'Lunch');
+INSERT INTO course (courseid,value_) VALUES (4,'Appetizer');
+INSERT INTO course (courseid,value_) VALUES (5,'Side Dish');
+INSERT INTO course (courseid,value_) VALUES (6,'Entree');
+INSERT INTO course (courseid,value_) VALUES (7,'Dessert');
+INSERT INTO course (courseid,value_) VALUES (8,'Beverage');
+INSERT INTO course (courseid,value_) VALUES (9,'N/A');
+
+UPDATE HIBERNATE_UNIQUE_KEY SET NEXT_HI = 1 + (select max(id) from (
+	select baseid as id from base union 
+	select courseid as id from course union 
+	select difficultyid as id from difficulty union 
+	select ethnicityid as id from ethnicity union 
+	select ingredientid as id from ingredient union 
+	select preptimeid as id from preptime union 
+	select relationkindid as id from relationkind union 
+	select systemid as id from measurement_system union 
+	select unitid as id from unit union 
+	select userid as id from users
+	) as sub);

+ 26 - 0
defs/sql/derby/setup.sql

@@ -0,0 +1,26 @@
+/* SQL for Derby to create iEat system tables.
+ * ===================================================================
+ * This program is free software; you can redistribute it and/or 
+ * modify it under the terms of the GNU General Public License as 
+ * published by the Free Software Foundation; either version 2 of 
+ * the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful, 
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of 
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 
+ * General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License 
+ * along with this program; if not, write to the Free Software 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 
+ * 02111-1307 USA
+ * ===================================================================
+ * $Id: setup.sql 19 2009-05-03 03:14:54Z msqr $
+ * ===================================================================
+ */
+
+create table settings (
+	skey 		varchar(128) not null, 
+	svalue 		varchar(255), 
+	primary key (skey)
+);

+ 76 - 0
defs/sql/mysql/create.sql

@@ -0,0 +1,76 @@
+alter table meal drop foreign key meal_user_fk;
+alter table mealrecipe drop foreign key mealrecipe_recipe_fk;
+alter table mealrecipe drop foreign key mealrecipe_course_fk;
+alter table mealrecipe drop foreign key mealrecipe_meal_fk;
+alter table recipe drop foreign key recipe_ethnicity_fk;
+alter table recipe drop foreign key recipe_preptime_fk;
+alter table recipe drop foreign key recipe_base_fk;
+alter table recipe drop foreign key recipe_user_fk;
+alter table recipe drop foreign key recipe_course_fk;
+alter table recipe drop foreign key recipe_difficulty_fk;
+alter table recipe drop foreign key recipe_system_fk;
+alter table recipecomment drop foreign key recipecomment_recipe_fk;
+alter table recipeingredient drop foreign key recipeingredient_recipe_fk;
+alter table recipeingredient drop foreign key recipeingredient_unit_fk;
+alter table recipeingredient drop foreign key recipeingredient_ingredientrecipe_fk;
+alter table recipeingredient drop foreign key recipeingredient_ingredient_fk;
+alter table reciperating drop foreign key reciperating_recipe_fk;
+alter table recipestep drop foreign key recipestep_recipe_fk;
+alter table relatedrecipe drop foreign key relatedrecipe_recipe_fk;
+alter table relatedrecipe drop foreign key relatedrecipe_relationkind_fk;
+drop table if exists base;
+drop table if exists course;
+drop table if exists difficulty;
+drop table if exists ethnicity;
+drop table if exists ingredient;
+drop table if exists meal;
+drop table if exists mealrecipe;
+drop table if exists measurement_system;
+drop table if exists preptime;
+drop table if exists recipe;
+drop table if exists recipecomment;
+drop table if exists recipeingredient;
+drop table if exists reciperating;
+drop table if exists recipestep;
+drop table if exists relatedrecipe;
+drop table if exists relationkind;
+drop table if exists unit;
+drop table if exists users;
+create table base (baseid integer not null auto_increment, Value_ varchar(255), primary key (baseid));
+create table course (courseid integer not null auto_increment, Value_ varchar(255), primary key (courseid));
+create table difficulty (difficultyid integer not null auto_increment, Value_ varchar(255), primary key (difficultyid));
+create table ethnicity (ethnicityid integer not null auto_increment, Value_ varchar(255), primary key (ethnicityid));
+create table ingredient (ingredientid integer not null auto_increment, description text, ingr_name varchar(128) not null, primary key (ingredientid));
+create table meal (mealid bigint not null auto_increment, ownerid integer, meal_name varchar(128) not null, primary key (mealid));
+create table mealrecipe (mealrecipeid bigint not null auto_increment, recipeid bigint, courseid integer, quantity double precision, mealid bigint, pos integer, primary key (mealrecipeid));
+create table measurement_system (systemid integer not null auto_increment, Value_ varchar(255), primary key (systemid));
+create table preptime (preptimeid integer not null auto_increment, Value_ varchar(255), primary key (preptimeid));
+create table recipe (recipeid bigint not null auto_increment, ownerid integer, image varchar(255), excerpt text, source varchar(128), courseid integer, systemid integer, directions text, baseid integer, preptimeid integer, ethnicityid integer, createddate datetime, servingsize integer not null, recipe_name varchar(128) not null, modifieddate datetime, difficultyid integer, primary key (recipeid));
+create table recipecomment (commentid bigint not null auto_increment, Value_ varchar(255), userid integer not null, createddate datetime not null, recipeid bigint, pos integer, primary key (commentid));
+create table recipeingredient (recipeingredientid bigint not null auto_increment, ingredientid integer, unitid integer, optional bit not null, ingredientrecipeid bigint, qualifier varchar(255), quantity double precision not null, recipeid bigint, pos integer, primary key (recipeingredientid));
+create table reciperating (ratingid bigint not null auto_increment, userid integer not null, createddate datetime not null, rating smallint not null, recipeid bigint, pos integer, primary key (ratingid));
+create table recipestep (stepid bigint not null auto_increment, Value_ varchar(255), recipeid bigint, pos integer, primary key (stepid));
+create table relatedrecipe (relatedrecipeid bigint not null auto_increment, relationkindid integer, recipeid bigint, pos integer, primary key (relatedrecipeid));
+create table relationkind (relationkindid integer not null auto_increment, Value_ varchar(255), primary key (relationkindid));
+create table unit (unitid integer not null auto_increment, Value_ varchar(255), abbreviation varchar(8) not null, mass bit not null, tometric double precision, tous double precision, toimperial double precision, systemid integer, primary key (unitid));
+create table users (userid integer not null auto_increment, password varchar(64) not null, email varchar(128) not null, createddate datetime not null, country varchar(3) not null, accesslevel integer, lastlogindate datetime, user_name varchar(64) not null, login varchar(32) not null, language varchar(3) not null, primary key (userid));
+alter table meal add index meal_user_fk (ownerid), add constraint meal_user_fk foreign key (ownerid) references users (userid);
+alter table mealrecipe add index mealrecipe_recipe_fk (recipeid), add constraint mealrecipe_recipe_fk foreign key (recipeid) references recipe (recipeid);
+alter table mealrecipe add index mealrecipe_course_fk (courseid), add constraint mealrecipe_course_fk foreign key (courseid) references course (courseid);
+alter table mealrecipe add index mealrecipe_meal_fk (mealid), add constraint mealrecipe_meal_fk foreign key (mealid) references meal (mealid);
+alter table recipe add index recipe_ethnicity_fk (ethnicityid), add constraint recipe_ethnicity_fk foreign key (ethnicityid) references ethnicity (ethnicityid);
+alter table recipe add index recipe_preptime_fk (preptimeid), add constraint recipe_preptime_fk foreign key (preptimeid) references preptime (preptimeid);
+alter table recipe add index recipe_base_fk (baseid), add constraint recipe_base_fk foreign key (baseid) references base (baseid);
+alter table recipe add index recipe_user_fk (ownerid), add constraint recipe_user_fk foreign key (ownerid) references users (userid);
+alter table recipe add index recipe_course_fk (courseid), add constraint recipe_course_fk foreign key (courseid) references course (courseid);
+alter table recipe add index recipe_difficulty_fk (difficultyid), add constraint recipe_difficulty_fk foreign key (difficultyid) references difficulty (difficultyid);
+alter table recipe add index recipe_system_fk (systemid), add constraint recipe_system_fk foreign key (systemid) references measurement_system (systemid);
+alter table recipecomment add index recipecomment_recipe_fk (recipeid), add constraint recipecomment_recipe_fk foreign key (recipeid) references recipe (recipeid);
+alter table recipeingredient add index recipeingredient_recipe_fk (recipeid), add constraint recipeingredient_recipe_fk foreign key (recipeid) references recipe (recipeid);
+alter table recipeingredient add index recipeingredient_unit_fk (unitid), add constraint recipeingredient_unit_fk foreign key (unitid) references unit (unitid);
+alter table recipeingredient add index recipeingredient_ingredientrecipe_fk (ingredientrecipeid), add constraint recipeingredient_ingredientrecipe_fk foreign key (ingredientrecipeid) references recipe (recipeid);
+alter table recipeingredient add index recipeingredient_ingredient_fk (ingredientid), add constraint recipeingredient_ingredient_fk foreign key (ingredientid) references ingredient (ingredientid);
+alter table reciperating add index reciperating_recipe_fk (recipeid), add constraint reciperating_recipe_fk foreign key (recipeid) references recipe (recipeid);
+alter table recipestep add index recipestep_recipe_fk (recipeid), add constraint recipestep_recipe_fk foreign key (recipeid) references recipe (recipeid);
+alter table relatedrecipe add index relatedrecipe_recipe_fk (recipeid), add constraint relatedrecipe_recipe_fk foreign key (recipeid) references recipe (recipeid);
+alter table relatedrecipe add index relatedrecipe_relationkind_fk (relationkindid), add constraint relatedrecipe_relationkind_fk foreign key (relationkindid) references relationkind (relationkindid);

+ 3 - 0
defs/sql/mysql/hibernate.properties

@@ -0,0 +1,3 @@
+## Derby
+
+hibernate.dialect org.hibernate.dialect.MySQLDialect

+ 88 - 0
defs/sql/mysql/ieat.hbm.xml

@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE hibernate-mapping
+  PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<!-- 
+	iEat Hibernate queries for MySQL
+ -->
+<hibernate-mapping>
+    
+	<query name="BaseAll">
+		<![CDATA[from magoffin.matt.ieat.domain.Base base order by lower(base.Value) asc]]>
+	</query>
+
+	<query name="CourseAll">
+		<![CDATA[from magoffin.matt.ieat.domain.Course course order by lower(course.Value) asc]]>
+	</query>
+
+	<query name="DifficultyAll">
+		<![CDATA[from magoffin.matt.ieat.domain.Difficulty difficulty order by difficulty.id asc]]>
+	</query>
+
+	<query name="EthnicityAll">
+		<![CDATA[from magoffin.matt.ieat.domain.Ethnicity ethnicity order by lower(ethnicity.Value) asc]]>
+	</query>
+
+	<query name="IngredientAll">
+		<![CDATA[from magoffin.matt.ieat.domain.Ingredient ingredient order by lower(ingredient.Name) asc]]>
+	</query>
+
+	<query name="MealsForUser">
+		<![CDATA[from magoffin.matt.ieat.domain.Meal meal where meal.Owner.id = ? order by lower(meal.Name) asc]]>
+	</query>
+
+	<query name="PrepTimeAll">
+		<![CDATA[from magoffin.matt.ieat.domain.PrepTime prep order by prep.id asc]]>
+	</query>
+
+	<query name="RecipeAll">
+		<![CDATA[from magoffin.matt.ieat.domain.Recipe recipe order by recipe.id asc]]>
+	</query>
+	
+	<query name="RecipeAllCount">
+		<![CDATA[select count(*) from magoffin.matt.ieat.domain.Recipe]]>
+	</query>
+	
+	<query name="RecipeUsedAsIngredient">
+		<![CDATA[
+			select rr
+			from magoffin.matt.ieat.domain.Recipe rr, 
+				magoffin.matt.ieat.domain.RecipeIngredient ri
+			where ri in elements(rr.Ingredient)
+			and ri.Recipe.id = ?
+			order by lower(rr.Name)
+		]]>
+	</query>
+	
+	<query name="SystemAll">
+		<![CDATA[from magoffin.matt.ieat.domain.System sys order by lower(sys.Value) asc]]>
+	</query>
+
+	<query name="UserByEmail">
+		<![CDATA[from magoffin.matt.ieat.domain.User user where lower(user.Email) = lower(?)]]>
+	</query>
+
+	<query name="UserByLogin">
+		<![CDATA[from magoffin.matt.ieat.domain.User user where user.Login = ?]]>
+	</query>
+
+	<query name="UsersForAccessLevel">
+		<![CDATA[from magoffin.matt.ieat.domain.User user where user.AccessLevel >= ?]]>
+	</query>
+
+	<query name="UnitsAll">
+		<![CDATA[from magoffin.matt.ieat.domain.Unit units order by lower(units.Value) asc]]>
+	</query>
+	
+	<query name="UnitsForSystem">
+		<![CDATA[from magoffin.matt.ieat.domain.Unit units where units.SystemId = ? or units.SystemId is null order by lower(units.Value) asc]]>
+	</query>
+	
+	<!-- SQL queries below -->
+
+	<sql-query name="UsersStaleRegistration">
+		<!-- FIXME: this query is hard-coded because I couldn't find a way for MySQL to allow the interval as a ? parameter -->
+		<return alias="users" class="magoffin.matt.ieat.domain.User"/>
+		<![CDATA[select {users.*} from users {users} where users.createdDate < date_sub(current_date,interval 14 day) and users.accessLevel < 0]]>
+	</sql-query>
+
+</hibernate-mapping>

+ 35 - 0
defs/sql/mysql/load-ingredients.sql

@@ -0,0 +1,35 @@
+INSERT INTO ingredient (ingr_name,description) VALUES ('avocado',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('banana',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('chocolate chips (dark)',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('chocolate chips (milk)',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('cornmeal',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('cumin',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('dill',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('egg',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('fennel',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('flour (buckwheat)',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('flour (rye)',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('flour (white)',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('flour (whole wheat)',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('garlic',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('ice cube',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('leek',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('lemon',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('lime',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('milk (cow)',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('milk (soy)',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('milk (rice)',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('mozzarella',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('mushroom (white)',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('olive oil (extra virgin)',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('parchment paper',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('Parmesan',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('pepper',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('porcini (dried)',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('salt',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('vinegar (balsamic)',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('vinegar (champagne)',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('vinegar (red wine)',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('water',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('wine (white)',null);
+INSERT INTO ingredient (ingr_name,description) VALUES ('wine (red)',null);

+ 139 - 0
defs/sql/mysql/load.sql

@@ -0,0 +1,139 @@
+INSERT INTO ethnicity (value_) VALUES ('African');
+INSERT INTO ethnicity (value_) VALUES ('American');
+INSERT INTO ethnicity (value_) VALUES ('Chinese');
+INSERT INTO ethnicity (value_) VALUES ('French');
+INSERT INTO ethnicity (value_) VALUES ('German');
+INSERT INTO ethnicity (value_) VALUES ('Greek');
+INSERT INTO ethnicity (value_) VALUES ('Indian');
+INSERT INTO ethnicity (value_) VALUES ('Italian');
+INSERT INTO ethnicity (value_) VALUES ('Japanese');
+INSERT INTO ethnicity (value_) VALUES ('Mexican');
+INSERT INTO ethnicity (value_) VALUES ('Middle Eastern');
+INSERT INTO ethnicity (value_) VALUES ('None');
+INSERT INTO ethnicity (value_) VALUES ('Slavic');
+INSERT INTO ethnicity (value_) VALUES ('Thai');
+
+INSERT INTO measurement_system (systemid,value_) VALUES (1,'USA');
+INSERT INTO measurement_system (systemid,value_) VALUES (2,'Metric');
+
+-- Generic units
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) 
+		VALUES ('small','sm',null,0,0,0,FALSE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) 
+		VALUES ('medium','med',null,0,0,0,FALSE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) 
+		VALUES ('large','lg',null,0,0,0,FALSE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) 
+		VALUES ('unit','ea',null,0,0,0,FALSE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) 
+		VALUES ('slice','sli',null,0,0,0,FALSE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) 
+		VALUES ('clove','clv',null,0,0,0,FALSE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) 
+		VALUES ('pinch','pn',null,0,0,0,FALSE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) 
+		VALUES ('package','pk',null,0,0,0,FALSE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) 
+		VALUES ('can','cn',null,0,0,0,FALSE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) 
+		VALUES ('drop','dr',null,0,0,0,FALSE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) 
+		VALUES ('bunch','bn',null,0,0,0,FALSE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) 
+		VALUES ('dash','ds',null,0,0,0,FALSE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) 
+		VALUES ('carton','ct',null,0,0,0,FALSE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) 
+		VALUES ('sprig','sprig',null,0,0,0,FALSE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) 
+		VALUES ('leaf','leaf',null,0,0,0,FALSE);
+
+-- US volumes
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES ('Teaspoon','t',
+		1,1,5,0,FALSE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES ('Tablespoon','T',
+		1,3,15,0,FALSE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES ('Ounce (fluid)','fl. oz',
+		1,6,29.56,0,FALSE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES ('Cup','c',
+		1,48,236,0,FALSE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES ('Pint','pt',
+		1,96,473,0,FALSE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES ('Quart','q',
+		1,192,946,0,FALSE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES ('Gallon','gal',
+		1,768,3785.4,0,FALSE);
+		
+-- US mass
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES ('Ounce','oz',
+		1,1,28.35,0,TRUE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES ('Pound','lb',
+		1,16,454,0,TRUE);
+
+-- Metric volumes	
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES ('milliliter','ml',
+		2,0.203,1,0,FALSE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES ('cubic centimeter','cc',
+		2,0.203,1,0,FALSE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES ('tea spoon','tsp',
+		2,1.015,5,0,FALSE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES ('centiliter','cl',
+		2,2.03,10,0,FALSE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES ('table spoon','Tbsp',
+		2,3.045,15,0,FALSE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES ('deciliter','dl',
+		2,20.3,100,0,FALSE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES ('cup','cup',
+		2,50.75,250,0,FALSE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES ('liter','L',
+		2,203,1000,0,FALSE);
+
+-- Metric mass
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES ('milligram','mg',
+		2,3.448275862E-5,1,0,TRUE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES ('decagram','dg',
+		2,3.448275862E-4,10,0,TRUE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES ('hectogram','hg',
+		2,3.448275862E-3,100,0,TRUE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES ('gram','g',
+		2,3.448275862E-2,1000,0,TRUE);
+INSERT INTO unit (value_,abbreviation,systemid,tous,tometric,toimperial,mass) VALUES ('kilogram','kg',
+		2,34.48275862,1000000,0,TRUE);
+
+INSERT INTO base (value_) VALUES ('Beef');
+INSERT INTO base (value_) VALUES ('Bread');
+INSERT INTO base (value_) VALUES ('Dairy');
+INSERT INTO base (value_) VALUES ('Egg');
+INSERT INTO base (value_) VALUES ('Fruit');
+INSERT INTO base (value_) VALUES ('Grain');
+INSERT INTO base (value_) VALUES ('Lamb');
+INSERT INTO base (value_) VALUES ('Other');
+INSERT INTO base (value_) VALUES ('Pasta');
+INSERT INTO base (value_) VALUES ('Pork/Ham');
+INSERT INTO base (value_) VALUES ('Poultry');
+INSERT INTO base (value_) VALUES ('Seafood');
+INSERT INTO base (value_) VALUES ('Vegetable');
+
+
+INSERT INTO preptime (value_) VALUES ('0 Minutes');
+INSERT INTO preptime (value_) VALUES ('1-10 Minutes');
+INSERT INTO preptime (value_) VALUES ('10-30 Minutes');
+INSERT INTO preptime (value_) VALUES ('30-60 Minutes');
+INSERT INTO preptime (value_) VALUES ('60+ Minutes');
+
+
+INSERT INTO difficulty (value_) VALUES ('Easy');
+INSERT INTO difficulty (value_) VALUES ('Intermediate');
+INSERT INTO difficulty (value_) VALUES ('Difficult');
+INSERT INTO difficulty (value_) VALUES ('Expert');
+
+
+INSERT INTO course (value_) VALUES ('Breakfast');
+INSERT INTO course (value_) VALUES ('Snack');
+INSERT INTO course (value_) VALUES ('Lunch');
+INSERT INTO course (value_) VALUES ('Appetizer');
+INSERT INTO course (value_) VALUES ('Side Dish');
+INSERT INTO course (value_) VALUES ('Entree');
+INSERT INTO course (value_) VALUES ('Dessert');
+INSERT INTO course (value_) VALUES ('Beverage');
+INSERT INTO course (value_) VALUES ('N/A');

+ 26 - 0
defs/sql/mysql/setup.sql

@@ -0,0 +1,26 @@
+/* SQL for MySQL to create iEat system tables.
+ * ===================================================================
+ * This program is free software; you can redistribute it and/or 
+ * modify it under the terms of the GNU General Public License as 
+ * published by the Free Software Foundation; either version 2 of 
+ * the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful, 
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of 
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 
+ * General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License 
+ * along with this program; if not, write to the Free Software 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 
+ * 02111-1307 USA
+ * ===================================================================
+ * $Id: setup.sql 92 2009-05-19 01:37:42Z msqr $
+ * ===================================================================
+ */
+
+create table settings (
+	skey 		varchar(128) not null, 
+	svalue 		varchar(255), 
+	primary key (skey)
+);

+ 80 - 0
defs/sql/postgres/create.sql

@@ -0,0 +1,80 @@
+alter table meal drop constraint meal_user_fk;
+alter table mealrecipe drop constraint mealrecipe_recipe_fk;
+alter table mealrecipe drop constraint mealrecipe_course_fk;
+alter table mealrecipe drop constraint mealrecipe_meal_fk;
+alter table recipe drop constraint recipe_ethnicity_fk;
+alter table recipe drop constraint recipe_preptime_fk;
+alter table recipe drop constraint recipe_base_fk;
+alter table recipe drop constraint recipe_user_fk;
+alter table recipe drop constraint recipe_course_fk;
+alter table recipe drop constraint recipe_difficulty_fk;
+alter table recipe drop constraint recipe_system_fk;
+alter table recipecomment drop constraint recipecomment_recipe_fk;
+alter table recipeingredient drop constraint recipeingredient_recipe_fk;
+alter table recipeingredient drop constraint recipeingredient_unit_fk;
+alter table recipeingredient drop constraint recipeingredient_ingredientrecipe_fk;
+alter table recipeingredient drop constraint recipeingredient_ingredient_fk;
+alter table reciperating drop constraint reciperating_recipe_fk;
+alter table recipestep drop constraint recipestep_recipe_fk;
+alter table relatedrecipe drop constraint relatedrecipe_recipe_fk;
+alter table relatedrecipe drop constraint relatedrecipe_relationkind_fk;
+drop table base;
+drop table course;
+drop table difficulty;
+drop table ethnicity;
+drop table ingredient;
+drop table meal;
+drop table mealrecipe;
+drop table measurement_system;
+drop table preptime;
+drop table recipe;
+drop table recipecomment;
+drop table recipeingredient;
+drop table reciperating;
+drop table recipestep;
+drop table relatedrecipe;
+drop table relationkind;
+drop table unit;
+drop table users;
+drop sequence hibernate_integer_seq;
+drop sequence hibernate_sequence;
+create table base (baseid int4 not null, Value_ varchar(255), primary key (baseid));
+create table course (courseid int4 not null, Value_ varchar(255), primary key (courseid));
+create table difficulty (difficultyid int4 not null, Value_ varchar(255), primary key (difficultyid));
+create table ethnicity (ethnicityid int4 not null, Value_ varchar(255), primary key (ethnicityid));
+create table ingredient (ingredientid int4 not null, description varchar(512), ingr_name varchar(128) not null, primary key (ingredientid));
+create table meal (mealid int8 not null, ownerid int4, meal_name varchar(128) not null, primary key (mealid));
+create table mealrecipe (mealrecipeid int8 not null, recipeid int8, courseid int4, quantity float8, mealid int8, pos int4, primary key (mealrecipeid));
+create table measurement_system (systemid int4 not null, Value_ varchar(255), primary key (systemid));
+create table preptime (preptimeid int4 not null, Value_ varchar(255), primary key (preptimeid));
+create table recipe (recipeid int8 not null, ownerid int4, image varchar(255), excerpt text, source varchar(128), courseid int4, systemid int4, directions text, baseid int4, preptimeid int4, ethnicityid int4, createddate timestamp, servingsize int4 not null, recipe_name varchar(128) not null, modifieddate timestamp, difficultyid int4, primary key (recipeid));
+create table recipecomment (commentid int8 not null, Value_ varchar(255), userid int4 not null, createddate timestamp not null, recipeid int8, pos int4, primary key (commentid));
+create table recipeingredient (recipeingredientid int8 not null, ingredientid int4, unitid int4, optional bool not null, ingredientrecipeid int8, qualifier varchar(255), quantity float8 not null, recipeid int8, pos int4, primary key (recipeingredientid));
+create table reciperating (ratingid int8 not null, userid int4 not null, createddate timestamp not null, rating int2 not null, recipeid int8, pos int4, primary key (ratingid));
+create table recipestep (stepid int8 not null, Value_ varchar(255), recipeid int8, pos int4, primary key (stepid));
+create table relatedrecipe (relatedrecipeid int8 not null, relationkindid int4, recipeid int8, pos int4, primary key (relatedrecipeid));
+create table relationkind (relationkindid int4 not null, Value_ varchar(255), primary key (relationkindid));
+create table unit (unitid int4 not null, Value_ varchar(255), abbreviation varchar(8) not null, mass bool not null, tometric float8, tous float8, toimperial float8, systemid int4, primary key (unitid));
+create table users (userid int4 not null, password varchar(64) not null, email varchar(128) not null, createddate timestamp not null, country varchar(3) not null, accesslevel int4, lastlogindate timestamp, user_name varchar(64) not null, login varchar(32) not null, language varchar(3) not null, primary key (userid));
+alter table meal add constraint meal_user_fk foreign key (ownerid) references users;
+alter table mealrecipe add constraint mealrecipe_recipe_fk foreign key (recipeid) references recipe;
+alter table mealrecipe add constraint mealrecipe_course_fk foreign key (courseid) references course;
+alter table mealrecipe add constraint mealrecipe_meal_fk foreign key (mealid) references meal;
+alter table recipe add constraint recipe_ethnicity_fk foreign key (ethnicityid) references ethnicity;
+alter table recipe add constraint recipe_preptime_fk foreign key (preptimeid) references preptime;
+alter table recipe add constraint recipe_base_fk foreign key (baseid) references base;
+alter table recipe add constraint recipe_user_fk foreign key (ownerid) references users;
+alter table recipe add constraint recipe_course_fk foreign key (courseid) references course;
+alter table recipe add constraint recipe_difficulty_fk foreign key (difficultyid) references difficulty;
+alter table recipe add constraint recipe_system_fk foreign key (systemid) references measurement_system;
+alter table recipecomment add constraint recipecomment_recipe_fk foreign key (recipeid) references recipe;
+alter table recipeingredient add constraint recipeingredient_recipe_fk foreign key (recipeid) references recipe;
+alter table recipeingredient add constraint recipeingredient_unit_fk foreign key (unitid) references unit;
+alter table recipeingredient add constraint recipeingredient_ingredientrecipe_fk foreign key (ingredientrecipeid) references recipe;
+alter table recipeingredient add constraint recipeingredient_ingredient_fk foreign key (ingredientid) references ingredient;
+alter table reciperating add constraint reciperating_recipe_fk foreign key (recipeid) references recipe;
+alter table recipestep add constraint recipestep_recipe_fk foreign key (recipeid) references recipe;
+alter table relatedrecipe add constraint relatedrecipe_recipe_fk foreign key (recipeid) references recipe;
+alter table relatedrecipe add constraint relatedrecipe_relationkind_fk foreign key (relationkindid) references relationkind;
+create sequence hibernate_integer_seq;
+create sequence hibernate_sequence;

+ 8 - 0
defs/sql/postgres/hibernate.properties

@@ -0,0 +1,8 @@
+## PostgreSQL
+
+hibernate.dialect org.hibernate.dialect.PostgreSQLDialect
+hibernate.connection.driver_class org.postgresql.Driver
+hibernate.connection.url jdbc:postgresql:template1
+hibernate.connection.username pg
+hibernate.connection.password
+hibernate.query.substitutions yes 'Y', no 'N'

+ 277 - 0
defs/sql/postgres/load-ingredients.sql

@@ -0,0 +1,277 @@
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'avocado',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'banana',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'chocolate chips (dark)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'chocolate chips (milk)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'cornmeal',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'cumin',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'dill',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'egg',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'fennel',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'flour (buckwheat)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'flour (rye)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'flour (white)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'flour (whole wheat)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'garlic',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'ice cube',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'leek',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'lemon',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'lime',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'milk (cow)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'milk (soy)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'milk (rice)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'mozzarella',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'mushroom (white)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'olive oil (extra virgin)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'parchment paper',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'Parmesan',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'pepper',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'porcini (dried)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'salt',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'vinegar (balsamic)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'vinegar (champagne)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'vinegar (red wine)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'water',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'wine (white)',null);
+INSERT INTO ingredient (ingredientid,ingr_name,description) VALUES (nextval('hibernate_integer_seq'),'wine (red)',null);
+
+/*
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (214,'semi-sweet chocolate chips',3,2.69,5,'t','usa','Nestle');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (83,'banana',36,0.59,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (223,'green beans',36,1.99,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (123,'lemon juice',26,2.99,17,'f','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (202,'basil leaves',42,7.58,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (289,'canned bamboo shoots',27,0.11,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (39,'chicken broth',41,0.099,15,'f','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (58,'cereal',24,0.2325,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (246,'cool whip',21,3.18,1,'t','usa','refrigerate! do not freeze!');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (165,'allspice',42,3.429,15,'t','usa','ground');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (27,'milk',15,0.825,17,'f','usa','2 %');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (44,'coffee beans',11,4.39,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (264,'hazelnut liquor',1,0,11,'f','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (82,'hand soap',23,0,1,'f','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (276,'linguine',34,1.19,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (151,'parsley flakes',42,9.96,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (222,'egg noodles',34,1.32,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (274,'canned minced clams',9,1.48,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (192,'bbq manwich',34,1.75,14,'t','usa','Hunt&#039;s');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (137,'crescent rolls',15,0.28625,15,'t','usa','Pillsbury');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (52,'honey',35,0.249375,15,'f','usa','in the bear!');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (277,'ketchup',12,0.073125,15,'f','usa','Hunt&#039;s');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (33,'olive oil',31,3.99,17,'f','usa','extra virgin');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (40,'parmesan cheese',16,7.99,14,'t','usa','grated');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (84,'buttermilk',15,1.99,17,'f','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (109,'parsley',36,0.99,8,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (67,'italian bread',2,1.19,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (287,'lemon peel',42,3.327,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (113,'beef bouillon',41,0.0838,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (59,'bisquick',32,1.2,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (17,'beef flip steak',29,3.99,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (153,'chicken breast',29,4.99,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (45,'coffee filters',11,1.25,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (282,'dish soap',25,1.29,1,'f','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (42,'mozzarella slices',15,0.365,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (145,'laundry detergent',28,6.39,1,'f','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (239,'mexican grated cheese',15,0.32375,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (230,'jalapeno pepper',27,0.1575,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (271,'basil pesto sauce',34,0.8489,15,'f','usa','In the jar');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (55,'brown sugar',3,0.645,14,'t','usa','light brown');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (43,'coca-cola',40,3.89,1,'f','usa','12-pack of cans');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (154,'cream of mushroom soup',41,1,6,'f','usa','Campbell&#039;s Great for Cooking (blue label)');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (207,'cream of chicken soup',41,1.18,6,'f','usa','Cambell&#039;s Great for Cooking (blue label)');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (28,'green onion',36,0.5,1,'t','usa','scallion');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (124,'ginger',36,0,13,'t','usa','ground');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (138,'jellied cranberry sauce',8,0.89,1,'t','usa','Ocean Spray');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (183,'marsala wine',31,0.18,15,'f','usa','not cooking wine');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (152,'oregano ',42,0.49833,15,'t','usa','leaves');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (48,'orange juice',15,1.65,17,'f','usa','no pulp, preferably with calcium');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (98,'grape jelly',35,0.075,15,'f','usa','Welch&#039;s in the jar');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (155,'button mushroom',36,0.19875,1,'t','usa','Creekside Moonlight mushrooms');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (197,'canned pruned italian tomatos',10,0,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (284,'green bell pepper',36,0.79,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (212,'dry sherry',31,0.17244,15,'f','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (3,'butter',15,2.99,14,'t','usa','salted');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (77,'sushi rice',27,0.738,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (87,'granola bar',6,2.99,1,'t','usa','Quaker chocolate chip');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (244,'pumpkin pie mix',3,0.086,15,'t','usa','Libby&#039;s');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (163,'cilantro',36,0.99,8,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (121,'gladware',19,2.89,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (6,'ice cream',15,2.695,17,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (47,'lambrusco wine',1,0,1,'f','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (1,'baking potato',36,0.75,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (206,'seasoned croutons',31,0.2345,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (10,'sugar',3,0.398,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (162,'tortilla chips',38,3.29,5,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (130,'tortilla',15,0.25625,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (136,'white bread',5,0.99,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (299,'sangria',1,0,1,'f','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (53,'vanilla extract',42,2.295,15,'f','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (300,'paper towels',33,0.99,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (245,'evaporated milk',3,0.115,15,'f','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (32,'garlic powder',42,2.935,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (261,'graham cracker pie crust',3,1.89,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (168,'green chili',27,0.2475,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (275,'italian seasonings',42,5.32,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (260,'kidney beans',10,0.69,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (63,'monterey jack cheese',15,3.99,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (101,'napkins',33,2.69,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (111,'paprika',42,2.37619,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (118,'aluminum foil',19,1.19,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (129,'baking powder',3,0.169,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (85,'baking soda',3,0.69,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (240,'black beans',10,0.69,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (147,'ziti',34,0.95,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (31,'cheddar cheese',15,3.99,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (161,'chili powder',42,1.99583,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (248,'chinese five spice',42,0.845,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (96,'cocoa powder',3,0.31125,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (211,'corn starch',3,0.89,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (172,'cream of tartar',42,1.992,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (110,'red wine vinegar',31,0.1724,15,'f','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (196,'rotini',34,0.89,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (29,'salt',42,0.018846,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (263,'semi-sweet baking chocolate',3,0.33625,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (256,'rosemary ',42,4.34,15,'t','usa','leaves');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (280,'white chocolate chips',3,2.69,5,'t','usa','Nestle');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (51,'tea bags',11,3.09,1,'t','usa','herbal');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (247,'teriyaki sauce',27,0.189,15,'f','usa','Kikkoman marinade');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (125,'vegetable oil',31,1.99,17,'f','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (302,'muffin cups',3,0.0158,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (303,'pork chop',29,1.99,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (184,'angel hair pasta',34,0.86,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (20,'apple',36,0.495,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (305,'beef sirloin tip steak',29,3.19,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (306,'beef brisket',29,3.49,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (224,'carrot',36,0.198,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (72,'beef rump roast',29,2.79,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (203,'deli turkey',29,1.99,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (70,'dryer sheets',28,2.49,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (34,'yellow onion',36,0.5175,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (12,'white onion',36,0.595,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (174,'roma tomato',36,0.22,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (139,'turkey sausage',29,3.19,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (182,'portobello mushroom',36,1.4975,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (208,'sweet pea pods',36,3.99,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (257,'red potato',36,0.1975,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (89,'pine sol',25,2.49,1,'f','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (102,'plastic spoons',33,0.99,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (178,'plastic wrap',19,3.29,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (236,'raspberry preserves',35,0.17722,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (149,'ricotta cheese',15,0.398333,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (90,'sandwich bags',19,1.99,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (93,'windex',25,3.39,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (251,'snow pea pods',36,3.99,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (179,'sponge',25,0.99,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (186,'summer squash',36,0.995,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (86,'sweet potato',36,1.1175,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (104,'toilet bowl cleaner',25,2.49,1,'f','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (180,'toilet paper',43,4.99,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (181,'trash bags',19,2.39,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (189,'roasting chicken',29,6.71,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (144,'formula 409',25,2.99,1,'f','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (193,'hamburger bun',5,0.09875,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (188,'lemon',36,0.2,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (262,'oreo cookies',13,0.157917,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (24,'bag of salad',36,0.598,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (311,'vegetable broth',41,0,11,'f','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (314,'curry',42,0,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (316,'couscous',27,0,11,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (37,'red bell pepper',36,1.49,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (142,'bar soap',23,2.39,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (310,'tortellini',16,3.69,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (309,'tarragon',36,1.99,8,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (238,'fajita seasoning mix',27,0.9815,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (328,'deli ham',16,6.99,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (332,'heavy cream',15,4.99,17,'f','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (329,'swiss cheese',15,3.29,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (333,'sour cherries',8,0.164622,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (122,'light bulbs (2)',33,3.89,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (66,'bacon',29,0.1645,2,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (131,'bottled salsa',27,0.180625,15,'f','usa','if fresh is not available');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (148,'tomato sauce',34,0.043125,15,'f','usa','Hunt&#039;s');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (166,'scallops',39,3.99,14,'t','usa','sea');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (50,'strawberry wine',1,3.39,1,'f','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (266,'unsweetened baking chocolate',3,0.31125,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (64,'wheat bread',5,0.05,2,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (2,'sour cream',15,0.124375,15,'f','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (308,'chives',36,1.99,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (334,'hot sauce',27,0,1,'f','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (62,'deli chicken',29,0.33,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (46,'green tea bag',11,0.1204,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (312,'garbanzo beans',27,0.69,6,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (318,'lamb',29,4.99,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (335,'kleenex',18,0,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (216,'skinless salmon fillet',39,6.75,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (336,'active dry yeast',15,0,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (337,'cornmeal',3,0,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (294,'marachino cherries',21,1.19,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (341,'pecans',36,0,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (338,'barley',37,0.415,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (330,'wild rice',37,0.415,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (204,'deli mustard',12,0.140625,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (346,'worcestershire sauce',12,0.249,15,'f','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (344,'bread crumbs',5,1.39,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (345,'dry mustard',42,1.8645,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (21,'applesauce',8,2.19,1,'f','usa','individual packets ');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (159,'avocado',36,1.19,1,'t','usa','ripe when soft if squeezed; place in sun to ripen');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (25,'bacon bits',31,1.99,1,'t','usa','made from REAL bacon only!');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (99,'bagel',5,0.333,1,'t','usa','Thomas Toaster Bagels');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (304,'beef stew meat',29,2.29,14,'t','usa','not the best quality, but nicely cubed');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (73,'beefy onion soup mix',41,0.795,5,'t','usa','Lipton&#039;s');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (97,'biscuits',15,1.39,1,'t','usa','Pillsbury');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (30,'black pepper',42,0.995,15,'t','usa','ground');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (235,'blueberries',36,2.99,11,'t','usa','frozen or fresh');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (273,'bourbon whiskey',1,0.56826,15,'f','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (13,'broccoli',36,1.19,1,'t','usa','florets');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (343,'canned salmon',9,2.39,6,'t','usa','pink');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (297,'ceaser dressing',31,5.84,17,'f','usa','Ken&#039;s Steakhouse lite');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (295,'chocolate syrup',11,1.99,1,'f','usa','hershey&#039;s');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (56,'walnuts',3,0,11,'t','usa','chopped');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (298,'cucumber ranch dressing',31,6.34,17,'f','usa','Kraft');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (210,'ginger root',36,0.124375,2,'t','usa','throw away the first piece you cut off every time you use it');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (171,'cinnamon',42,1.937,15,'t','usa','ground');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (243,'cloves',42,7.053,15,'t','usa','ground');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (22,'italian salad dressing',31,5.84,17,'f','usa','Ken&#039;s Steakhouse Zesty Italian');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (49,'lemonade',40,3.89,1,'f','usa','Countrytime Pink 12-pack');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (116,'macaroni &amp; cheese',34,0.99,1,'t','usa','Kraft classic');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (65,'mayonnaise',31,3.49,17,'t','usa','Helmann&#039;s');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (190,'pierogies',29,0,1,'t','usa','Sophie&#039;s Choice');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (175,'peanut butter',35,0.131875,15,'t','usa','Jiffy');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (215,'powdered sugar',3,0.99,14,'t','usa','confectioners sugar');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (79,'rice vinegar',27,0,11,'f','usa','NOT a dressing');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (185,'zucchini',36,0.59666,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (5,'yogurt',15,0.75,1,'f','usa','Yoplait');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (296,'whipped cream',15,1.69,1,'t','usa','sshhhhhh');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (198,'white cooking wine',31,0.18,15,'f','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (283,'tv dinner',21,2.99,1,'t','usa','Lean Cuisine');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (315,'turmeric ',42,0,15,'t','usa','Indian Saffron');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (23,'tomato',36,0.995,1,'t','usa','garden vine, hothouse, or salad');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (219,'shallot',36,0.3,1,'t','usa','tiny type of onion bulb');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (169,'shortening',31,0.119375,15,'t','usa','Crisco');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (74,'smoked salmon',15,1.0475,15,'t','usa','lox');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (342,'strawberries',36,2.99,11,'t','usa','fresh or frozen');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (117,'stuffing mix',35,1.99,1,'t','usa','Stovetop');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (61,'syrup',32,2.52,17,'f','usa','for pancakes');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (331,'kirsch',1,0.5284,15,'f','usa','cherry liquor');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (347,'shitake mushroom',36,7.99,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (348,'beef flank steak',29,0,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (349,'red onion',36,0,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (350,'red cooking wine',31,0,15,'f','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (351,'beef chuck roast',29,0,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (112,'bay leaves',42,0.13,1,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (80,'sushi seaweed',27,0.159,1,'t','usa','sheet of seaweed');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (250,'baby corn',27,0.14,15,'t','usa','canned');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (249,'water chestnuts',27,0.07375,15,'t','usa','canned &amp; sliced');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (78,'wasabi',27,2.29,15,'t','usa','Japanese horseradish');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (140,'white rice',27,0.738,14,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (81,'pickled ginger',27,0.149,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (8,'soy sauce',27,0.329,15,'f','usa','San-J');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (269,'lasagna noodles',34,1.49,14,'t','usa','oven ready');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (268,'diced tomatoes',10,0.06375,15,'t','usa','canned');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (38,'tomato paste',34,0.099375,15,'f','usa','Hunt&#039;s');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (339,'frozen corn',21,0.099,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (340,'frozen peas',21,0.099,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (352,'bowtie pasta',34,0,15,'t','usa','');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (26,'flour',3,0.278,14,'t','usa','white sifted all-purpose');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (353,'cabbage',36,2,1,'t','usa','head of cabbage');
+INSERT INTO recipe_ingredients (ingredient_id, ingredient_name, ingredient_location, ingredient_price, ingredient_unit, ingredient_solid, ingredient_system, ingredient_desc) VALUES (354,'white vinegar',31,0,15,'f','usa','');
+*/

+ 148 - 0
defs/sql/postgres/load.sql

@@ -0,0 +1,148 @@
+INSERT INTO ethnicity (ethnicityid,value_) VALUES (nextval('hibernate_integer_seq'),'African');
+INSERT INTO ethnicity (ethnicityid,value_) VALUES (nextval('hibernate_integer_seq'),'American');
+INSERT INTO ethnicity (ethnicityid,value_) VALUES (nextval('hibernate_integer_seq'),'Chinese');
+INSERT INTO ethnicity (ethnicityid,value_) VALUES (nextval('hibernate_integer_seq'),'French');
+INSERT INTO ethnicity (ethnicityid,value_) VALUES (nextval('hibernate_integer_seq'),'German');
+INSERT INTO ethnicity (ethnicityid,value_) VALUES (nextval('hibernate_integer_seq'),'Greek');
+INSERT INTO ethnicity (ethnicityid,value_) VALUES (nextval('hibernate_integer_seq'),'Indian');
+INSERT INTO ethnicity (ethnicityid,value_) VALUES (nextval('hibernate_integer_seq'),'Italian');
+INSERT INTO ethnicity (ethnicityid,value_) VALUES (nextval('hibernate_integer_seq'),'Japanese');
+INSERT INTO ethnicity (ethnicityid,value_) VALUES (nextval('hibernate_integer_seq'),'Mexican');
+INSERT INTO ethnicity (ethnicityid,value_) VALUES (nextval('hibernate_integer_seq'),'Middle Eastern');
+INSERT INTO ethnicity (ethnicityid,value_) VALUES (nextval('hibernate_integer_seq'),'None');
+INSERT INTO ethnicity (ethnicityid,value_) VALUES (nextval('hibernate_integer_seq'),'Slavic');
+INSERT INTO ethnicity (ethnicityid,value_) VALUES (nextval('hibernate_integer_seq'),'Thai');
+
+INSERT INTO measurement_system (systemid,value_) VALUES (1,'USA');
+INSERT INTO measurement_system (systemid,value_) VALUES (2,'Metric');
+--INSERT INTO system (systemid,value_) VALUES (3,'Imperial');
+
+
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'small','sm',null,0,0,FALSE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'medium','med',null,0,0,FALSE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'large','lg',null,0,0,FALSE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'unit','ea',null,0,0,FALSE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'slice','sli',null,0,0,FALSE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'clove','clv',null,0,0,FALSE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'pinch','pn',null,0,0,FALSE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'package','pk',null,0,0,FALSE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'can','cn',null,0,0,FALSE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'drop','dr',null,0,0,FALSE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'bunch','bn',null,0,0,FALSE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'dash','ds',null,0,0,FALSE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'carton','ct',null,0,0,FALSE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'sprig','sprig',null,0,0,FALSE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'leaf','leaf',null,0,0,FALSE);
+
+-- US volumes
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'Teaspoon','t',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'USA'),1,5,FALSE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'Tablespoon','T',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'USA'),3,15,FALSE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'Ounce (fluid)','fl. oz',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'USA'),6,29.56,FALSE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'Cup','c',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'USA'),48,236,FALSE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'Pint','pt',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'USA'),96,473,FALSE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'Quart','q',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'USA'),192,946,FALSE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'Gallon','gal',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'USA'),768,3785.4,FALSE);
+		
+-- US mass
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'Ounce','oz',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'USA'),1,28.35,TRUE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'Pound','lb',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'USA'),16,454,TRUE);
+
+-- Metric volumes	
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'milliliter','ml',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),0.203,1,FALSE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'cubic centimeter','cc',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),0.203,1,FALSE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'tea spoon','tsp',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),1.015,5,FALSE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'centiliter','cl',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),2.03,10,FALSE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'table spoon','Tbsp',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),3.045,15,FALSE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'deciliter','dl',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),20.3,100,FALSE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'cup','cup',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),50.75,250,FALSE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'liter','L',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),203,1000,FALSE);
+
+-- Metric mass
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'milligram','mg',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),3.448275862E-5,1,TRUE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'decagram','dg',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),3.448275862E-4,10,TRUE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'hectogram','hg',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),3.448275862E-3,100,TRUE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'gram','g',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),3.448275862E-2,1000,TRUE);
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric,mass) VALUES (nextval('hibernate_integer_seq'),'kilogram','kg',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Metric'),34.48275862,1000000,TRUE);
+
+		
+/*
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric) VALUES (nextval('hibernate_integer_seq'),'Tablespoon','Tbsp',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Imperial'));
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric) VALUES (nextval('hibernate_integer_seq'),'Teaspoon','tsp',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Imperial'));
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric) VALUES (nextval('hibernate_integer_seq'),'Pound','lb',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Imperial'));
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric) VALUES (nextval('hibernate_integer_seq'),'Ounce','oz',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Imperial'));
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric) VALUES (nextval('hibernate_integer_seq'),'Pint','pt',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Imperial'));
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric) VALUES (nextval('hibernate_integer_seq'),'Quart','q',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Imperial'));
+INSERT INTO unit (unitid,value_,abbreviation,systemid,tous,tometric) VALUES (nextval('hibernate_integer_seq'),'Gallon','gal',
+		(SELECT systemid FROM measurement_system WHERE value_ = 'Imperial'));
+*/
+
+update unit set toimperial = 0 where toimperial is null;
+ALTER TABLE unit ALTER COLUMN tometric SET NOT NULL;
+ALTER TABLE unit ALTER COLUMN tous SET NOT NULL;
+ALTER TABLE unit ALTER COLUMN toimperial SET NOT NULL;
+
+INSERT INTO base (baseid,value_) VALUES (nextval('hibernate_integer_seq'),'Beef');
+INSERT INTO base (baseid,value_) VALUES (nextval('hibernate_integer_seq'),'Bread');
+INSERT INTO base (baseid,value_) VALUES (nextval('hibernate_integer_seq'),'Dairy');
+INSERT INTO base (baseid,value_) VALUES (nextval('hibernate_integer_seq'),'Egg');
+INSERT INTO base (baseid,value_) VALUES (nextval('hibernate_integer_seq'),'Fruit');
+INSERT INTO base (baseid,value_) VALUES (nextval('hibernate_integer_seq'),'Grain');
+INSERT INTO base (baseid,value_) VALUES (nextval('hibernate_integer_seq'),'Lamb');
+INSERT INTO base (baseid,value_) VALUES (nextval('hibernate_integer_seq'),'Other');
+INSERT INTO base (baseid,value_) VALUES (nextval('hibernate_integer_seq'),'Pasta');
+INSERT INTO base (baseid,value_) VALUES (nextval('hibernate_integer_seq'),'Pork/Ham');
+INSERT INTO base (baseid,value_) VALUES (nextval('hibernate_integer_seq'),'Poultry');
+INSERT INTO base (baseid,value_) VALUES (nextval('hibernate_integer_seq'),'Seafood');
+INSERT INTO base (baseid,value_) VALUES (nextval('hibernate_integer_seq'),'Vegetable');
+
+
+INSERT INTO preptime (preptimeid,value_) VALUES (nextval('hibernate_integer_seq'),'0 Minutes');
+INSERT INTO preptime (preptimeid,value_) VALUES (nextval('hibernate_integer_seq'),'1-10 Minutes');
+INSERT INTO preptime (preptimeid,value_) VALUES (nextval('hibernate_integer_seq'),'10-30 Minutes');
+INSERT INTO preptime (preptimeid,value_) VALUES (nextval('hibernate_integer_seq'),'30-60 Minutes');
+INSERT INTO preptime (preptimeid,value_) VALUES (nextval('hibernate_integer_seq'),'60+ Minutes');
+
+
+INSERT INTO difficulty (difficultyid,value_) VALUES (nextval('hibernate_integer_seq'),'Easy');
+INSERT INTO difficulty (difficultyid,value_) VALUES (nextval('hibernate_integer_seq'),'Intermediate');
+INSERT INTO difficulty (difficultyid,value_) VALUES (nextval('hibernate_integer_seq'),'Difficult');
+INSERT INTO difficulty (difficultyid,value_) VALUES (nextval('hibernate_integer_seq'),'Expert');
+
+
+INSERT INTO course (courseid,value_) VALUES (nextval('hibernate_integer_seq'),'Breakfast');
+INSERT INTO course (courseid,value_) VALUES (nextval('hibernate_integer_seq'),'Snack');
+INSERT INTO course (courseid,value_) VALUES (nextval('hibernate_integer_seq'),'Lunch');
+INSERT INTO course (courseid,value_) VALUES (nextval('hibernate_integer_seq'),'Appetizer');
+INSERT INTO course (courseid,value_) VALUES (nextval('hibernate_integer_seq'),'Side Dish');
+INSERT INTO course (courseid,value_) VALUES (nextval('hibernate_integer_seq'),'Entree');
+INSERT INTO course (courseid,value_) VALUES (nextval('hibernate_integer_seq'),'Dessert');
+INSERT INTO course (courseid,value_) VALUES (nextval('hibernate_integer_seq'),'Beverage');
+INSERT INTO course (courseid,value_) VALUES (nextval('hibernate_integer_seq'),'N/A');

+ 26 - 0
defs/sql/postgres/setup.sql

@@ -0,0 +1,26 @@
+/* SQL for PostgreSQL to create iEat system tables.
+ * ===================================================================
+ * This program is free software; you can redistribute it and/or 
+ * modify it under the terms of the GNU General Public License as 
+ * published by the Free Software Foundation; either version 2 of 
+ * the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful, 
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of 
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 
+ * General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License 
+ * along with this program; if not, write to the Free Software 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 
+ * 02111-1307 USA
+ * ===================================================================
+ * $Id: setup.sql 18 2009-05-03 03:12:02Z msqr $
+ * ===================================================================
+ */
+
+create table settings (
+	skey 		varchar(128) not null, 
+	svalue 		varchar(255), 
+	primary key (skey)
+);

+ 196 - 0
defs/sql/postgres/upgrade-1.0-1.2.sql

@@ -0,0 +1,196 @@
+/* SQL for upgrade iEat 1.0 Postgres to 1.2.
+ * ===================================================================
+ * This program is free software; you can redistribute it and/or 
+ * modify it under the terms of the GNU General Public License as 
+ * published by the Free Software Foundation; either version 2 of 
+ * the License, or (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful, 
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of 
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 
+ * General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License 
+ * along with this program; if not, write to the Free Software 
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 
+ * 02111-1307 USA
+ * ===================================================================
+ * $Id: upgrade-1.0-1.2.sql 100 2009-05-19 03:29:09Z msqr $
+ * ===================================================================
+ */
+
+drop table settings;
+alter table setting rename to settings;
+
+alter table Meal drop constraint FK2487E3653F2B3;
+alter table Recipe drop constraint FK91AB41AED03B847F;
+alter table Recipe drop constraint FK91AB41AEB3B58A9A;
+alter table Recipe drop constraint FK91AB41AE2E06D1;
+alter table Recipe drop constraint FK91AB41AEAF42E01B;
+alter table Recipe drop constraint FK91AB41AE6D0BF7BB;
+alter table Recipe drop constraint FK91AB41AE653F2B3;
+alter table Recipe drop constraint FK91AB41AECB1C722F;
+alter table RecipeIngredient drop constraint FK6743CE1FE56A120C;
+alter table RecipeIngredient drop constraint FK6743CE1FF3B271D1;
+alter table RecipeIngredient drop constraint FK6743CE1F36D984;
+alter table RecipeIngredient drop constraint FK6743CE1FC846558E;
+alter table RecipeStep drop constraint FK61DE359AE56A120C;
+alter table RelatedRecipe drop constraint FK35D10179C846558E;
+alter table RelatedRecipe drop constraint FK35D10179323B94;
+alter table RelatedRecipe drop constraint FK35D10179E56A120C;
+alter table MealRecipe drop constraint FK38351351AF42E01B;
+alter table MealRecipe drop constraint FK38351351B45637;
+alter table MealRecipe drop constraint FK38351351C846558E;
+alter table RecipeComment drop constraint FKAB44A4D1E56A120C;
+alter table RecipeRating drop constraint FK606D64EBE56A120C;
+
+drop sequence ethnicity_id_seq;
+drop sequence prep_time_id_seq;
+drop sequence recipe_rating_id_seq;
+drop sequence ingredient_id_seq;
+drop sequence course_id_seq;
+drop sequence difficulty_id_seq;
+drop sequence unit_id_seq;
+drop sequence user_id_seq;
+drop sequence recipe_id_seq;
+drop sequence meal_id_seq;
+drop sequence recipe_comment_id_seq;
+drop sequence base_id_seq;
+
+create sequence hibernate_integer_seq;
+create sequence hibernate_sequence;
+
+SELECT setval('hibernate_integer_seq',
+	(select max(id) from (
+	select baseid as id from base union 
+	select courseid as id from course union 
+	select difficultyid as id from difficulty union 
+	select ethnicityid as id from ethnicity union 
+	select ingredientid as id from ingredient union 
+	select preptimeid as id from preptime union 
+	select relationkindid as id from relationkind union 
+	select systemid as id from system union 
+	select unitid as id from unit union 
+	select userid as id from users
+	) as sub));
+
+SELECT setval('hibernate_sequence',
+	(select max(id) from (
+	select mealid as id from meal union 
+	select recipeid as id from recipe union 
+	select commentid as id from recipecomment 
+	) as sub));
+
+alter table base rename column "value" to value_;
+alter table course rename column "value" to value_;
+alter table difficulty rename column "value" to value_;
+alter table ethnicity rename column "value" to value_;
+alter table ingredient rename column "name" to ingr_name;
+
+alter table meal alter column mealid type bigint;
+alter table meal rename column "owner" to ownerid;
+alter table meal rename column "name" to meal_name;
+
+alter table mealrecipe
+	drop constraint mealrecipe_pkey,
+	add column mealrecipeid bigint;
+update mealrecipe set mealrecipeid = nextval('hibernate_sequence');
+alter table mealrecipe
+	add primary key (mealrecipeid),
+	drop column idinternal;
+alter table mealrecipe rename column recipe to recipeid;
+alter table mealrecipe rename column course to courseid;
+alter table mealrecipe rename column mealimpl_id to mealid;
+alter table mealrecipe rename column recipeinternal_index to pos;
+
+alter table preptime rename column "value" to value_;
+
+alter table recipe alter column recipeid type bigint;
+alter table recipe rename column "owner" to ownerid;
+alter table recipe rename column "course" to courseid;
+alter table recipe rename column "system" to systemid;
+alter table recipe rename column "base" to baseid;
+alter table recipe rename column "preptime" to preptimeid;
+alter table recipe rename column "ethnicity" to ethnicityid;
+alter table recipe rename column "name" to recipe_name;
+alter table recipe rename column "difficulty" to difficultyid;
+
+alter table recipecomment alter column commentid type bigint;
+alter table recipecomment rename column "value" to value_;
+alter table recipecomment rename column "recipeimpl_id" to recipeid;
+alter table recipecomment rename column "commentinternal_index" to pos;
+
+alter table recipeingredient
+	drop constraint recipeingredient_pkey,
+	add column recipeingredientid bigint;
+update recipeingredient set recipeingredientid = nextval('hibernate_sequence');
+alter table recipeingredient
+	add primary key (recipeingredientid),
+	drop column idinternal;
+alter table recipeingredient rename column "ingredient" to ingredientid;
+alter table recipeingredient rename column "unit" to unitid;
+alter table recipeingredient rename column "recipe" to ingredientrecipeid;
+alter table recipeingredient rename column "recipeimpl_id" to recipeid;
+alter table recipeingredient rename column "ingredientinternal_index" to pos;
+
+alter table reciperating rename column "recipeimpl_id" to recipeid;
+alter table reciperating rename column "ratinginternal_index" to pos;
+
+alter table recipestep
+	drop constraint recipestep_pkey,
+	add column stepid bigint;
+update recipestep set stepid = nextval('hibernate_sequence');
+alter table recipestep
+	add primary key (stepid),
+	drop column idinternal;
+alter table recipestep rename column "value" to value_;
+alter table recipestep rename column "recipeimpl_id" to recipeid;
+alter table recipestep rename column "stepinternal_index" to pos;
+
+alter table relatedrecipe
+	drop constraint relatedrecipe_pkey,
+	add column relatedrecipeid bigint;
+update relatedrecipe set relatedrecipeid = nextval('hibernate_sequence');
+alter table relatedrecipe
+	add primary key (relatedrecipeid),
+	drop column idinternal;
+alter table relatedrecipe rename column "kind" to relationkindid;
+alter table relatedrecipe rename column "recipeimpl_id" to recipeid;
+alter table relatedrecipe rename column "relatedrecipeinternal_index" to pos;
+
+alter table relationkind rename column "value" to value_;
+
+alter table "system" rename to measurement_system;
+alter table measurement_system rename column "value" to value_;
+
+alter table unit rename column "value" to value_;
+
+alter table users rename column "name" to "user_name";
+
+/* Start copy from create.sql */
+alter table meal add constraint meal_user_fk foreign key (ownerid) references users;
+alter table mealrecipe add constraint mealrecipe_recipe_fk foreign key (recipeid) references recipe;
+alter table mealrecipe add constraint mealrecipe_course_fk foreign key (courseid) references course;
+alter table mealrecipe add constraint mealrecipe_meal_fk foreign key (mealid) references meal;
+alter table recipe add constraint recipe_ethnicity_fk foreign key (ethnicityid) references ethnicity;
+alter table recipe add constraint recipe_preptime_fk foreign key (preptimeid) references preptime;
+alter table recipe add constraint recipe_base_fk foreign key (baseid) references base;
+alter table recipe add constraint recipe_user_fk foreign key (ownerid) references users;
+alter table recipe add constraint recipe_course_fk foreign key (courseid) references course;
+alter table recipe add constraint recipe_difficulty_fk foreign key (difficultyid) references difficulty;
+alter table recipe add constraint recipe_system_fk foreign key (systemid) references measurement_system;
+alter table recipecomment add constraint recipecomment_recipe_fk foreign key (recipeid) references recipe;
+alter table recipeingredient add constraint recipeingredient_recipe_fk foreign key (recipeid) references recipe;
+alter table recipeingredient add constraint recipeingredient_unit_fk foreign key (unitid) references unit;
+alter table recipeingredient add constraint recipeingredient_ingredientrecipe_fk foreign key (ingredientrecipeid) references recipe;
+alter table recipeingredient add constraint recipeingredient_ingredient_fk foreign key (ingredientid) references ingredient;
+alter table reciperating add constraint reciperating_recipe_fk foreign key (recipeid) references recipe;
+alter table recipestep add constraint recipestep_recipe_fk foreign key (recipeid) references recipe;
+alter table relatedrecipe add constraint relatedrecipe_recipe_fk foreign key (recipeid) references recipe;
+alter table relatedrecipe add constraint relatedrecipe_relationkind_fk foreign key (relationkindid) references relationkind;
+/* End copy from create.sql */
+
+delete from settings where skey in ('env:hibernate.dialect', 'env:setup.requireadmin', 'env:setup.complete');
+insert into settings (skey, svalue) values ('env:setup.requireadmin', 'false');
+insert into settings (skey, svalue) values ('env:setup.complete', 'false');
+

+ 3 - 0
defs/version.txt

@@ -0,0 +1,3 @@
+App:        $app_name$
+Version:    $version$
+Build date: $build_date$


+ 201 - 0
demo/jakarta-tomcat/LICENSE

@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.

+ 13 - 0
demo/jakarta-tomcat/NOTICE

@@ -0,0 +1,13 @@
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+Java Management Extensions (JMX) support is provided by
+the MX4J package, which is open source software.  The
+original software and related information is available
+at http://mx4j.sourceforge.net.
+
+The Windows Installer is built with the Nullsoft
+Scriptable Install Sysem (NSIS), which is
+open source software.  The original software and
+related information is available at
+http://nsis.sourceforge.net.

+ 248 - 0
demo/jakarta-tomcat/RELEASE-NOTES

@@ -0,0 +1,248 @@
+
+
+                     Apache Tomcat Version @VERSION@
+                            Release Notes
+
+
+$Id: RELEASE-NOTES,v 1.18 2004/06/15 18:42:06 yoavs Exp $
+
+
+============================
+KNOWN ISSUES IN THIS RELEASE:
+============================
+
+* Tomcat 5.0 and JNI Based Applications
+* Tomcat 5.0 Standard APIs Available
+* Tomcat 5.0 and XML Parsers
+* Web application reloading and static fields in shared libraries
+* JAVAC leaking memory
+* Tomcat on Linux
+* Enabling SSI and CGI Support
+* Security manager URLs
+* Symlinking static resources
+* Enabling invoker servlet
+* Viewing the Tomcat Change Log
+* When all else fails
+
+
+-------------------------------------
+Tomcat 5.0 and JNI Based Applications:
+-------------------------------------
+
+Applications that require native libraries must ensure that the libraries have
+been loaded prior to use.  Typically, this is done with a call like:
+
+  static {
+    System.loadLibrary("path-to-library-file");
+  }
+
+in some class.  However, the application must also ensure that the library is
+not loaded more than once.  If the above code were placed in a class inside
+the web application (i.e. under /WEB-INF/classes or /WEB-INF/lib), and the
+application were reloaded, the loadLibrary() call would be attempted a second
+time.
+
+To avoid this problem, place classes that load native libraries outside of the
+web application, and ensure that the loadLibrary() call is executed only once
+during the lifetime of a particular JVM.
+
+
+----------------------------------
+Tomcat 5.0 Standard APIs Available:
+----------------------------------
+
+A standard installation of Tomcat 5 makes all of the following APIs available
+for use by web applications (by placing them in "common/lib" or "shared/lib"):
+* ant.jar (Apache Ant 1.6 or later)
+* commons-collections*.jar (Commons Collections 2.1 or later)
+* commons-dbcp.jar (Commons DBCP 1.1 or later)
+* commons-el.jar (Commons Expression Language 1.0)
+* commons-logging-api.jar (Commons Logging API 1.0.3 or later)
+* commons-pool.jar (Commons Pool 1.1 or later)
+* jasper-compiler.jar (Jasper 2 Compiler)
+* jasper-runtime.jar (Jasper 2 Runtime)
+* jsp-api.jar (JSP 2.0 API)
+* commons-el.jar (JSP 2.0 Expression Language)
+* naming-common.jar (JNDI Context implementation)
+* naming-factory.jar (JNDI object factories for J2EE ENC support)
+* naming-resources.jar (JNDI DirContext implementations)
+* servlet-api.jar (Servlet 2.4 API)
+
+You can make additional APIs available to all of your web applications by
+putting unpacked classes into a "classes" directory (not created by default),
+or by placing them in JAR files in the "lib" directory.
+
+Tomcat 5.0 also makes Xerces 2 and the Commons Logging API (release 1.0.3)
+available to web applications.
+
+Please note that the JMX API is available to applications as well.  The jmx.jar
+file used to be located in the common/lib directory, but was moved to the bin
+directory as part of the Tomcat 5.0.20 release.  The jmx.jar is in Tomcat's
+bootstrap classpath (included via the Class Path line in bootstrap.jar's manifest).
+
+
+--------------------------
+Tomcat 5.0 and XML Parsers:
+--------------------------
+
+As described above, Tomcat 5.0 makes an XML parser (and many other standard
+APIs) available to web applications.  This parser is also used internally
+to parse web.xml files and the server.xml configuration file.  If you wish,
+you may replace the "xercesImpl.jar" file in "common/endorsed" with another
+XML parser, as long as it is compatible with the JAXP 1.2 APIs.
+
+Xerces 2.6.2 is included.
+
+
+---------------------------------------------------------------
+Web application reloading and static fields in shared libraries:
+---------------------------------------------------------------
+
+Some shared libraries (many are part of the JDK) keep references to objects
+instantiated by the web application. To avoid class loading related problems
+(ClassCastExceptions, messages indicating that the classloader
+is stopped, etc.), the shared libraries state should be reinitialized.
+
+Something which might help is to avoid putting classes which would be
+referenced by a shared static field in the web application classloader,
+and putting them in the shared classloader instead (JARs should be put in the
+"lib" folder, and classes should be put in the "classes" folder).
+
+
+--------------------
+JAVAC leaking memory:
+--------------------
+
+The Java compiler leaks memory each time a class is compiled. Web applications
+containing hundreds of JSP files may as a result trigger out of memory errors
+once a significant number of pages have been accessed. The memory can only be
+freed by stopping Tomcat and then restarting it.
+
+The JSP command line compiler (JSPC) can also be used to precompile the JSPs.
+
+Note: This issue has been fixed in Sun JDK 1.4.x.
+
+
+---------------
+Tomcat on Linux:
+---------------
+
+Virtual machine crashes can be experienced when using certain combinations of
+kernel / glibc under Linux with Sun Hotspot 1.2 to 1.3. The crashes were
+reported to occur mostly on startup. Sun JDK 1.4 does not exhibit the problems,
+and neither does IBM JDK for Linux.
+
+The problems can be fixed by reducing the default stack size. At bash shell,
+do "ulimit -s 2048"; use "limit stacksize 2048" for tcsh.
+
+GLIBC 2.2 / Linux 2.4 users should also define an environment variable:
+export LD_ASSUME_KERNEL=2.2.5
+
+Additionally, Redhat Linux 9.0 users should use the same setting, to avoid
+stability problems.
+
+
+----------------------------
+Enabling SSI and CGI Support:
+----------------------------
+
+Having CGI and SSI available to web applications created security problems when
+using a security manager (as a malicious web application could use them to
+sidestep the security manager access control). In Tomcat 5.0, they have been
+disabled by default, as our goal is to provide a fully secure default
+configuration. However, CGI and SSI remain available.
+
+
+To enable CGI:
+* rename the file $CATALINA_HOME/server/lib/servlets-cgi.renametojar to
+  $CATALINA_HOME/server/lib/servlets-cgi.jar.
+* in $CATALINA_HOME/conf/web.xml, you will need to uncomment 2 areas, the
+  servlet declaration and the servlet mapping. The servlet declaration
+  looks similar to this:
+    <servlet>
+        <servlet-name>cgi</servlet-name>
+        ...
+    </servlet>
+
+  While the servlet mapping looks similar to this:
+    <servlet-mapping>
+        <servlet-name>cgi</servlet-name>
+        <url-pattern>/cgi-bin/*</url-pattern>
+    </servlet-mapping>
+
+  Alternately, these servlet declarations and mappings
+  can be added to your web application deployment descriptor.
+
+To enable SSI:
+* rename the file $CATALINA_HOME/server/lib/servlets-ssi.renametojar to
+  $CATALINA_HOME/server/lib/servlets-ssi.jar.
+* in $CATALINA_HOME/conf/web.xml, you will need to uncomment 2 areas, the
+  servlet declaration and the servlet mapping. The servlet declaration
+  looks similar to this:
+    <servlet>
+        <servlet-name>ssi</servlet-name>
+        ...
+    </servlet>
+
+  While the servlet mapping looks similar to this:
+    <servlet-mapping>
+        <servlet-name>ssi</servlet-name>
+        <url-pattern>*.shtml</url-pattern>
+    </servlet-mapping>
+
+  Alternately, these servlet declarations and mappings
+  can be added to your web application deployment descriptor.
+
+
+
+---------------------
+Security manager URLs:
+---------------------
+
+The URLs to be used in the policy file to grant permissions to JARs located
+inside the web application repositories have changed as of Tomcat 4.1.
+
+In Tomcat 4.0, codeBase URLs for JARs loaded from web application
+repositories were:
+jar:file:${catalina.home}/webapps/examples/WEB-INF/lib/driver.jar!/-
+
+In Tomcat 4.1 and 5.0, they should be:
+file:${catalina.home}/webapps/examples/WEB-INF/lib/driver.jar
+
+
+---------------------------
+Symlinking static resources:
+---------------------------
+
+By default, Unix symlinks will not work when used in a web application to link
+resources located outside the web application root directory.
+
+This behavior is optional, and the "allowLinking" flag may be used to disable
+the check.
+
+
+------------------------
+Enabling invoker servlet:
+------------------------
+
+Starting with Tomcat 4.1.12, the invoker servlet is no longer available by
+default in all webapps. Enabling it for all webapps is possible by editing
+$CATALINA_HOME/conf/web.xml to uncomment the "/servlet/*" servlet-mapping
+definition.
+
+Using the invoker servlet in a production environment is not recommended and
+is unsupported.
+
+------------------------
+Viewing the Tomcat Change Log 
+------------------------
+
+The Change Log for tomcat 5 is available at
+http://jakarta.apache.org/tomcat/tomcat-5.0-doc/changelog.html.
+
+-------------------
+When all else fails:
+-------------------
+
+See the FAQ
+http://jakarta.apache.org/tomcat/faq/

+ 144 - 0
demo/jakarta-tomcat/RUNNING.txt

@@ -0,0 +1,144 @@
+$Id: RUNNING.txt,v 1.1 2005/03/05 00:29:13 matt Exp $
+
+
+                 Running The Tomcat 5 Servlet/JSP Container
+                 ==========================================
+
+This subproject contains Tomcat 5, a server that implements the Servlet 2.4
+and JSP 2.0 specifications from the Java Community Process
+<http://www.jcp.org/>.  In order to install and run this container, you must do
+the following:
+
+
+(0) Download and Install a Java Development Kit
+
+* Download a Java Development Kit (JDK) release (version 1.3 or later) from:
+
+    http://java.sun.com/j2se/
+
+* Install the JDK according to the instructions included with the release.
+
+* Set an environment variable JAVA_HOME to the pathname of the directory
+  into which you installed the JDK release.
+
+
+(1) Download and Install the Tomcat 5 Binary Distribution
+
+NOTE:  As an alternative to downloading a binary distribution, you can create
+your own from the Tomcat source repository, as described in "BUILDING.txt".
+If you do this, the value to use for "${catalina.home}" will be the "dist"
+subdirectory of your source distribution.
+
+* Download a binary distribution of Tomcat from:
+
+    http://jakarta.apache.org/site/binindex.cgi
+
+* Unpack the binary distribution into a convenient location so that the
+  distribution resides in its own directory (conventionally named
+  "jakarta-tomcat-5").  For the purposes of the remainder of this document,
+  the symbolic name "$CATALINA_HOME" is used to refer to the full
+  pathname of the release directory.
+
+
+(2) Start Up Tomcat 5
+
+Tomcat 5 can be started by executing the following commands:
+
+      $CATALINA_HOME\bin\startup.bat          (Windows)
+
+      $CATALINA_HOME/bin/startup.sh           (Unix)
+
+After startup, the default web applications included with Tomcat 5 will be
+available by visiting:
+
+    http://localhost:8080/
+
+Further information about configuring and running Tomcat 5 can be found in
+the documentation included here, as well as on the Tomcat web site:
+
+    http://jakarta.apache.org/tomcat/
+
+
+(3) Shut Down Tomcat 5
+
+Tomcat 5 can be shut down by executing the following command:
+
+      $CATALINA_HOME\bin\shutdown            (Windows)
+
+      $CATALINA_HOME/bin/shutdown.sh         (Unix)
+
+
+(4) Advanced Configuration - Multiple Tomcat 5 Instances
+
+In many circumstances, it is desirable to have a single copy of a Tomcat 5
+binary distribution shared among multiple users on the same server.  To make
+this possible, you can pass a "-Dcatalina.base=$CATALINA_BASE" argument when
+executing the startup command (see (2)). In this
+"-Dcatalina.base=$CATALINA_BASE" argument, replace $CATALINA_BASE with the
+directory that contains the files for your 'personal' Tomcat 5 instance.
+
+When you use this "-Dcatalina.base=$CATALINA_BASE" argument, Tomcat 5 will
+calculate all relative references for files in the following directories based
+on the value of $CATALINA_BASE instead of $CATALINA_HOME	:
+
+* conf - Server configuration files (including server.xml)
+
+* logs - Log and output files
+
+* shared - For classes and resources that must be shared across all web
+           applications
+
+* webapps - Automatically loaded web applications
+
+* work - Temporary working directories for web applications
+
+* temp - Directory used by the JVM for temporary files (java.io.tmpdir)
+
+If you do not pass the "-Dcatalina.base=$CATALINA_BASE" argument to the startup command, $CATALINA_BASE will default to the same value as $CATALINA_HOME (which means that the same directory is used for all relative path resolutions).
+
+The administration and manager web applications, which are defined in the
+$CATALINA_BASE/conf/Catalina/localhost/admin.xml and $CATALINA_BASE/conf/Catalina/localhost/manager.xml files, will
+not run in that configuration, unless either:
+- The path specified in the docBase attribute of the Context element is made
+  absolute, and replaced respectively by $CATALINA_HOME/server/webapps/admin
+  and $CATALINA_HOME/server/webapps/manager
+- Both web applications are copied or moved to $CATALINA_BASE, and the path specified in the   docBase attribute of the Context element is modified appropriately.
+- Both web applications are disabled by removing $CATALINA_BASE/conf/Catalina/localhost/admin.xml
+  and $CATALINA_BASE/conf/Catalina/localhost/manager.xml
+
+
+(5) Troubleshooting:
+
+There are only really 3 things likely to go wrong during the stand-alone
+Tomcat 5 install:
+
+1) The most common hiccup is when another web server (or any process for that
+   matter) has laid claim to port 8080.  This is the default HTTP port that
+   Tomcat attempts to bind to at startup.  To change this, open the file:
+
+       $CATALINA_HOME/conf/server.xml
+
+   and search for '8080'.  Change it to a port that isn't in use, and is
+   greater than 1024, as ports less than or equal to 1024 require superuser
+   access to bind under UNIX.
+
+   Restart Tomcat and you're in business.  Be sure that you replace the "8080"
+   in the URL you're using to access Tomcat.  For example, if you change the
+   port to 1977, you would request the URL http://localhost:1977/ in your browser.
+
+2) An "out of environment space" error when running the batch files in
+   Windows 95, 98, or ME operating systems.
+
+   Right-click on the STARTUP.BAT and SHUTDOWN.BAT files.  Click on
+   "Properties", then on the "Memory" tab.  For the "Initial environment" field,
+   enter in something like 4096.
+
+   After you click apply, Windows will create shortcuts which you can use to start and stop the container.
+
+3) The 'localhost' machine isn't found.  This could happen if you're behind a
+   proxy.  If that's the case, make sure the proxy configuration for your
+   browser knows that you shouldn't be going through the proxy to access the
+   "localhost".
+
+   In Netscape, this is under Edit/Preferences -> Advanced/Proxies, and in
+   Internet Explorer, Tools -> Internet Options -> Connections -> LAN Settings.

BIN
demo/jakarta-tomcat/bin/LauncherBootstrap.class


BIN
demo/jakarta-tomcat/bin/bootstrap.jar


+ 192 - 0
demo/jakarta-tomcat/bin/catalina.50.bat

@@ -0,0 +1,192 @@
+@echo off
+if "%OS%" == "Windows_NT" setlocal
+rem ---------------------------------------------------------------------------
+rem Start/Stop Script for the CATALINA Server
+rem
+rem Environment Variable Prequisites
+rem
+rem   CATALINA_HOME   May point at your Catalina "build" directory.
+rem
+rem   CATALINA_BASE   (Optional) Base directory for resolving dynamic portions
+rem                   of a Catalina installation.  If not present, resolves to
+rem                   the same directory that CATALINA_HOME points to.
+rem
+rem   CATALINA_OPTS   (Optional) Java runtime options used when the "start",
+rem                   "stop", or "run" command is executed.
+rem
+rem   CATALINA_TMPDIR (Optional) Directory path location of temporary directory
+rem                   the JVM should use (java.io.tmpdir).  Defaults to
+rem                   %CATALINA_BASE%\temp.
+rem
+rem   JAVA_HOME       Must point at your Java Development Kit installation.
+rem
+rem   JAVA_OPTS       (Optional) Java runtime options used when the "start",
+rem                   "stop", or "run" command is executed.
+rem
+rem   JSSE_HOME       (Optional) May point at your Java Secure Sockets Extension
+rem                   (JSSE) installation, whose JAR files will be added to the
+rem                   system class path used to start Tomcat.
+rem
+rem   JPDA_TRANSPORT  (Optional) JPDA transport used when the "jpda start"
+rem                   command is executed. The default is "dt_shmem".
+rem
+rem   JPDA_ADDRESS    (Optional) Java runtime options used when the "jpda start"
+rem                   command is executed. The default is "jdbconn".
+rem
+rem $Id: catalina.50.bat,v 1.1.2.1 2004/08/24 17:57:58 amyroh Exp $
+rem ---------------------------------------------------------------------------
+
+rem Guess CATALINA_HOME if not defined
+set CURRENT_DIR=%cd%
+if not "%CATALINA_HOME%" == "" goto gotHome
+set CATALINA_HOME=%CURRENT_DIR%
+if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
+cd ..
+set CATALINA_HOME=%cd%
+cd %CURRENT_DIR%
+:gotHome
+if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
+echo The CATALINA_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+goto end
+:okHome
+
+rem Get standard environment variables
+if exist "%CATALINA_HOME%\bin\setenv.bat" call "%CATALINA_HOME%\bin\setenv.bat"
+
+rem Get standard Java environment variables
+if exist "%CATALINA_HOME%\bin\setclasspath.bat" goto okSetclasspath
+echo Cannot find %CATALINA_HOME%\bin\setclasspath.bat
+echo This file is needed to run this program
+goto end
+:okSetclasspath
+set BASEDIR=%CATALINA_HOME%
+call "%CATALINA_HOME%\bin\setclasspath.bat"
+
+rem Add on extra jar files to CLASSPATH
+if "%JSSE_HOME%" == "" goto noJsse
+set CLASSPATH=%CLASSPATH%;%JSSE_HOME%\lib\jcert.jar;%JSSE_HOME%\lib\jnet.jar;%JSSE_HOME%\lib\jsse.jar
+:noJsse
+set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\bootstrap.jar
+
+if not "%CATALINA_BASE%" == "" goto gotBase
+set CATALINA_BASE=%CATALINA_HOME%
+:gotBase
+
+if not "%CATALINA_TMPDIR%" == "" goto gotTmpdir
+set CATALINA_TMPDIR=%CATALINA_BASE%\temp
+:gotTmpdir
+
+rem ----- Execute The Requested Command ---------------------------------------
+
+echo Using CATALINA_BASE:   %CATALINA_BASE%
+echo Using CATALINA_HOME:   %CATALINA_HOME%
+echo Using CATALINA_TMPDIR: %CATALINA_TMPDIR%
+echo Using JAVA_HOME:       %JAVA_HOME%
+
+set _EXECJAVA=%_RUNJAVA%
+set MAINCLASS=org.apache.catalina.startup.Bootstrap
+set ACTION=start
+set SECURITY_POLICY_FILE=
+set DEBUG_OPTS=
+set JPDA=
+
+if not ""%1"" == ""jpda"" goto noJpda
+set JPDA=jpda
+if not "%JPDA_TRANSPORT%" == "" goto gotJpdaTransport
+set JPDA_TRANSPORT=dt_shmem
+:gotJpdaTransport
+if not "%JPDA_ADDRESS%" == "" goto gotJpdaAddress
+set JPDA_ADDRESS=jdbconn
+:gotJpdaAddress
+shift
+:noJpda
+
+if ""%1"" == ""debug"" goto doDebug
+if ""%1"" == ""run"" goto doRun
+if ""%1"" == ""start"" goto doStart
+if ""%1"" == ""stop"" goto doStop
+if ""%1"" == ""version"" goto doVersion
+
+echo Usage:  catalina ( commands ... )
+echo commands:
+echo   debug             Start Catalina in a debugger
+echo   debug -security   Debug Catalina with a security manager
+echo   jpda start        Start Catalina under JPDA debugger
+echo   run               Start Catalina in the current window
+echo   run -security     Start in the current window with security manager
+echo   start             Start Catalina in a separate window
+echo   start -security   Start in a separate window with security manager
+echo   stop              Stop Catalina
+echo   version           What version of tomcat are you running?
+goto end
+
+:doDebug
+shift
+set _EXECJAVA=%_RUNJDB%
+set DEBUG_OPTS=-sourcepath "%CATALINA_HOME%\..\..\jakarta-tomcat-catalina\catalina\src\share"
+if not ""%1"" == ""-security"" goto execCmd
+shift
+echo Using Security Manager
+set SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy
+goto execCmd
+
+:doRun
+shift
+if not ""%1"" == ""-security"" goto execCmd
+shift
+echo Using Security Manager
+set SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy
+goto execCmd
+
+:doStart
+shift
+if not "%OS%" == "Windows_NT" goto noTitle
+set _EXECJAVA=start "Tomcat" %_RUNJAVA%
+goto gotTitle
+:noTitle
+set _EXECJAVA=start %_RUNJAVA%
+:gotTitle
+if not ""%1"" == ""-security"" goto execCmd
+shift
+echo Using Security Manager
+set SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy
+goto execCmd
+
+:doStop
+shift
+set ACTION=stop
+goto execCmd
+
+:doVersion
+%_EXECJAVA% -classpath "%CATALINA_HOME%\server\lib\catalina.jar" org.apache.catalina.util.ServerInfo
+goto end
+
+
+:execCmd
+rem Get remaining unshifted command line arguments and save them in the
+set CMD_LINE_ARGS=
+:setArgs
+if ""%1""=="""" goto doneSetArgs
+set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
+shift
+goto setArgs
+:doneSetArgs
+
+rem Execute Java with the applicable properties
+if not "%JPDA%" == "" goto doJpda
+if not "%SECURITY_POLICY_FILE%" == "" goto doSecurity
+%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
+goto end
+:doSecurity
+%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
+goto end
+:doJpda
+if not "%SECURITY_POLICY_FILE%" == "" goto doSecurityJpda
+%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% -Xdebug -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n %DEBUG_OPTS% -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
+goto end
+:doSecurityJpda
+%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n %DEBUG_OPTS% -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
+goto end
+
+:end

+ 287 - 0
demo/jakarta-tomcat/bin/catalina.50.sh

@@ -0,0 +1,287 @@
+#!/bin/sh
+# -----------------------------------------------------------------------------
+# Start/Stop Script for the CATALINA Server
+#
+# Environment Variable Prequisites
+#
+#   CATALINA_HOME   May point at your Catalina "build" directory.
+#
+#   CATALINA_BASE   (Optional) Base directory for resolving dynamic portions
+#                   of a Catalina installation.  If not present, resolves to
+#                   the same directory that CATALINA_HOME points to.
+#
+#   CATALINA_OPTS   (Optional) Java runtime options used when the "start",
+#                   "stop", or "run" command is executed.
+#
+#   CATALINA_TMPDIR (Optional) Directory path location of temporary directory
+#                   the JVM should use (java.io.tmpdir).  Defaults to
+#                   $CATALINA_BASE/temp.
+#
+#   JAVA_HOME       Must point at your Java Development Kit installation.
+#
+#   JAVA_OPTS       (Optional) Java runtime options used when the "start",
+#                   "stop", or "run" command is executed.
+#
+#   JPDA_TRANSPORT  (Optional) JPDA transport used when the "jpda start"
+#                   command is executed. The default is "dt_socket".
+#
+#   JPDA_ADDRESS    (Optional) Java runtime options used when the "jpda start"
+#                   command is executed. The default is 8000.
+#
+#   JSSE_HOME       (Optional) May point at your Java Secure Sockets Extension
+#                   (JSSE) installation, whose JAR files will be added to the
+#                   system class path used to start Tomcat.
+#
+#   CATALINA_PID    (Optional) Path of the file which should contains the pid
+#                   of catalina startup java process, when start (fork) is used
+#
+# $Id: catalina.50.sh,v 1.1 2005/03/05 00:29:13 matt Exp $
+# -----------------------------------------------------------------------------
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false
+os400=false
+case "`uname`" in
+CYGWIN*) cygwin=true;;
+OS400*) os400=true;;
+esac
+
+# resolve links - $0 may be a softlink
+PRG="$0"
+
+while [ -h "$PRG" ]; do
+  ls=`ls -ld "$PRG"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '.*/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG=`dirname "$PRG"`/"$link"
+  fi
+done
+
+# Get standard environment variables
+PRGDIR=`dirname "$PRG"`
+
+# Only set CATALINA_HOME if not already set
+[ -z "$CATALINA_HOME" ] && CATALINA_HOME=`cd "$PRGDIR/.." ; pwd`
+
+if [ -r "$CATALINA_HOME"/bin/setenv.sh ]; then
+  . "$CATALINA_HOME"/bin/setenv.sh
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin; then
+  [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+  [ -n "$CATALINA_HOME" ] && CATALINA_HOME=`cygpath --unix "$CATALINA_HOME"`
+  [ -n "$CATALINA_BASE" ] && CATALINA_BASE=`cygpath --unix "$CATALINA_BASE"`
+  [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+  [ -n "$JSSE_HOME" ] && JSSE_HOME=`cygpath --absolute --unix "$JSSE_HOME"`
+fi
+
+# For OS400
+if $os400; then
+  # Set job priority to standard for interactive (interactive - 6) by using
+  # the interactive priority - 6, the helper threads that respond to requests
+  # will be running at the same priority as interactive jobs.
+  COMMAND='chgjob job('$JOBNAME') runpty(6)'
+  system $COMMAND
+
+  # Enable multi threading
+  export QIBM_MULTI_THREADED=Y
+fi
+
+# Get standard Java environment variables
+if [ -r "$CATALINA_HOME"/bin/setclasspath.sh ]; then
+  BASEDIR="$CATALINA_HOME"
+  . "$CATALINA_HOME"/bin/setclasspath.sh
+else
+  echo "Cannot find $CATALINA_HOME/bin/setclasspath.sh"
+  echo "This file is needed to run this program"
+  exit 1
+fi
+
+# Add on extra jar files to CLASSPATH
+if [ -n "$JSSE_HOME" ]; then
+  CLASSPATH="$CLASSPATH":"$JSSE_HOME"/lib/jcert.jar:"$JSSE_HOME"/lib/jnet.jar:"$JSSE_HOME"/lib/jsse.jar
+fi
+CLASSPATH="$CLASSPATH":"$CATALINA_HOME"/bin/bootstrap.jar:"$CATALINA_HOME"/bin/commons-logging-api.jar
+
+if [ -z "$CATALINA_BASE" ] ; then
+  CATALINA_BASE="$CATALINA_HOME"
+fi
+
+if [ -z "$CATALINA_TMPDIR" ] ; then
+  # Define the java.io.tmpdir to use for Catalina
+  CATALINA_TMPDIR="$CATALINA_BASE"/temp
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+  JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
+  CATALINA_HOME=`cygpath --absolute --windows "$CATALINA_HOME"`
+  CATALINA_BASE=`cygpath --absolute --windows "$CATALINA_BASE"`
+  CATALINA_TMPDIR=`cygpath --absolute --windows "$CATALINA_TMPDIR"`
+  CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+  [ -n "$JSSE_HOME" ] && JSSE_HOME=`cygpath --absolute --windows "$JSSE_HOME"`
+  JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
+fi
+
+# ----- Execute The Requested Command -----------------------------------------
+
+echo "Using CATALINA_BASE:   $CATALINA_BASE"
+echo "Using CATALINA_HOME:   $CATALINA_HOME"
+echo "Using CATALINA_TMPDIR: $CATALINA_TMPDIR"
+echo "Using JAVA_HOME:       $JAVA_HOME"
+
+if [ "$1" = "jpda" ] ; then
+  if [ -z "$JPDA_TRANSPORT" ]; then
+    JPDA_TRANSPORT="dt_socket"
+  fi
+  if [ -z "$JPDA_ADDRESS" ]; then
+    JPDA_ADDRESS="8000"
+  fi
+  if [ -z "$JPDA_OPTS" ]; then
+    JPDA_OPTS="-Xdebug -Xrunjdwp:transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=n"
+  fi
+  CATALINA_OPTS="$CATALINA_OPTS $JPDA_OPTS"
+  shift
+fi
+
+if [ "$1" = "debug" ] ; then
+
+  if $os400; then
+    echo "Debug command not available on OS400"
+    exit 1
+  else
+    shift
+    if [ "$1" = "-security" ] ; then
+      echo "Using Security Manager"
+      shift
+      exec "$_RUNJDB" $JAVA_OPTS $CATALINA_OPTS \
+        -classpath "$CLASSPATH" \
+        -sourcepath "$CATALINA_HOME"/../../jakarta-tomcat-catalina/catalina/src/share \
+        -Djava.security.manager \
+        -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
+        -Dcatalina.base="$CATALINA_BASE" \
+        -Dcatalina.home="$CATALINA_HOME" \
+        -Djava.io.tmpdir="$CATALINA_TMPDIR" \
+        org.apache.catalina.startup.Bootstrap "$@" start
+    else
+      exec "$_RUNJDB" $JAVA_OPTS $CATALINA_OPTS \
+        -classpath "$CLASSPATH" \
+        -sourcepath "$CATALINA_HOME"/../../jakarta-tomcat-catalina/catalina/src/share \
+        -Dcatalina.base="$CATALINA_BASE" \
+        -Dcatalina.home="$CATALINA_HOME" \
+        -Djava.io.tmpdir="$CATALINA_TMPDIR" \
+        org.apache.catalina.startup.Bootstrap "$@" start
+    fi
+  fi
+
+elif [ "$1" = "run" ]; then
+
+  shift
+  if [ "$1" = "-security" ] ; then
+    echo "Using Security Manager"
+    shift
+    exec "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
+      -classpath "$CLASSPATH" \
+      -Djava.security.manager \
+      -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
+      -Dcatalina.base="$CATALINA_BASE" \
+      -Dcatalina.home="$CATALINA_HOME" \
+      -Djava.io.tmpdir="$CATALINA_TMPDIR" \
+      org.apache.catalina.startup.Bootstrap "$@" start
+  else
+    exec "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
+      -classpath "$CLASSPATH" \
+      -Dcatalina.base="$CATALINA_BASE" \
+      -Dcatalina.home="$CATALINA_HOME" \
+      -Djava.io.tmpdir="$CATALINA_TMPDIR" \
+      org.apache.catalina.startup.Bootstrap "$@" start
+  fi
+
+elif [ "$1" = "start" ] ; then
+
+  shift
+  touch "$CATALINA_BASE"/logs/catalina.out
+  if [ "$1" = "-security" ] ; then
+    echo "Using Security Manager"
+    shift
+    "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
+      -classpath "$CLASSPATH" \
+      -Djava.security.manager \
+      -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
+      -Dcatalina.base="$CATALINA_BASE" \
+      -Dcatalina.home="$CATALINA_HOME" \
+      -Djava.io.tmpdir="$CATALINA_TMPDIR" \
+      org.apache.catalina.startup.Bootstrap "$@" start \
+      >> "$CATALINA_BASE"/logs/catalina.out 2>&1 &
+
+      if [ ! -z "$CATALINA_PID" ]; then
+        echo $! > $CATALINA_PID
+      fi
+  else
+    "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
+      -classpath "$CLASSPATH" \
+      -Dcatalina.base="$CATALINA_BASE" \
+      -Dcatalina.home="$CATALINA_HOME" \
+      -Djava.io.tmpdir="$CATALINA_TMPDIR" \
+      org.apache.catalina.startup.Bootstrap "$@" start \
+      >> "$CATALINA_BASE"/logs/catalina.out 2>&1 &
+
+      if [ ! -z "$CATALINA_PID" ]; then
+        echo $! > $CATALINA_PID
+      fi
+  fi
+
+elif [ "$1" = "stop" ] ; then
+
+  shift
+  FORCE=0
+  if [ "$1" = "-force" ]; then
+    shift
+    FORCE=1
+  fi
+
+  "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
+    -classpath "$CLASSPATH" \
+    -Dcatalina.base="$CATALINA_BASE" \
+    -Dcatalina.home="$CATALINA_HOME" \
+    -Djava.io.tmpdir="$CATALINA_TMPDIR" \
+    org.apache.catalina.startup.Bootstrap "$@" stop
+
+  if [ $FORCE -eq 1 ]; then
+    if [ ! -z "$CATALINA_PID" ]; then
+       echo "Killing: `cat $CATALINA_PID`"
+       kill -9 `cat $CATALINA_PID`
+    fi
+  fi
+
+elif [ "$1" = "version" ] ; then
+
+    "$_RUNJAVA"   \
+      -classpath "$CATALINA_HOME/server/lib/catalina.jar" \
+      org.apache.catalina.util.ServerInfo
+
+else
+
+  echo "Usage: catalina.sh ( commands ... )"
+  echo "commands:"
+  if $os400; then
+    echo "  debug             Start Catalina in a debugger (not available on OS400)"
+    echo "  debug -security   Debug Catalina with a security manager (not available on OS400)"
+  else
+    echo "  debug             Start Catalina in a debugger"
+    echo "  debug -security   Debug Catalina with a security manager"
+  fi
+  echo "  jpda start        Start Catalina under JPDA debugger"
+  echo "  run               Start Catalina in the current window"
+  echo "  run -security     Start in the current window with security manager"
+  echo "  start             Start Catalina in a separate window"
+  echo "  start -security   Start in a separate window with security manager"
+  echo "  stop              Stop Catalina"
+  echo "  stop -force       Stop Catalina (followed by kill -KILL)"
+  echo "  version           What version of tomcat are you running?"
+  exit 1
+
+fi

+ 192 - 0
demo/jakarta-tomcat/bin/catalina.bat

@@ -0,0 +1,192 @@
+@echo off
+if "%OS%" == "Windows_NT" setlocal
+rem ---------------------------------------------------------------------------
+rem Start/Stop Script for the CATALINA Server
+rem
+rem Environment Variable Prequisites
+rem
+rem   CATALINA_HOME   May point at your Catalina "build" directory.
+rem
+rem   CATALINA_BASE   (Optional) Base directory for resolving dynamic portions
+rem                   of a Catalina installation.  If not present, resolves to
+rem                   the same directory that CATALINA_HOME points to.
+rem
+rem   CATALINA_OPTS   (Optional) Java runtime options used when the "start",
+rem                   "stop", or "run" command is executed.
+rem
+rem   CATALINA_TMPDIR (Optional) Directory path location of temporary directory
+rem                   the JVM should use (java.io.tmpdir).  Defaults to
+rem                   %CATALINA_BASE%\temp.
+rem
+rem   JAVA_HOME       Must point at your Java Development Kit installation.
+rem
+rem   JAVA_OPTS       (Optional) Java runtime options used when the "start",
+rem                   "stop", or "run" command is executed.
+rem
+rem   JSSE_HOME       (Optional) May point at your Java Secure Sockets Extension
+rem                   (JSSE) installation, whose JAR files will be added to the
+rem                   system class path used to start Tomcat.
+rem
+rem   JPDA_TRANSPORT  (Optional) JPDA transport used when the "jpda start"
+rem                   command is executed. The default is "dt_shmem".
+rem
+rem   JPDA_ADDRESS    (Optional) Java runtime options used when the "jpda start"
+rem                   command is executed. The default is "jdbconn".
+rem
+rem $Id: catalina.bat,v 1.9.2.1 2004/08/21 15:49:47 yoavs Exp $
+rem ---------------------------------------------------------------------------
+
+rem Guess CATALINA_HOME if not defined
+set CURRENT_DIR=%cd%
+if not "%CATALINA_HOME%" == "" goto gotHome
+set CATALINA_HOME=%CURRENT_DIR%
+if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
+cd ..
+set CATALINA_HOME=%cd%
+cd %CURRENT_DIR%
+:gotHome
+if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
+echo The CATALINA_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+goto end
+:okHome
+
+rem Get standard environment variables
+if exist "%CATALINA_HOME%\bin\setenv.bat" call "%CATALINA_HOME%\bin\setenv.bat"
+
+rem Get standard Java environment variables
+if exist "%CATALINA_HOME%\bin\setclasspath.bat" goto okSetclasspath
+echo Cannot find %CATALINA_HOME%\bin\setclasspath.bat
+echo This file is needed to run this program
+goto end
+:okSetclasspath
+set BASEDIR=%CATALINA_HOME%
+call "%CATALINA_HOME%\bin\setclasspath.bat"
+
+rem Add on extra jar files to CLASSPATH
+if "%JSSE_HOME%" == "" goto noJsse
+set CLASSPATH=%CLASSPATH%;%JSSE_HOME%\lib\jcert.jar;%JSSE_HOME%\lib\jnet.jar;%JSSE_HOME%\lib\jsse.jar
+:noJsse
+set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\bootstrap.jar
+
+if not "%CATALINA_BASE%" == "" goto gotBase
+set CATALINA_BASE=%CATALINA_HOME%
+:gotBase
+
+if not "%CATALINA_TMPDIR%" == "" goto gotTmpdir
+set CATALINA_TMPDIR=%CATALINA_BASE%\temp
+:gotTmpdir
+
+rem ----- Execute The Requested Command ---------------------------------------
+
+echo Using CATALINA_BASE:   %CATALINA_BASE%
+echo Using CATALINA_HOME:   %CATALINA_HOME%
+echo Using CATALINA_TMPDIR: %CATALINA_TMPDIR%
+echo Using JAVA_HOME:       %JAVA_HOME%
+
+set _EXECJAVA=%_RUNJAVA%
+set MAINCLASS=org.apache.catalina.startup.Bootstrap
+set ACTION=start
+set SECURITY_POLICY_FILE=
+set DEBUG_OPTS=
+set JPDA=
+
+if not ""%1"" == ""jpda"" goto noJpda
+set JPDA=jpda
+if not "%JPDA_TRANSPORT%" == "" goto gotJpdaTransport
+set JPDA_TRANSPORT=dt_shmem
+:gotJpdaTransport
+if not "%JPDA_ADDRESS%" == "" goto gotJpdaAddress
+set JPDA_ADDRESS=jdbconn
+:gotJpdaAddress
+shift
+:noJpda
+
+if ""%1"" == ""debug"" goto doDebug
+if ""%1"" == ""run"" goto doRun
+if ""%1"" == ""start"" goto doStart
+if ""%1"" == ""stop"" goto doStop
+if ""%1"" == ""version"" goto doVersion
+
+echo Usage:  catalina ( commands ... )
+echo commands:
+echo   debug             Start Catalina in a debugger
+echo   debug -security   Debug Catalina with a security manager
+echo   jpda start        Start Catalina under JPDA debugger
+echo   run               Start Catalina in the current window
+echo   run -security     Start in the current window with security manager
+echo   start             Start Catalina in a separate window
+echo   start -security   Start in a separate window with security manager
+echo   stop              Stop Catalina
+echo   version           What version of tomcat are you running?
+goto end
+
+:doDebug
+shift
+set _EXECJAVA=%_RUNJDB%
+set DEBUG_OPTS=-sourcepath "%CATALINA_HOME%\..\..\jakarta-tomcat-catalina\catalina\src\share"
+if not ""%1"" == ""-security"" goto execCmd
+shift
+echo Using Security Manager
+set SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy
+goto execCmd
+
+:doRun
+shift
+if not ""%1"" == ""-security"" goto execCmd
+shift
+echo Using Security Manager
+set SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy
+goto execCmd
+
+:doStart
+shift
+if not "%OS%" == "Windows_NT" goto noTitle
+set _EXECJAVA=start "Tomcat" %_RUNJAVA%
+goto gotTitle
+:noTitle
+set _EXECJAVA=start %_RUNJAVA%
+:gotTitle
+if not ""%1"" == ""-security"" goto execCmd
+shift
+echo Using Security Manager
+set SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy
+goto execCmd
+
+:doStop
+shift
+set ACTION=stop
+goto execCmd
+
+:doVersion
+%_EXECJAVA% -classpath "%CATALINA_HOME%\server\lib\catalina.jar" org.apache.catalina.util.ServerInfo
+goto end
+
+
+:execCmd
+rem Get remaining unshifted command line arguments and save them in the
+set CMD_LINE_ARGS=
+:setArgs
+if ""%1""=="""" goto doneSetArgs
+set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
+shift
+goto setArgs
+:doneSetArgs
+
+rem Execute Java with the applicable properties
+if not "%JPDA%" == "" goto doJpda
+if not "%SECURITY_POLICY_FILE%" == "" goto doSecurity
+%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
+goto end
+:doSecurity
+%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
+goto end
+:doJpda
+if not "%SECURITY_POLICY_FILE%" == "" goto doSecurityJpda
+%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% -Xdebug -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
+goto end
+:doSecurityJpda
+%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
+goto end
+
+:end

+ 287 - 0
demo/jakarta-tomcat/bin/catalina.sh

@@ -0,0 +1,287 @@
+#!/bin/sh
+# -----------------------------------------------------------------------------
+# Start/Stop Script for the CATALINA Server
+#
+# Environment Variable Prequisites
+#
+#   CATALINA_HOME   May point at your Catalina "build" directory.
+#
+#   CATALINA_BASE   (Optional) Base directory for resolving dynamic portions
+#                   of a Catalina installation.  If not present, resolves to
+#                   the same directory that CATALINA_HOME points to.
+#
+#   CATALINA_OPTS   (Optional) Java runtime options used when the "start",
+#                   "stop", or "run" command is executed.
+#
+#   CATALINA_TMPDIR (Optional) Directory path location of temporary directory
+#                   the JVM should use (java.io.tmpdir).  Defaults to
+#                   $CATALINA_BASE/temp.
+#
+#   JAVA_HOME       Must point at your Java Development Kit installation.
+#
+#   JAVA_OPTS       (Optional) Java runtime options used when the "start",
+#                   "stop", or "run" command is executed.
+#
+#   JPDA_TRANSPORT  (Optional) JPDA transport used when the "jpda start"
+#                   command is executed. The default is "dt_socket".
+#
+#   JPDA_ADDRESS    (Optional) Java runtime options used when the "jpda start"
+#                   command is executed. The default is 8000.
+#
+#   JSSE_HOME       (Optional) May point at your Java Secure Sockets Extension
+#                   (JSSE) installation, whose JAR files will be added to the
+#                   system class path used to start Tomcat.
+#
+#   CATALINA_PID    (Optional) Path of the file which should contains the pid
+#                   of catalina startup java process, when start (fork) is used
+#
+# $Id: catalina.sh,v 1.1 2005/03/05 00:29:13 matt Exp $
+# -----------------------------------------------------------------------------
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false
+os400=false
+case "`uname`" in
+CYGWIN*) cygwin=true;;
+OS400*) os400=true;;
+esac
+
+# resolve links - $0 may be a softlink
+PRG="$0"
+
+while [ -h "$PRG" ]; do
+  ls=`ls -ld "$PRG"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '.*/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG=`dirname "$PRG"`/"$link"
+  fi
+done
+
+# Get standard environment variables
+PRGDIR=`dirname "$PRG"`
+
+# Only set CATALINA_HOME if not already set
+[ -z "$CATALINA_HOME" ] && CATALINA_HOME=`cd "$PRGDIR/.." ; pwd`
+
+if [ -r "$CATALINA_HOME"/bin/setenv.sh ]; then
+  . "$CATALINA_HOME"/bin/setenv.sh
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin; then
+  [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+  [ -n "$CATALINA_HOME" ] && CATALINA_HOME=`cygpath --unix "$CATALINA_HOME"`
+  [ -n "$CATALINA_BASE" ] && CATALINA_BASE=`cygpath --unix "$CATALINA_BASE"`
+  [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+  [ -n "$JSSE_HOME" ] && JSSE_HOME=`cygpath --absolute --unix "$JSSE_HOME"`
+fi
+
+# For OS400
+if $os400; then
+  # Set job priority to standard for interactive (interactive - 6) by using
+  # the interactive priority - 6, the helper threads that respond to requests
+  # will be running at the same priority as interactive jobs.
+  COMMAND='chgjob job('$JOBNAME') runpty(6)'
+  system $COMMAND
+
+  # Enable multi threading
+  export QIBM_MULTI_THREADED=Y
+fi
+
+# Get standard Java environment variables
+if [ -r "$CATALINA_HOME"/bin/setclasspath.sh ]; then
+  BASEDIR="$CATALINA_HOME"
+  . "$CATALINA_HOME"/bin/setclasspath.sh
+else
+  echo "Cannot find $CATALINA_HOME/bin/setclasspath.sh"
+  echo "This file is needed to run this program"
+  exit 1
+fi
+
+# Add on extra jar files to CLASSPATH
+if [ -n "$JSSE_HOME" ]; then
+  CLASSPATH="$CLASSPATH":"$JSSE_HOME"/lib/jcert.jar:"$JSSE_HOME"/lib/jnet.jar:"$JSSE_HOME"/lib/jsse.jar
+fi
+CLASSPATH="$CLASSPATH":"$CATALINA_HOME"/bin/bootstrap.jar:"$CATALINA_HOME"/bin/commons-logging-api.jar
+
+if [ -z "$CATALINA_BASE" ] ; then
+  CATALINA_BASE="$CATALINA_HOME"
+fi
+
+if [ -z "$CATALINA_TMPDIR" ] ; then
+  # Define the java.io.tmpdir to use for Catalina
+  CATALINA_TMPDIR="$CATALINA_BASE"/temp
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+  JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
+  CATALINA_HOME=`cygpath --absolute --windows "$CATALINA_HOME"`
+  CATALINA_BASE=`cygpath --absolute --windows "$CATALINA_BASE"`
+  CATALINA_TMPDIR=`cygpath --absolute --windows "$CATALINA_TMPDIR"`
+  CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+  [ -n "$JSSE_HOME" ] && JSSE_HOME=`cygpath --absolute --windows "$JSSE_HOME"`
+  JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
+fi
+
+# ----- Execute The Requested Command -----------------------------------------
+
+echo "Using CATALINA_BASE:   $CATALINA_BASE"
+echo "Using CATALINA_HOME:   $CATALINA_HOME"
+echo "Using CATALINA_TMPDIR: $CATALINA_TMPDIR"
+echo "Using JAVA_HOME:       $JAVA_HOME"
+
+if [ "$1" = "jpda" ] ; then
+  if [ -z "$JPDA_TRANSPORT" ]; then
+    JPDA_TRANSPORT="dt_socket"
+  fi
+  if [ -z "$JPDA_ADDRESS" ]; then
+    JPDA_ADDRESS="8000"
+  fi
+  if [ -z "$JPDA_OPTS" ]; then
+    JPDA_OPTS="-Xdebug -Xrunjdwp:transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=n"
+  fi
+  CATALINA_OPTS="$CATALINA_OPTS $JPDA_OPTS"
+  shift
+fi
+
+if [ "$1" = "debug" ] ; then
+
+  if $os400; then
+    echo "Debug command not available on OS400"
+    exit 1
+  else
+    shift
+    if [ "$1" = "-security" ] ; then
+      echo "Using Security Manager"
+      shift
+      exec "$_RUNJDB" $JAVA_OPTS $CATALINA_OPTS \
+        -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
+        -sourcepath "$CATALINA_HOME"/../../jakarta-tomcat-catalina/catalina/src/share \
+        -Djava.security.manager \
+        -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
+        -Dcatalina.base="$CATALINA_BASE" \
+        -Dcatalina.home="$CATALINA_HOME" \
+        -Djava.io.tmpdir="$CATALINA_TMPDIR" \
+        org.apache.catalina.startup.Bootstrap "$@" start
+    else
+      exec "$_RUNJDB" $JAVA_OPTS $CATALINA_OPTS \
+        -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
+        -sourcepath "$CATALINA_HOME"/../../jakarta-tomcat-catalina/catalina/src/share \
+        -Dcatalina.base="$CATALINA_BASE" \
+        -Dcatalina.home="$CATALINA_HOME" \
+        -Djava.io.tmpdir="$CATALINA_TMPDIR" \
+        org.apache.catalina.startup.Bootstrap "$@" start
+    fi
+  fi
+
+elif [ "$1" = "run" ]; then
+
+  shift
+  if [ "$1" = "-security" ] ; then
+    echo "Using Security Manager"
+    shift
+    exec "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
+      -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
+      -Djava.security.manager \
+      -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
+      -Dcatalina.base="$CATALINA_BASE" \
+      -Dcatalina.home="$CATALINA_HOME" \
+      -Djava.io.tmpdir="$CATALINA_TMPDIR" \
+      org.apache.catalina.startup.Bootstrap "$@" start
+  else
+    exec "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
+      -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
+      -Dcatalina.base="$CATALINA_BASE" \
+      -Dcatalina.home="$CATALINA_HOME" \
+      -Djava.io.tmpdir="$CATALINA_TMPDIR" \
+      org.apache.catalina.startup.Bootstrap "$@" start
+  fi
+
+elif [ "$1" = "start" ] ; then
+
+  shift
+  touch "$CATALINA_BASE"/logs/catalina.out
+  if [ "$1" = "-security" ] ; then
+    echo "Using Security Manager"
+    shift
+    "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
+      -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
+      -Djava.security.manager \
+      -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
+      -Dcatalina.base="$CATALINA_BASE" \
+      -Dcatalina.home="$CATALINA_HOME" \
+      -Djava.io.tmpdir="$CATALINA_TMPDIR" \
+      org.apache.catalina.startup.Bootstrap "$@" start \
+      >> "$CATALINA_BASE"/logs/catalina.out 2>&1 &
+
+      if [ ! -z "$CATALINA_PID" ]; then
+        echo $! > $CATALINA_PID
+      fi
+  else
+    "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
+      -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
+      -Dcatalina.base="$CATALINA_BASE" \
+      -Dcatalina.home="$CATALINA_HOME" \
+      -Djava.io.tmpdir="$CATALINA_TMPDIR" \
+      org.apache.catalina.startup.Bootstrap "$@" start \
+      >> "$CATALINA_BASE"/logs/catalina.out 2>&1 &
+
+      if [ ! -z "$CATALINA_PID" ]; then
+        echo $! > $CATALINA_PID
+      fi
+  fi
+
+elif [ "$1" = "stop" ] ; then
+
+  shift
+  FORCE=0
+  if [ "$1" = "-force" ]; then
+    shift
+    FORCE=1
+  fi
+
+  "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
+    -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
+    -Dcatalina.base="$CATALINA_BASE" \
+    -Dcatalina.home="$CATALINA_HOME" \
+    -Djava.io.tmpdir="$CATALINA_TMPDIR" \
+    org.apache.catalina.startup.Bootstrap "$@" stop
+
+  if [ $FORCE -eq 1 ]; then
+    if [ ! -z "$CATALINA_PID" ]; then
+       echo "Killing: `cat $CATALINA_PID`"
+       kill -9 `cat $CATALINA_PID`
+    fi
+  fi
+
+elif [ "$1" = "version" ] ; then
+
+    "$_RUNJAVA"   \
+      -classpath "$CATALINA_HOME/server/lib/catalina.jar" \
+      org.apache.catalina.util.ServerInfo
+
+else
+
+  echo "Usage: catalina.sh ( commands ... )"
+  echo "commands:"
+  if $os400; then
+    echo "  debug             Start Catalina in a debugger (not available on OS400)"
+    echo "  debug -security   Debug Catalina with a security manager (not available on OS400)"
+  else
+    echo "  debug             Start Catalina in a debugger"
+    echo "  debug -security   Debug Catalina with a security manager"
+  fi
+  echo "  jpda start        Start Catalina under JPDA debugger"
+  echo "  run               Start Catalina in the current window"
+  echo "  run -security     Start in the current window with security manager"
+  echo "  start             Start Catalina in a separate window"
+  echo "  start -security   Start in a separate window with security manager"
+  echo "  stop              Stop Catalina"
+  echo "  stop -force       Stop Catalina (followed by kill -KILL)"
+  echo "  version           What version of tomcat are you running?"
+  exit 1
+
+fi

+ 234 - 0
demo/jakarta-tomcat/bin/catalina.xml

@@ -0,0 +1,234 @@
+<!--
+  XML file for launching Catalina applications using ant.
+-->
+
+<project name="Catalina Launcher" default="catalina" basedir=".">
+  <property file="${user.home}/.tomcat5.properties"/>
+
+  <!-- Set the application home to the parent directory of this directory -->
+  <property name="catalina.home" location="${basedir}/.."/>
+  <property name="bootstrap.jar" location="${catalina.home}/bin/bootstrap.jar"/>
+
+  <!-- Import the user's custom properties -->
+  <property file="${catalina.home}/bin/catalina.properties"/> <!-- XXX shold it be conf ?? -->
+  <property file="${catalina.home}/conf/catalina.properties"/> <!-- XXX shold it be conf ?? -->
+
+
+  <!-- Set user configurable properties -->
+  <property name="jsse.home" location="${catalina.home}"/>
+  <property name="catalina.base" location="${catalina.home}"/>
+  <property name="catalina.tmpdir" location="${catalina.base}/temp"/>
+  <property name="catalina.out" location="${catalina.base}/logs/catalina.out"/>
+  <property name="catalina.policy" location="${catalina.base}/conf/catalina.policy"/>
+  <property name="catalina.jvm.args" value="-Dsun.io.useCanonCaches=false"/>
+
+  <property name="catalina.source.path" value="${catalina.home}/../../jakarta-servletapi-5/src/share:${catalina.home}/../../jakarta-tomcat-jasper/jasper2/src/share:${catalina.home}/../../jakarta-tomcat-connectors/coyote/src/java:${catalina.home}/../../jakarta-tomcat-catalina/catalina/src/share"/>
+
+
+  <!-- Build the classpath relative to the application home -->
+  <path id="base.class.path">
+    <pathelement location="${bootstrap.jar}"/>
+    <pathelement path="${jsse.home}/lib/jsse.jar:${jsse.home}/lib/jcert.jar:${jsse.home}/lib/jnet.jar"/>
+  </path>
+
+  <property name="basedir" location="."/>
+  
+  <property name="tools.jar" location="${java.home}/../lib/tools.jar" />
+
+  <path id="tomcatcp" >
+    <pathelement location="${catalina.home}/bin/bootstrap.jar"/>
+    <!-- 
+    <fileset dir="${catalina.home}/common/lib" includes="*.jar"/>
+    <fileset dir="${catalina.home}/server/lib" includes="*.jar"/>
+    <pathelement location="${catalina.home}/common/classes"/>
+    -->
+    <!-- 
+       <pathelement location="${ant.home}/lib/xercesImpl.jar" />
+       <pathelement location="${ant.home}/lib/xml-apis.jar" />
+    -->
+    <pathelement location="${ant.home}/lib/ant.jar" />
+    <pathelement location="${tools.jar}" />
+  </path>
+ 
+
+  <!-- =================== Initialization/helpers ================== -->
+
+
+  <target name="init"
+          description="Display configuration and conditional compilation flags">
+  </target>
+
+  <target name="init-launcher" >
+    <!-- Build the sysproperties relative to the application home -->
+    <syspropertyset id="base.sys.properties">
+      <sysproperty key="java.endorsed.dirs" file="${catalina.home}/common/endorsed"/>
+      <sysproperty key="java.io.tmpdir" file="${catalina.tmpdir}"/>
+      <sysproperty key="catalina.home" file="${catalina.home}"/>
+      <sysproperty key="catalina.base" file="${catalina.base}"/>
+    </syspropertyset>
+
+    <!-- Build the standard jvmargs -->
+    <jvmargset id="base.jvm.args">
+      <jvmarg line="${catalina.jvm.args}"/>
+      <jvmarg value="-Xdebug" if="jpda.settings"/>
+      <jvmarg value="-Xrunjdwp:${jpda.settings}" if="jpda.settings"/>
+      <jvmarg value="-sourcepath" if="jdb"/>
+      <jvmarg path="${catalina.source.path}" if="jdb"/>
+    </jvmargset>
+  </target>
+
+  <target name="echo-config" >
+    <echo>TOMCAT_HOME=${catalina.home}</echo>
+    <echo>CLASSPATH=${toString:tomcatcp}</echo>
+  </target>
+
+  <target name="help" >
+    <echo>
+  To run any of the applications in the JDB debugger, execute the Launcher with
+  a "-Ddebug=true" argument.
+
+  To run any of the applications in JPDA mode, execute the Launcher with a
+  "-Djpda=true" argument.
+   </echo>
+  </target>
+
+  <!-- Target that sets JDB properties when the "debug" property is set -->
+  <target name="setjdb" description="Set JDB properties" if="debug">
+    <property name="jdb" value="true"/>
+  </target>
+
+  <!-- Target that sets JPDA properties when the "jpda" property is set -->
+  <target name="setjpda" description="Set JPDA properties" if="jpda">
+    <condition property="jpda.transport" value="dt_shmem">
+      <os family="windows"/>
+    </condition>
+    <condition property="jpda.transport" value="dt_socket">
+      <not>
+        <os family="windows"/>
+      </not>
+    </condition>
+    <condition property="jpda.address" value="jdbconn">
+      <equals arg1="${jpda.transport}" arg2="dt_shmem"/>
+    </condition>
+    <condition property="jpda.address" value="8000">
+      <not>
+        <equals arg1="${jpda.transport}" arg2="dt_shmem"/>
+      </not>
+    </condition>
+    <property name="jpda.suspend" value="y"/>
+    <property name="jpda.settings" value="transport=${jpda.transport},address=${jpda.address},server=y,suspend=${jpda.suspend}"/>
+  </target>
+
+  <!-- =================== Launcher-based ================== -->
+
+  <!-- Target that executes Catalina -->
+  <target name="catalina" description="Execute Catalina"
+    depends="init-launcher,setjdb,setjpda" >
+
+    <!-- Set default title for minimized window -->
+    <property name="catalina.window.title" value="Catalina"/>
+
+    <!--
+      Launch Catalina. Note that the "filterclassname" attribute will force
+      the "waitforchild" attribute to "true" if any invalid arguments are
+      used or if "start" is not the last argument.
+    -->
+    <launch classname="org.apache.catalina.startup.Bootstrap"
+      waitforchild="${wait}"
+      debug="${jdb}"
+      print="${print}"
+      filterclassname="org.apache.catalina.launcher.CatalinaLaunchFilter"
+      filterclasspath="${bootstrap.jar}"
+      usesystemin="false"
+      requiretools="true"
+      redirectoutput="true"
+      output="${catalina.out}"
+      displayMinimizedWindow="true"
+      minimizedWindowTitle="${catalina.window.title}">
+        <jvmargset refid="base.jvm.args"/>
+        <syspropertyset refid="base.sys.properties"/>
+        <sysproperty key="java.security.manager" value="" if="security"/>
+        <sysproperty key="java.security.policy" value="=${catalina.policy}" if="security"/>
+        <classpath refid="base.class.path"/>
+    </launch>
+
+  </target>
+
+  <!-- Target that executes the Catalina tool wrapper -->
+  <target name="tool-wrapper" description="Execute Catalina tool wrapper"
+    depends="setjdb,setjpda" >
+
+    <!-- Launch Catalina tool wrapper -->
+    <launch classname="org.apache.catalina.startup.Tool"
+      debug="${jdb}"
+      print="${print}"
+      usesystemin="false"
+      requiretools="true">
+        <jvmargset refid="base.jvm.args"/>
+        <syspropertyset refid="base.sys.properties"/>
+        <classpath refid="base.class.path"/>
+    </launch>
+
+  </target>
+
+  <!-- ======================= Ant/JMX based ================ -->
+
+  <target name="taskdef" >
+    <property name="tomcat.home" location=".." />
+
+    <path id="jmx.test.classpath">
+      <pathelement location="${commons-modeler.jar}" />
+      <fileset dir="${tomcat.home}/common/lib" includes="*.jar"/>
+      <fileset dir="${tomcat.home}/server/lib" includes="*.jar"/>
+      <fileset dir="${tomcat.home}/bin" includes="*.jar"/>
+    </path>
+
+    <!-- part of modeler -->
+    <taskdef resource="META-INF/ant.properties"
+             classpathref="jmx.test.classpath" />
+  </target>
+
+
+  <target name="run" depends="echo-config,taskdef"
+        description="Start tomcat as a task and return">
+   
+    <MLET code="org.apache.commons.modeler.BaseModelMBean"
+          name="catalina:type=server" >
+       <arg value="org.apache.catalina.startup.Catalina" />
+    </MLET>
+
+    <jmxSet name="catalina:type=server"
+            attribute="catalinaHome"
+            value="${tomcat.home}"/>
+  
+    <!-- We could also call init and set other properties - 
+         init should load the modules -->
+
+    <jmx name="catalina:type=server"
+         method="start" />
+    
+    <echo message="Tomcat5 running"/>
+
+  </target>
+
+
+  <!-- ======================= Exec/java  ================ -->
+
+  <target name="java-start" depends="echo-config" 
+        description="Run tomcat in-process and wait for it to end, using java task" >
+
+    <property name="tomcat.fork" value="false" />
+
+    <java classname="org.apache.catalina.startup.Bootstrap" fork="${tomcat.fork}">
+      <classpath refid="tomcatcp" />
+      <arg value="startd" />
+      <sysproperty key="catalina.home" value="${catalina.home}"/>
+      <sysproperty key="build.compiler" value="jikes"/>
+      <sysproperty key="java.endorsed.dirs" value="${ant.home}/lib:${java.home}/lib"/>
+    </java>
+
+    <echo message="Tomcat5 running"/>
+
+  </target>
+
+</project>

BIN
demo/jakarta-tomcat/bin/commons-daemon.jar


BIN
demo/jakarta-tomcat/bin/commons-launcher.jar


BIN
demo/jakarta-tomcat/bin/commons-logging-api.jar


+ 19 - 0
demo/jakarta-tomcat/bin/cpappend.bat

@@ -0,0 +1,19 @@
+rem ---------------------------------------------------------------------------
+rem Append to CLASSPATH
+rem
+rem $Id: cpappend.bat,v 1.3 2002/08/04 18:19:43 patrickl Exp $
+rem ---------------------------------------------------------------------------
+
+rem Process the first argument
+if ""%1"" == """" goto end
+set CLASSPATH=%CLASSPATH%;%1
+shift
+
+rem Process the remaining arguments
+:setArgs
+if ""%1"" == """" goto doneSetArgs
+set CLASSPATH=%CLASSPATH% %1
+shift
+goto setArgs
+:doneSetArgs
+:end

+ 41 - 0
demo/jakarta-tomcat/bin/digest.bat

@@ -0,0 +1,41 @@
+@echo off
+if "%OS%" == "Windows_NT" setlocal
+rem ---------------------------------------------------------------------------
+rem Script to digest password using the algorithm specified
+rem
+rem $Id: digest.bat,v 1.3 2002/08/04 18:19:43 patrickl Exp $
+rem ---------------------------------------------------------------------------
+
+rem Guess CATALINA_HOME if not defined
+if not "%CATALINA_HOME%" == "" goto gotHome
+set CATALINA_HOME=.
+if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
+set CATALINA_HOME=..
+:gotHome
+if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
+echo The CATALINA_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+goto end
+:okHome
+
+set EXECUTABLE=%CATALINA_HOME%\bin\tool-wrapper.bat
+
+rem Check that target executable exists
+if exist "%EXECUTABLE%" goto okExec
+echo Cannot find %EXECUTABLE%
+echo This file is needed to run this program
+goto end
+:okExec
+
+rem Get remaining unshifted command line arguments and save them in the
+set CMD_LINE_ARGS=
+:setArgs
+if ""%1""=="""" goto doneSetArgs
+set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
+shift
+goto setArgs
+:doneSetArgs
+
+call "%EXECUTABLE%" -server org.apache.catalina.realm.RealmBase %CMD_LINE_ARGS%
+
+:end

+ 31 - 0
demo/jakarta-tomcat/bin/digest.sh

@@ -0,0 +1,31 @@
+#!/bin/sh
+# -----------------------------------------------------------------------------
+# Script to digest password using the algorithm specified
+#
+# $Id: digest.sh,v 1.1 2005/03/05 00:29:13 matt Exp $
+# -----------------------------------------------------------------------------
+
+# resolve links - $0 may be a softlink
+PRG="$0"
+
+while [ -h "$PRG" ] ; do
+  ls=`ls -ld "$PRG"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '.*/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG=`dirname "$PRG"`/"$link"
+  fi
+done
+ 
+PRGDIR=`dirname "$PRG"`
+EXECUTABLE=tool-wrapper.sh
+
+# Check that target executable exists
+if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
+  echo "Cannot find $PRGDIR/$EXECUTABLE"
+  echo "This file is needed to run this program"
+  exit 1
+fi
+
+exec "$PRGDIR"/"$EXECUTABLE" -server org.apache.catalina.realm.RealmBase "$@"

BIN
demo/jakarta-tomcat/bin/jmx.jar


BIN
demo/jakarta-tomcat/bin/jsvc.tar.gz


+ 23 - 0
demo/jakarta-tomcat/bin/launcher.properties

@@ -0,0 +1,23 @@
+#
+# Properties for the LauncherBootstrap class
+#
+# This file contains the following configurable properties:
+# - ant.class.path - This property is a ":" separated list of the URL file
+#   fragments where the Ant classes are located. The list must include a JAXP
+#   compliant XML parser if you are not using Java(TM) SE 1.4 or higher.
+#
+# Important notes:
+# - Relative URL file fragments, such as "../lib", are supported and strongly
+#   encouraged as absolute files prevent cross platform distribution.
+# - URL file fragments are the portions of a URL after the "file:" string.
+#   This means that you must use "/" characters as directory separators on
+#   all platforms. Also, ":" characters in a file fragment, such as in drive
+#   portion of absolute Windows files, must be URL encoded as "%3A". Lastly,
+#   directories must have a "/" character at the end.
+# - All relative URL file fragments in the above properties will be resolved
+#   using the URL of the directory that the LauncherBootstrap class was
+#   loaded from, not the current working directory. This ensures that the
+#   LauncherBootstrap class can properly resolve the files without regard to
+#   the current working directory.
+#
+ant.class.path=../common/lib/ant.jar:../common/lib/ant-launcher.jar:../common/endorsed/xercesImpl.jar:../common/endorsed/xml-apis.jar

+ 99 - 0
demo/jakarta-tomcat/bin/service.bat

@@ -0,0 +1,99 @@
+@echo off
+if "%OS%" == "Windows_NT" setlocal
+rem ---------------------------------------------------------------------------
+rem NT Service Install/Uninstall script
+rem
+rem Options
+rem install                Install the service using Tomcat5 as service name.
+rem                        Service is installed using default settings.
+rem remove                 Remove the service from the System.
+rem
+rem name        (optional) If the second argument is present it is considered
+rem                        to be new service name                                           
+rem
+rem $Id: service.bat,v 1.5.2.1 2004/08/23 22:54:32 mturk Exp $
+rem ---------------------------------------------------------------------------
+
+rem Guess CATALINA_HOME if not defined
+set CURRENT_DIR=%cd%
+if not "%CATALINA_HOME%" == "" goto gotHome
+set CATALINA_HOME=%cd%
+if exist "%CATALINA_HOME%\bin\tomcat5.exe" goto okHome
+rem CD to the upper dir
+cd ..
+set CATALINA_HOME=%cd%
+:gotHome
+if exist "%CATALINA_HOME%\bin\tomcat5.exe" goto okHome
+echo The tomcat.exe was not found...
+echo The CATALINA_HOME environment variable is not defined correctly.
+echo This environment variable is needed to run this program
+goto end
+rem Make sure prerequisite environment variables are set
+if not "%JAVA_HOME%" == "" goto okHome
+echo The JAVA_HOME environment variable is not defined
+echo This environment variable is needed to run this program
+goto end 
+:okHome
+if not "%CATALINA_BASE%" == "" goto gotBase
+set CATALINA_BASE=%CATALINA_HOME%
+:gotBase
+ 
+set EXECUTABLE=%CATALINA_HOME%\bin\tomcat5.exe
+
+rem Set default Service name
+set SERVICE_NAME=Tomcat5
+set PR_DISPLAYNAME=Apache Tomcat
+
+if "%1" == "" goto displayUsage
+if "%2" == "" goto setServiceName
+set SERVICE_NAME=%2
+set PR_DISPLAYNAME=Apache Tomcat %2
+:setServiceName
+if %1 == install goto doInstall
+if %1 == remove goto doRemove
+echo Unknown parameter "%1"
+:displayUsage
+echo 
+echo Usage: service.bat install/remove [service_name]
+goto end
+
+:doRemove
+rem Remove the service
+"%EXECUTABLE%" //DS//%SERVICE_NAME%
+echo The service '%SERVICE_NAME%' has been removed
+goto end
+
+:doInstall
+rem Install the service
+echo Installing the service '%SERVICE_NAME%' ...
+echo Using CATALINA_HOME:    %CATALINA_HOME%
+echo Using JAVA_HOME:        %JAVA_HOME%
+
+rem Use the environment variables as an exaple
+rem Each command line option is prefixed with PR_
+
+set PR_DESCRIPTION=Apache Tomcat Server - http://jakarta.apache.org/tomcat
+set PR_INSTALL=%EXECUTABLE%
+set PR_LOGPATH=%CATALINA_HOME%\logs
+set PR_CLASSPATH=%JAVA_HOME%\lib\tools.jar;%CATALINA_HOME%\bin\bootstrap.jar
+rem Set the server jvm frrom JAVA_HOME
+set PR_JVM=%JAVA_HOME%\jre\bin\server\jvm.dll
+rem You can use the 'set PR_JVM=auto' for default JVM
+"%EXECUTABLE%" //IS//%SERVICE_NAME% --StartClass org.apache.catalina.startup.Bootstrap --StopClass org.apache.catalina.startup.Bootstrap --StartParams start --StopParams stop
+rem Clear the environment variables. They are not needed any more.
+set PR_DISPLAYNAME=
+set PR_DESCRIPTION=
+set PR_INSTALL=
+set PR_LOGPATH=
+set PR_CLASSPATH=
+set PR_JVM=
+rem Set extra parameters
+"%EXECUTABLE%" //US//%SERVICE_NAME% --JvmOptions "-Dcatalina.base=%CATALINA_BASE%;-Dcatalina.home=%CATALINA_HOME%;-Djava.endorsed.dirs=%CATALINA_HOME%\common\endorsed" --StartMode jvm --StopMode jvm
+rem More extra parameters
+set PR_STDOUTPUT=%CATALINA_HOME%\logs\stdout.log
+set PR_STDERROR=%CATALINA_HOME%\logs\stderr.log
+"%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava.io.tmpdir=%CATALINA_BASE%\temp" --JvmMs 128 --JvmMx 256
+echo The service '%SERVICE_NAME%' has been installed.
+
+:end
+cd %CURRENT_DIR%

+ 57 - 0
demo/jakarta-tomcat/bin/setclasspath.bat

@@ -0,0 +1,57 @@
+rem ---------------------------------------------------------------------------
+rem Set CLASSPATH and Java options
+rem
+rem $Id: setclasspath.bat,v 1.6.2.1 2004/08/21 15:49:50 yoavs Exp $
+rem ---------------------------------------------------------------------------
+
+rem Make sure prerequisite environment variables are set
+if not "%JAVA_HOME%" == "" goto gotJavaHome
+echo The JAVA_HOME environment variable is not defined
+echo This environment variable is needed to run this program
+goto exit
+:gotJavaHome
+if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
+if not exist "%JAVA_HOME%\bin\javaw.exe" goto noJavaHome
+if not exist "%JAVA_HOME%\bin\jdb.exe" goto noJavaHome
+if not exist "%JAVA_HOME%\bin\javac.exe" goto noJavaHome
+goto okJavaHome
+:noJavaHome
+echo The JAVA_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+echo NB: JAVA_HOME should point to a JDK not a JRE
+goto exit
+:okJavaHome
+
+if not "%BASEDIR%" == "" goto gotBasedir
+echo The BASEDIR environment variable is not defined
+echo This environment variable is needed to run this program
+goto exit
+:gotBasedir
+if exist "%BASEDIR%\bin\setclasspath.bat" goto okBasedir
+echo The BASEDIR environment variable is not defined correctly
+echo This environment variable is needed to run this program
+goto exit
+:okBasedir
+
+rem Set the default -Djava.endorsed.dirs argument
+set JAVA_ENDORSED_DIRS=%BASEDIR%\common\endorsed
+
+rem Set standard CLASSPATH
+rem Note that there are no quotes as we do not want to introduce random
+rem quotes into the CLASSPATH
+set CLASSPATH=%JAVA_HOME%\lib\tools.jar
+
+rem Set standard command for invoking Java.
+rem Note that NT requires a window name argument when using start.
+rem Also note the quoting as JAVA_HOME may contain spaces.
+set _RUNJAVA="%JAVA_HOME%\bin\java"
+set _RUNJAVAW="%JAVA_HOME%\bin\javaw"
+set _RUNJDB="%JAVA_HOME%\bin\jdb"
+set _RUNJAVAC="%JAVA_HOME%\bin\javac"
+
+goto end
+
+:exit
+exit /b 1
+
+:end

+ 61 - 0
demo/jakarta-tomcat/bin/setclasspath.sh

@@ -0,0 +1,61 @@
+# -----------------------------------------------------------------------------
+#  Set CLASSPATH and Java options
+#
+#  $Id: setclasspath.sh,v 1.1 2005/03/05 00:29:13 matt Exp $
+# -----------------------------------------------------------------------------
+
+# Make sure prerequisite environment variables are set
+if [ -z "$JAVA_HOME" ]; then
+  echo "The JAVA_HOME environment variable is not defined"
+  echo "This environment variable is needed to run this program"
+  exit 1
+fi
+if $os400; then
+  if [ ! -x "$JAVA_HOME"/bin/java -o ! -x "$JAVA_HOME"/bin/javac ]; then
+    echo "The JAVA_HOME environment variable is not defined correctly"
+    echo "This environment variable is needed to run this program"
+    echo "NB: JAVA_HOME should point to a JDK not a JRE"
+    exit 1
+  fi
+else
+  if [ ! -x "$JAVA_HOME"/bin/java -o ! -x "$JAVA_HOME"/bin/jdb -o ! -x "$JAVA_HOME"/bin/javac ]; then
+    echo "The JAVA_HOME environment variable is not defined correctly"
+    echo "This environment variable is needed to run this program"
+    echo "NB: JAVA_HOME should point to a JDK not a JRE"
+    exit 1
+  fi
+fi
+if [ -z "$BASEDIR" ]; then
+  echo "The BASEDIR environment variable is not defined"
+  echo "This environment variable is needed to run this program"
+  exit 1
+fi
+if [ ! -x "$BASEDIR"/bin/setclasspath.sh ]; then
+  echo "The BASEDIR environment variable is not defined correctly"
+  echo "This environment variable is needed to run this program"
+  exit 1
+fi
+
+# Set the default -Djava.endorsed.dirs argument
+JAVA_ENDORSED_DIRS="$BASEDIR"/common/endorsed
+
+# Set standard CLASSPATH
+CLASSPATH="$JAVA_HOME"/lib/tools.jar
+
+# OSX hack to CLASSPATH
+JIKESPATH=
+if [ `uname -s` = "Darwin" ]; then
+  OSXHACK="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes"
+  if [ -d "$OSXHACK" ]; then
+    for i in "$OSXHACK"/*.jar; do
+      JIKESPATH="$JIKESPATH":"$i"
+    done
+  fi
+fi
+
+# Set standard commands for invoking Java.
+_RUNJAVA="$JAVA_HOME"/bin/java
+if [ $os400 = false ]; then
+  _RUNJDB="$JAVA_HOME"/bin/jdb
+fi
+_RUNJAVAC="$JAVA_HOME"/bin/javac

+ 40 - 0
demo/jakarta-tomcat/bin/shutdown-using-launcher.bat

@@ -0,0 +1,40 @@
+@echo off
+if "%OS%" == "Windows_NT" setlocal
+
+rem ---------------------------------------------------------------------------
+rem
+rem Script for shutting down Catalina using the Launcher
+rem
+rem ---------------------------------------------------------------------------
+
+rem Get standard environment variables
+set PRG=%0
+if exist %PRG%\..\setenv.bat goto gotCmdPath
+rem %0 must have been found by DOS using the %PATH% so we assume that
+rem setenv.bat will also be found in the %PATH%
+call setenv.bat
+goto doneSetenv
+:gotCmdPath
+call %PRG%\..\setenv.bat
+:doneSetenv
+
+rem Make sure prerequisite environment variables are set
+if not "%JAVA_HOME%" == "" goto gotJavaHome
+echo The JAVA_HOME environment variable is not defined
+echo This environment variable is needed to run this program
+goto end
+:gotJavaHome
+
+rem Get command line arguments and save them with the proper quoting
+set CMD_LINE_ARGS=
+:setArgs
+if ""%1""=="""" goto doneSetArgs
+set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
+shift
+goto setArgs
+:doneSetArgs
+
+rem Execute the Launcher using the "catalina" target
+"%JAVA_HOME%\bin\java.exe" -classpath %PRG%\..;"%PATH%";. LauncherBootstrap -launchfile catalina.xml -verbose catalina %CMD_LINE_ARGS% stop
+
+:end

+ 29 - 0
demo/jakarta-tomcat/bin/shutdown-using-launcher.sh

@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# -----------------------------------------------------------------------------
+#
+# Script for shutting down Catalina using the Launcher
+#
+# -----------------------------------------------------------------------------
+
+# Resolve links - $0 may be a softlink
+PRG="$0"
+
+while [ -h "$PRG" ]; do
+  ls=`ls -ld "$PRG"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '.*/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG=`dirname "$PRG"`/"$link"
+  fi
+done
+
+# Get standard environment variables
+PRGDIR=`dirname "$PRG"`
+if [ -r "$PRGDIR"/setenv.sh ]; then
+  . "$PRGDIR"/setenv.sh
+fi
+
+# Execute the Launcher using the "catalina" target
+exec "$JAVA_HOME"/bin/java -classpath "$PRGDIR" LauncherBootstrap -launchfile catalina.xml -verbose catalina "$@" stop

+ 44 - 0
demo/jakarta-tomcat/bin/shutdown.bat

@@ -0,0 +1,44 @@
+@echo off
+if "%OS%" == "Windows_NT" setlocal
+rem ---------------------------------------------------------------------------
+rem Stop script for the CATALINA Server
+rem
+rem $Id: shutdown.bat,v 1.5 2004/05/27 15:05:01 yoavs Exp $
+rem ---------------------------------------------------------------------------
+
+rem Guess CATALINA_HOME if not defined
+set CURRENT_DIR=%cd%
+if not "%CATALINA_HOME%" == "" goto gotHome
+set CATALINA_HOME=%CURRENT_DIR%
+if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
+cd ..
+set CATALINA_HOME=%cd%
+cd %CURRENT_DIR%
+:gotHome
+if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
+echo The CATALINA_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+goto end
+:okHome
+
+set EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat
+
+rem Check that target executable exists
+if exist "%EXECUTABLE%" goto okExec
+echo Cannot find %EXECUTABLE%
+echo This file is needed to run this program
+goto end
+:okExec
+
+rem Get remaining unshifted command line arguments and save them in the
+set CMD_LINE_ARGS=
+:setArgs
+if ""%1""=="""" goto doneSetArgs
+set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
+shift
+goto setArgs
+:doneSetArgs
+
+call "%EXECUTABLE%" stop %CMD_LINE_ARGS%
+
+:end

+ 31 - 0
demo/jakarta-tomcat/bin/shutdown.sh

@@ -0,0 +1,31 @@
+#!/bin/sh
+# -----------------------------------------------------------------------------
+# Stop script for the CATALINA Server
+#
+# $Id: shutdown.sh,v 1.1 2005/03/05 00:29:13 matt Exp $
+# -----------------------------------------------------------------------------
+
+# resolve links - $0 may be a softlink
+PRG="$0"
+
+while [ -h "$PRG" ] ; do
+  ls=`ls -ld "$PRG"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '.*/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG=`dirname "$PRG"`/"$link"
+  fi
+done
+ 
+PRGDIR=`dirname "$PRG"`
+EXECUTABLE=catalina.sh
+
+# Check that target executable exists
+if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
+  echo "Cannot find $PRGDIR/$EXECUTABLE"
+  echo "This file is needed to run this program"
+  exit 1
+fi
+
+exec "$PRGDIR"/"$EXECUTABLE" stop "$@"

+ 39 - 0
demo/jakarta-tomcat/bin/startup-using-launcher.bat

@@ -0,0 +1,39 @@
+@echo off
+if "%OS%" == "Windows_NT" setlocal
+
+rem ---------------------------------------------------------------------------
+rem
+rem Script for starting Catalina using the Launcher
+rem
+rem ---------------------------------------------------------------------------
+
+rem Get standard environment variables
+set PRG=%0
+if exist %PRG%\..\setenv.bat goto gotCmdPath
+rem %0 must have been found by DOS using the %PATH% so we assume that
+rem setenv.bat will also be found in the %PATH%
+goto doneSetenv
+:gotCmdPath
+call %PRG%\..\setenv.bat
+:doneSetenv
+
+rem Make sure prerequisite environment variables are set
+if not "%JAVA_HOME%" == "" goto gotJavaHome
+echo The JAVA_HOME environment variable is not defined
+echo This environment variable is needed to run this program
+goto end
+:gotJavaHome
+
+rem Get command line arguments and save them with the proper quoting
+set CMD_LINE_ARGS=
+:setArgs
+if ""%1""=="""" goto doneSetArgs
+set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
+shift
+goto setArgs
+:doneSetArgs
+
+rem Execute the Launcher using the "catalina" target
+"%JAVA_HOME%\bin\java.exe" -classpath %PRG%\..;"%PATH%";. LauncherBootstrap -launchfile catalina.xml -verbose catalina %CMD_LINE_ARGS% start
+
+:end

+ 29 - 0
demo/jakarta-tomcat/bin/startup-using-launcher.sh

@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# -----------------------------------------------------------------------------
+#
+# Script for starting Catalina using the Launcher
+#
+# -----------------------------------------------------------------------------
+
+# Resolve links - $0 may be a softlink
+PRG="$0"
+
+while [ -h "$PRG" ]; do
+  ls=`ls -ld "$PRG"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '.*/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG=`dirname "$PRG"`/"$link"
+  fi
+done
+
+# Get standard environment variables
+PRGDIR=`dirname "$PRG"`
+if [ -r "$PRGDIR"/setenv.sh ]; then
+  . "$PRGDIR"/setenv.sh
+fi
+
+# Execute the Launcher using the "catalina" target
+exec "$JAVA_HOME"/bin/java -classpath "$PRGDIR" LauncherBootstrap -launchfile catalina.xml -verbose catalina "$@" start

+ 44 - 0
demo/jakarta-tomcat/bin/startup.bat

@@ -0,0 +1,44 @@
+@echo off
+if "%OS%" == "Windows_NT" setlocal
+rem ---------------------------------------------------------------------------
+rem Start script for the CATALINA Server
+rem
+rem $Id: startup.bat,v 1.6 2004/05/27 18:25:11 yoavs Exp $
+rem ---------------------------------------------------------------------------
+
+rem Guess CATALINA_HOME if not defined
+set CURRENT_DIR=%cd%
+if not "%CATALINA_HOME%" == "" goto gotHome
+set CATALINA_HOME=%CURRENT_DIR%
+if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
+cd ..
+set CATALINA_HOME=%cd%
+cd %CURRENT_DIR%
+:gotHome
+if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
+echo The CATALINA_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+goto end
+:okHome
+
+set EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat
+
+rem Check that target executable exists
+if exist "%EXECUTABLE%" goto okExec
+echo Cannot find %EXECUTABLE%
+echo This file is needed to run this program
+goto end
+:okExec
+
+rem Get remaining unshifted command line arguments and save them in the
+set CMD_LINE_ARGS=
+:setArgs
+if ""%1""=="""" goto doneSetArgs
+set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
+shift
+goto setArgs
+:doneSetArgs
+
+call "%EXECUTABLE%" start %CMD_LINE_ARGS%
+
+:end

+ 31 - 0
demo/jakarta-tomcat/bin/startup.sh

@@ -0,0 +1,31 @@
+#!/bin/sh
+# -----------------------------------------------------------------------------
+# Start Script for the CATALINA Server
+#
+# $Id: startup.sh,v 1.1 2005/03/05 00:29:13 matt Exp $
+# -----------------------------------------------------------------------------
+
+# resolve links - $0 may be a softlink
+PRG="$0"
+
+while [ -h "$PRG" ] ; do
+  ls=`ls -ld "$PRG"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '.*/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG=`dirname "$PRG"`/"$link"
+  fi
+done
+ 
+PRGDIR=`dirname "$PRG"`
+EXECUTABLE=catalina.sh
+
+# Check that target executable exists
+if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
+  echo "Cannot find $PRGDIR/$EXECUTABLE"
+  echo "This file is needed to run this program"
+  exit 1
+fi
+
+exec "$PRGDIR"/"$EXECUTABLE" start "$@"

BIN
demo/jakarta-tomcat/bin/tomcat5.exe


BIN
demo/jakarta-tomcat/bin/tomcat5w.exe


Деякі файли не було показано, через те що забагато файлів було змінено