<project name="Runme test project" default="build" basedir=".">

	<property name="src" location="src"/>
	<property name="dist" location="dist"/>
	<property name="doc" location="doc"/>
	<property name="bin" location="bin"/>
	<property name="dot.exe" location="${bin}/graphviz-2.4/bin/dot.exe" />	
	
	<taskdef name="ant2gif" classname="com.oy.shared.lm.ant.ANTtoGIFTask" classpath="${dist}/lib/oy-lm-1.1.jar"/>	
	<taskdef name="ojb2gif" classname="com.oy.shared.lm.ant.OJBtoGIFTask" classpath="${dist}/lib/oy-lm-1.1.jar"/>	
	<taskdef name="hbm2gif" classname="com.oy.shared.lm.ant.HBMtoGIFTask" classpath="${dist}/lib/oy-lm-1.1.jar"/>	
	<taskdef name="dtd2gif" classname="com.oy.shared.lm.ant.DTDtoGIFTask" classpath="${dist}/lib/oy-lm-1.1.jar"/>	
		  
	<target name="init">	
		<delete dir="${doc}/test"/>
    	<mkdir dir="${doc}/test"/>
    	<mkdir dir="${doc}/test/ant"/>
    	<mkdir dir="${doc}/test/ojb"/>
    	<mkdir dir="${doc}/test/hbm"/>
    	<mkdir dir="${doc}/test/dtd"/>     	
	
	</target>
		
	<target name="antTests" depends="init">		
		<ant2gif  
			caption="XML file for launching Catalina 5.0.25 applications using ant."
			rotated="true"
			colors="#00AEFF, #FFFFCD, #FF5937, black, black"
			inFile="${src}/com/oy/shared/lm/test/ant/catalina-5.0.25.xml" 
			dotFile="${doc}/test/ant/catalina-5.0.25.dot" 
			outFile="${doc}/test/ant/catalina-5.0.25.png"
			exeFile="${dot.exe}"
		/>


		<ant2gif  
			caption="Hibernate 3.0 ANT build script."
			rotated="true"
			colors="#00AEFF, #FFFFCD, #FF5937, black, black"
			inFile="${src}/com/oy/shared/lm/test/ant/hibernate-3.0-build.xml" 
			dotFile="${doc}/test/ant/hibernate-3.0-build.dot" 
			outFile="${doc}/test/ant/hibernate-3.0-build.png"
			exeFile="${dot.exe}"
		/>	

		<ant2gif 
			caption="ObJectBridge 1.0.0 ANT build configuration."
			rotated="true"
			colors="#00AEFF, #FFFFCD, #FF5937, black, black"
			inFile="${src}/com/oy/shared/lm/test/ant/db-ojb-1.0.0-build.xml" 
			dotFile="${doc}/test/ant/db-ojb-1.0.0-build.dot" 
			outFile="${doc}/test/ant/db-ojb-1.0.0-build.png"
			exeFile="${dot.exe}"
		/>

	</target>
	
	<target name="ojbTests" depends="init">	

		<ojb2gif 
			caption="Linguine Maps 1.0 object model."
			colors="yellow, black, black"
			inFile="${src}/com/oy/shared/lm/graph/schema/graph.ojb.xml"
			dotFile="${doc}/test/ojb/ojb-linguine-maps.dot" 
			outFile="${doc}/test/ojb/ojb-linguine-maps.png"
			exeFile="${dot.exe}"
		/>		

		<ojb2gif 
			caption="ObJectBridge 1.0.0 sample mapping."
			colors="yellow, black, black"
			inFile="${src}/com/oy/shared/lm/test/ojb/ojb-test-mapping.xml"
			dotFile="${doc}/test/ojb/ojb-test-mapping.dot" 
			outFile="${doc}/test/ojb/ojb-test-mapping.png"
			exeFile="${dot.exe}"
		/>		
		
		<ojb2gif 
			caption="ObJectBridge 1.0.0 mapping of classes used in junit tests"
			colors="yellow, black, black"
			rotated="true"
			inFile="${src}/com/oy/shared/lm/test/ojb/repository_junit_odmg.xml"
			dotFile="${doc}/test/ojb/repository_junit_odmg.dot" 
			outFile="${doc}/test/ojb/repository_junit_odmg.png"
			exeFile="${dot.exe}"
		/>						


		<ojb2gif 
			caption="ObJectBridge 1.0.0 mapping of classes used in sequence manager testing"
			colors="yellow, black, black"
			rotated="true"
			inFile="${src}/com/oy/shared/lm/test/ojb/repository_junit_meta_seq.xml"
			dotFile="${doc}/test/ojb/repository_junit_meta_seq.dot" 
			outFile="${doc}/test/ojb/repository_junit_meta_seq.png"
			exeFile="${dot.exe}"
		/>					
		
		<ojb2gif 
			caption="ObJectBridge 1.0.0 mapping of classes used in testing references"
			colors="yellow, black, black"
			rotated="true"
			inFile="${src}/com/oy/shared/lm/test/ojb/repository_junit_reference.xml"
			dotFile="${doc}/test/ojb/repository_junit_reference.dot" 
			outFile="${doc}/test/ojb/repository_junit_reference.png"
			exeFile="${dot.exe}"
		/>									


		<ojb2gif 
			caption="ObJectBridge 1.0.0 mapping of classes used in junit tests and tutorials"
			colors="yellow, black, black"
			rotated="true"
			inFile="${src}/com/oy/shared/lm/test/ojb/repository_junit.xml"
			dotFile="${doc}/test/ojb/repository_junit.dot" 
			outFile="${doc}/test/ojb/repository_junit.png"
			exeFile="${dot.exe}"
		/>		

	</target>
	
	
	<target name="hbmTests" depends="init">	
	
		<hbm2gif 
			caption="HIBERNATE - Relational Persistence for Idiomatic Java (Chapter 24)"
			colors="#FF5937, black, black"
			inFile="${src}/com/oy/shared/lm/test/hbm/hbm-test-mapping.xml"
			dotFile="${doc}/test/hbm/hbm-test-mapping.dot" 
			outFile="${doc}/test/hbm/hbm-test-mapping.png"
			exeFile="${dot.exe}"
		/>		
		
		<hbm2gif 
			caption="HIBERNATE Animals"
			colors="#FF5937, black, black"
			inFile="${src}/com/oy/shared/lm/test/hbm/Animal.hbm.xml"
			dotFile="${doc}/test/hbm/Animal.hbm.dot" 
			outFile="${doc}/test/hbm/Animal.hbm.png"
			exeFile="${dot.exe}"
		/>		
		
		<hbm2gif 
			caption="HIBERNATE Baz"
			colors="#FF5937, black, black"
			inFile="${src}/com/oy/shared/lm/test/hbm/Baz.hbm.xml"
			dotFile="${doc}/test/hbm/Baz.hbm.dot" 
			outFile="${doc}/test/hbm/Baz.hbm.png"
			exeFile="${dot.exe}"
		/>		
				
		<hbm2gif 
			caption="HIBERNATE Beings"
			colors="#FF5937, black, black"
			inFile="${src}/com/oy/shared/lm/test/hbm/Beings.hbm.xml"
			dotFile="${doc}/test/hbm/Beings.hbm.dot" 
			outFile="${doc}/test/hbm/Beings.hbm.png"
			exeFile="${dot.exe}"
		/>	
		
		<hbm2gif 
			caption="HIBERNATE Multi"
			colors="#FF5937, black, black"
			inFile="${src}/com/oy/shared/lm/test/hbm/Multi.hbm.xml"
			dotFile="${doc}/test/hbm/Multi.hbm.dot" 
			outFile="${doc}/test/hbm/Multi.hbm.png"
			exeFile="${dot.exe}"
		/>				
		
		<hbm2gif 
			caption="HIBERNATE Employment"
			colors="#FF5937, black, black"
			inFile="${src}/com/oy/shared/lm/test/hbm/Employment.hbm.xml"
			dotFile="${doc}/test/hbm/Employment.hbm.dot" 
			outFile="${doc}/test/hbm/Employment.hbm.png"
			exeFile="${dot.exe}"
		/>				
		
		<hbm2gif 
			caption="HIBERNATE FooBar"
			colors="#FF5937, black, black"
			inFile="${src}/com/oy/shared/lm/test/hbm/FooBar.hbm.xml"
			dotFile="${doc}/test/hbm/FooBar.hbm.dot" 
			outFile="${doc}/test/hbm/FooBar.hbm.png"
			exeFile="${dot.exe}"
		/>				
		
		<hbm2gif 
			caption="HIBERNATE ABC"
			colors="#FF5937, black, black"
			inFile="${src}/com/oy/shared/lm/test/hbm/ABC.hbm.xml"
			dotFile="${doc}/test/hbm/ABC.hbm.dot" 
			outFile="${doc}/test/hbm/ABC.hbm.png"
			exeFile="${dot.exe}"
		/>			
		
		<hbm2gif 
			caption="HIBERNATE Container"
			colors="#FF5937, black, black"
			inFile="${src}/com/oy/shared/lm/test/hbm/Container.hbm.xml"
			dotFile="${doc}/test/hbm/Container.hbm.dot" 
			outFile="${doc}/test/hbm/Container.hbm.png"
			exeFile="${dot.exe}"
		/>					
				
	</target>
		
	<target name="dtdTests" depends="init">	
		
		<dtd2gif 
			caption="Hibernate Mapping DTD 2.0"
			colors="orange, darkorange, black, black"
			inFile="${src}/com/oy/shared/lm/test/dtd/hibernate-mapping-2.0.dtd"
			dotFile="${doc}/test/dtd/hibernate-mapping-2.0.dot" 
			outFile="${doc}/test/dtd/hibernate-mapping-2.0.png"
			exeFile="${dot.exe}"
			excludes=" 
				subclass,joined-subclass,
				import,discriminator,return,synchronize,timestamp,version,meta-value,parent,
				cache,jcs-cache,query,sql-query,
				id,key,key-property,key-many-to-one,composite-id,collection-id,
				generator,param,
				index,index-many-to-many,index-many-to-any,composite-index
			"
		/>			
		
		<dtd2gif 
			caption="Hibernate Mapping DTD 2.0"
			colors="orange, darkorange, black, black"
			inFile="${src}/com/oy/shared/lm/test/dtd/hibernate-mapping-2.0.dtd"
			dotFile="${doc}/test/dtd/xhibernate-mapping-2.0.dot" 
			outFile="${doc}/test/dtd/xhibernate-mapping-2.0.png"
			exeFile="${dot.exe}"
			includes="
				hibernate-mapping,class,component,bag,list,array,set,map,
				many-to-many,one-to-many,one-to-many,many-to-one,nested-composite-element,
				element,composite-element,property
			"
		/>			
		
		<dtd2gif 
			caption="Hibernate Mapping DTD 3.0"
			colors="orange, darkorange, black, black"
			inFile="${src}/com/oy/shared/lm/test/dtd/hibernate-mapping-3.0.dtd"
			dotFile="${doc}/test/dtd/hibernate-mapping-3.0.dot" 
			outFile="${doc}/test/dtd/hibernate-mapping-3.0.png"
			exeFile="${dot.exe}"
		/>			
		
		<dtd2gif 
			caption="ObJectRelationalBridge 1.0.0 - Bridging Java objects and relational dabatases"
			colors="orange, darkorange, black, black"
			inFile="${src}/com/oy/shared/lm/test/dtd/ojb-1.0.0-repository.dtd"
			dotFile="${doc}/test/dtd/ojb-1.0.0-repository.dtd.dot" 
			outFile="${doc}/test/dtd/ojb-1.0.0-repository.dtd.png"
			exeFile="${dot.exe}"
		/>			  
		
		<dtd2gif 
		    caption="DTD Struts Configuration 1.2"
			colors="limegreen, green, blue, black"
			inFile="${src}/com/oy/shared/lm/test/dtd/struts-config_1_2.dtd"
			dotFile="${doc}/test/dtd/struts-config_1_2.dot" 
			outFile="${doc}/test/dtd/struts-config_1_2.png"
			exeFile="${dot.exe}"
		/>			

		<dtd2gif 
		    caption="DTD for the Tile Definition File, Version 1.1"
			colors="limegreen, green, blue, black"
			inFile="${src}/com/oy/shared/lm/test/dtd/tiles-config_1_1.dtd"
			dotFile="${doc}/test/dtd/tiles-config_1_1.dot" 
			outFile="${doc}/test/dtd/tiles-config_1_1.png"
			exeFile="${dot.exe}"
		/>	
		
		<dtd2gif 
		    caption="This is the DTD defining the JavaServer Pages 1.2 Tag Library"
			colors="limegreen, green, blue, black"
			inFile="${src}/com/oy/shared/lm/test/dtd/web-jsptaglibrary_1_2.dtd"
			dotFile="${doc}/test/dtd/web-jsptaglibrary_1_2.dot" 
			outFile="${doc}/test/dtd/web-jsptaglibrary_1_2.png"
			exeFile="${dot.exe}"
		/>	
		
		<dtd2gif 
		    caption="This is the DTD defining the JavaServer Pages 1.2 Tag Library"
			colors="limegreen, green, blue, black"
			inFile="${src}/com/oy/shared/lm/test/dtd/ejb-jar_2_0.dtd"
			dotFile="${doc}/test/dtd/ejb-jar_2_0.dot" 
			outFile="${doc}/test/dtd/ejb-jar_2_0.png"
			exeFile="${dot.exe}" 
		/>			
		
		<dtd2gif 
		    caption="DTD for Apache ANT"
			colors="limegreen, green, blue, black"
			inFile="${src}/com/oy/shared/lm/test/dtd/ant.dtd"
			dotFile="${doc}/test/dtd/ant.dot"  
			outFile="${doc}/test/dtd/ant.png"
			exeFile="${dot.exe}" 
		/>					

	</target>
	
	<target name="build" depends="antTests,ojbTests,hbmTests,dtdTests"/>
		
</project>