db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r910600 [14/29] - in /db/torque/torque4/trunk: maven-torque-gf-plugin/ maven-torque-gf-plugin/src/ maven-torque-gf-plugin/src/main/ maven-torque-gf-plugin/src/main/java/ maven-torque-gf-plugin/src/main/java/org/ maven-torque-gf-plugin/src/m...
Date Tue, 16 Feb 2010 17:16:02 GMT
Added: db/torque/torque4/trunk/torque-generator/src/maven-plugin-config/checkstyle/turbine-checkstyle.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/maven-plugin-config/checkstyle/turbine-checkstyle.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/maven-plugin-config/checkstyle/turbine-checkstyle.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/maven-plugin-config/checkstyle/turbine-checkstyle.xml Tue Feb 16 17:15:43 2010
@@ -0,0 +1,213 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you 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.
+-->
+
+<!DOCTYPE module PUBLIC
+    "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
+    "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
+
+<!--
+
+  Checkstyle configuration that checks the sun coding conventions from:
+
+    - the Java Language Specification at
+      http://java.sun.com/docs/books/jls/second_edition/html/index.html
+
+    - the Sun Code Conventions at http://java.sun.com/docs/codeconv/
+
+    - the Javadoc guidelines at
+      http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
+
+    - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
+
+    - some best practices
+
+  Checkstyle is very configurable. Be sure to read the documentation at
+  http://checkstyle.sf.net (or in your downloaded distribution).
+
+  Most Checks are configurable, be sure to consult the documentation.
+
+  To completely disable a check, just comment it out or delete it from the file.
+
+  Finally, it is worth reading the documentation.
+
+-->
+
+<module name="Checker">
+    <property name="severity" value="warning"/>
+
+	<property name="localeCountry" value="US" />
+	<property name="localeLanguage" value="en" />
+
+    <!-- Checks that a package.html file exists for each package.     -->
+    <!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
+    <module name="PackageHtml"/>
+
+    <!-- Checks whether files end with a new line.                        -->
+    <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
+    <module name="NewlineAtEndOfFile"/>
+
+    <!-- Checks that property files contain the same keys.         -->
+    <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
+    <module name="Translation"/>
+
+    <module name="TreeWalker">
+        <!-- ************************************************************** -->
+        <!-- Checks that are different from the sun coding conventions ones -->
+        <!-- ************************************************************** -->
+        <property name="tabWidth" value="4"/>
+        <module name="LeftCurly">
+          <property name="option" value="nl"/>
+        </module>
+        <module name="RightCurly">
+          <property name="option" value="alone"/>
+        </module>
+        <module name="LineLength">
+          <property name="ignorePattern" value="@version"/>
+          <property name="max" value="132"/>
+        </module>
+        <module name="MemberName">
+          <property name="format" value="^[a-z]+_*[a-zA-Z0-9]*$"/>
+        </module>
+        <module name="StaticVariableName">
+          <property name="format" value="^[a-z]+_*[a-zA-Z0-9]*$"/>
+        </module>
+        <module name="ConstantName">
+          <property name="format" value="^(([A-Z][A-Z0-9]*(_[A-Z0-9]+)*)|log)$"/>
+        </module>
+        <module name="ParameterName">
+          <property name="format" value="^[a-z]+_*[a-zA-Z0-9]*$"/>
+        </module>
+
+        <!-- ************************************************************** -->
+        <!-- Default Sun coding conventions checks                          -->
+        <!-- ************************************************************** -->
+
+        <!-- Checks for Javadoc comments.                     -->
+        <!-- See http://checkstyle.sf.net/config_javadoc.html -->
+        <module name="JavadocMethod">
+          <property name="excludeScope" value="private"/>
+        </module>
+        <module name="JavadocType"/>
+        <module name="JavadocVariable"/>
+
+
+        <!-- Checks for Naming Conventions.                  -->
+        <!-- See http://checkstyle.sf.net/config_naming.html -->
+        <module name="LocalFinalVariableName"/>
+        <module name="LocalVariableName"/>
+        <module name="MethodName"/>
+        <module name="PackageName"/>
+        <module name="TypeName"/>
+
+
+        <!-- Checks for Headers                              -->
+        <!-- See http://checkstyle.sf.net/config_header.html -->
+        <module name="Header">
+            <property name="headerFile" value="${checkstyle.header.file}"/>
+            <property name="ignoreLines" value="1"/>
+        </module>
+
+        <!-- Following interprets the header file as regular expressions. -->
+        <!-- <module name="RegexpHeader"/>                                -->
+
+
+        <!-- Checks for imports                              -->
+        <!-- See http://checkstyle.sf.net/config_import.html -->
+        <module name="AvoidStarImport"/>
+        <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
+        <module name="RedundantImport"/>
+        <module name="UnusedImports"/>
+
+
+        <!-- Checks for Size Violations.                    -->
+        <!-- See http://checkstyle.sf.net/config_sizes.html -->
+        <module name="FileLength"/>
+        <module name="MethodLength"/>
+        <module name="ParameterNumber"/>
+
+
+        <!-- Checks for whitespace                               -->
+        <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+        <module name="EmptyForIteratorPad"/>
+        <module name="NoWhitespaceAfter"/>
+        <module name="NoWhitespaceBefore"/>
+        <module name="OperatorWrap"/>
+        <module name="ParenPad"/>
+        <module name="TabCharacter"/>
+        <module name="WhitespaceAfter"/>
+        <module name="WhitespaceAround">
+          <property name="tokens" value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, EQUAL, GE, LAND, LCURLY, LE, LITERAL_ASSERT, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, RCURLY, SL, SLIST, SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN, TYPE_EXTENSION_AND"/>
+        </module>
+
+
+        <!-- Modifier Checks                                    -->
+        <!-- See http://checkstyle.sf.net/config_modifiers.html -->
+        <module name="ModifierOrder"/>
+        <module name="RedundantModifier"/>
+
+
+        <!-- Checks for blocks. You know, those {}'s         -->
+        <!-- See http://checkstyle.sf.net/config_blocks.html -->
+        <module name="EmptyBlock"/>
+        <module name="NeedBraces"/>
+
+
+        <!-- Checks for common coding problems               -->
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <module name="DoubleCheckedLocking"/>    <!-- MY FAVOURITE -->
+        <module name="EmptyStatement"/>
+        <module name="EqualsHashCode"/>
+        <module name="FallThrough"/>
+        <module name="HiddenField">
+          <property name="tokens" value="VARIABLE_DEF"/>
+        </module>
+        <module name="IllegalInstantiation"/>
+        <module name="InnerAssignment"/>
+        <module name="MagicNumber"/>
+        <module name="MissingSwitchDefault"/>
+<!--        <module name="OneMethodPrivateField" /> -->
+        <module name="RedundantThrows"/>
+        <module name="SimplifyBooleanExpression"/>
+        <module name="SimplifyBooleanReturn"/>
+
+        <!-- Checks for class design                         -->
+        <!-- See http://checkstyle.sf.net/config_design.html -->
+        <module name="FinalClass"/>
+        <module name="HideUtilityClassConstructor"/>
+        <module name="VisibilityModifier">
+        <module name="MissingSwitchDefault"/>
+          <property name="protectedAllowed" value="true"/>
+        </module>
+
+
+        <!-- Miscellaneous other checks.                   -->
+        <!-- See http://checkstyle.sf.net/config_misc.html -->
+        <module name="ArrayTypeStyle"/>
+<!--         <module name="FinalParameters"/> -->
+        <module name="GenericIllegalRegexp">
+            <property name="format" value="\s+$"/>
+            <property name="message" value="Line has trailing spaces."/>
+        </module>
+        <module name="TodoComment"/>
+        <module name="UpperEll"/>
+
+    </module>
+
+</module>

Added: db/torque/torque4/trunk/torque-generator/src/maven-plugin-config/findbugs/findbugs-exclude.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/maven-plugin-config/findbugs/findbugs-exclude.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/maven-plugin-config/findbugs/findbugs-exclude.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/maven-plugin-config/findbugs/findbugs-exclude.xml Tue Feb 16 17:15:43 2010
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you 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.
+-->
+
+<FindBugsFilter>
+     <Match>
+       <Bug code="UwF" />
+     </Match>
+</FindBugsFilter>
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/site/site.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/site/site.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/site/site.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/site/site.xml Tue Feb 16 17:15:43 2010
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you 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.
+-->
+
+<project name="torque-gf">
+  <bannerLeft>
+    <name>The apache db project</name>
+    <href>http://db.apache.org</href>
+  </bannerLeft>
+  <bannerRight>
+    <name>torque-gf</name>
+    <href>http://db.apache.org/torque</href>
+  </bannerRight>
+  <body>
+    <menu name="Documentation">
+      <item name="Introduction" href="index.html"/>
+      <item name="Getting started" href="gettingStarted.html"/>
+      <item name="Concepts" href="concepts.html"/>
+      <item name="Configuration" href="configuration.html"/>
+      <item name="Internals" href="internals.html" collapse="false">
+        <item name="Generator Types" href="internals/generatorTypes.html"/>
+      </item>
+    </menu>
+    <menu ref="reports"/>
+  </body>
+</project>
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/site/xdoc/concepts.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/site/xdoc/concepts.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/site/xdoc/concepts.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/site/xdoc/concepts.xml Tue Feb 16 17:15:43 2010
@@ -0,0 +1,251 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you 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.
+-->
+
+<document>
+
+ <properties>
+  <title>Configuration</title>
+ </properties>
+
+ <body>
+  <section name="Introduction">
+    This document introduces the main concepts of the Torque generation 
+    framework.
+    The following concepts are explained:
+    <ul>
+      <li>
+        <a href="#Generators">Generators</a>
+      </li>
+      <li>
+        <a href="#Sources">Sources</a>
+      </li>
+      <li>
+        <a href="#Transformers">Transformers</a>
+      </li>
+      <li>
+        <a href="#Controller">Controller</a>
+      </li>
+      <li>
+        <a href="#Options">Options</a>
+      </li>
+      <li>
+        <a href="#Variables">Variables</a>
+      </li>
+      <li>
+        <a href="#Mergepoints">Mergepoints</a>
+      </li>
+      <li>
+        <a href="#Namespaces">Namespaces</a>
+      </li>
+    </ul>
+  </section>
+  
+  <section name="Generators">
+    <p>
+      A generator generates String output from sources.
+      An example for a generator is a VelocityTemplateGenerator,
+      which uses a velocity template to create the output.
+      A generator may be used in several generation processes.
+      The output of a generator can be used as file name or (part of a) 
+      file content.
+    </p>
+  </section>
+  
+  <section name="Sources">
+    <p>
+      Sources are the input of the generation process. They can be read 
+      from different formats, e.g. properties files and XML.
+      For each generation process, a directed weighted
+      <a href="http://en.wikipedia.org/wiki/Graph_(mathematics)">graph</a>
+      (which is usually, but not necessarily, a 
+      <a href="http://en.wikipedia.org/wiki/Tree_(graph_theory)">tree</a>) 
+      is constructed from the sources.
+      The graph may then be fed into the generators, or it may be transformed
+      in an intermediate step. Each generator can access the original 
+      respectively transformed graph to produce its output.
+    </p>
+    <p>
+      The graph is represented similarly to the structure which is normally 
+      used to represent XML files: 
+      The nodes are called "elements", and each element has a list of children
+      and a list of parents (i.e. parents and children are ordered).
+      Elements without parents
+      are also allowed, but usually there will be only one such element 
+      (the "root").<br/>
+      Each element can also have attributes. Each attribute has a name and a
+      value. There can be at most one attribute with a given name for each
+      element. <br/>
+      Additionally to the attributes, each element also has a name. 
+    </p>
+  </section>
+  
+  <section name="Transformers">
+    <p>
+      In the simplest generation projects, it suffices to pass the sources
+      directly to the generators. But in more complex projects, it makes sense
+      to transform the source before generating output from it.
+      A Transformer performs the transformation from an input graph to an
+      output graph. The output graph is then used for generation.
+    </p>
+     
+    <p>  
+      A typical example is that different source elements reference each other
+      (e.g. by name,  or by even more complex relations), 
+      and one would like to have this reference resolved before the 
+      generation phase. E.g. the source looks (in XML representation) like 
+      <source><![CDATA[
+      <root>
+        <element name="element1">
+          <related name="element2">
+        </element>
+        <element name="element2"/>
+        <element name="element3"/>
+      </root>
+      ]]>
+      </source>
+      and it would be transformed to
+      <source><![CDATA[
+      <root>
+        <element name="element1">
+          <related name="element2">
+          <relatedElements>
+            <element name="element2"/> <-- This is typically element2 itself, not a copy
+          </relatedElements>
+        </element>
+        <element name="element2"/>
+        <element name="element3"/>
+      </root>
+      ]]>
+      </source>
+      Another  typical example is where part of the generation process will be
+      used in different places. E.g. imagine a set of database tables from
+      which java classes are generated. Because the tables are connected,
+      so should the generated java classes be. Thus, the java class name
+      associated to one table will be used in more than one place. To make sure
+      that the same name is used everywhere, it makes sense to generate the
+      java class name of the table beforehand, like:
+      <source><![CDATA[
+      <database>
+        <table name="FIRST_TABLE" />
+      </database>
+      ]]>
+      </source>
+      would be transformed to
+      <source><![CDATA[
+      <database>
+        <table name="FIRST_TABLE" javaName="FirstTable"/>
+      </database>
+      ]]>
+      </source>      
+    </p>
+  </section>
+  
+  <section name="Controller">
+    <p>
+      The Controller makes sure that the configuration files
+      are read, reads the source and options, performs possible transformations 
+      on the source and feeds the result into the generators.
+    </p>
+  </section>
+  
+  <section name="Options">
+    <p>
+      Options can be used in the generation process
+      to influence the output.  Note that sometimes, there might be an
+      ambiguity between sources and options.  The difference is more of a
+      philosophical nature: Sources are the data to be processed, whereas
+      options influence the way the data is processed.
+    </p>
+  </section>
+  
+  <section name="Variables">
+    <p>
+      To ease communication between generators, the concept of a variable
+      is also known outside of the single generators. This makes it possible
+      e.g. to pass a variable from a Java generator to a Velocity template
+      in the same generation process.
+    </p>
+    <p>
+      Variables have different scopes. The scope defines where a certain
+      variable is visible. The current scopes are "GENERATOR" (the variable
+      is only visible in this generator), "CHILDREN" (the variable is visible 
+      to the current generator and all generators called by it), "FILE"
+      (the variable is visible during the generation of the current file),
+      and "GLOBAL" (the variable is always visible).
+    </p>
+    <p>
+      Note that scopes and <a href="#Namespaces">namespaces</a> 
+      are orthogonal concepts, i.e. a variable is visible only if it
+      has a sufficient scope and the correct namespace.
+    </p>
+  </section>
+  
+  <section name="Mergepoints">
+    <p>
+      The Torque generation framework encourages to use modularized generators,
+      in order to reuse them or drop, replace or add parts into the generation
+      process. 
+      To connect one generator to another, mergepoints can be used.
+      A mergepoint is a place where the output of one generator can be fed
+      into another generator.
+    </p>
+    <p>
+      If a mergepoint is encountered during the generation process,
+      one or more actions may be performed, depending of the configuration
+      of the current generator. Typically, these actions describe how to
+      traverse the source tree. An example would be "invoke the generator xyz
+      for all children of the current element and insert the output here".
+    </p>
+    <p>
+      If no action is defined at a mergepoint, it is left unused. This should
+      be used to insert extension points in the generators, as a placeholder
+      for additional output. E.g. if you write a velocity template which
+      generates a java class, it makes sense to create an unused extension
+      points where additional methods can be inserted (without changing the 
+      template).  
+    </p>
+  </section>
+
+  <section name="Namespaces">
+    <p>
+      If generators are created in a modular manner, it is desirable that 
+      some options and variables are visible only to one generator,
+      while others should be visible to all generators. To support this,
+      generators, options and variables can be assigned a namespace. 
+      Namespace elements are separated by dots, and are separated from the 
+      name by colons. Generators see only options and variables which live 
+      in their namespace or in parent namespaces.
+    </p>
+    <p>
+      For example, the generator with the fully qualified name 
+      "org.apache.torque.generator:classnameToFilename" lives in the namespace
+      "org.apache.torque.generator" and will only see variables and options
+      set in that namespace or in the parent namespaces "org.apache.torque", 
+      "org.apache", "org" and "". The namespace "" is also called the root
+      namespace, variables and options therein are visible to all generators.
+    </p>
+    <p>
+      You do not need to use namespaces; if you do not prefix any name with 
+      a namespace, every option and variable will be seen by every template.
+    </p>
+  </section>
+
+ </body>
+</document>
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/site/xdoc/configuration.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/site/xdoc/configuration.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/site/xdoc/configuration.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/site/xdoc/configuration.xml Tue Feb 16 17:15:43 2010
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you 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.
+-->
+
+<document>
+
+ <properties>
+  <title>Configuration</title>
+ </properties>
+
+ <body>
+  <section name="Introduction">
+    The Torque generation framework can be configured by the following files:
+    <ul>
+      <li>
+        The file conf/control.xml tells the generator which files should be
+        generated, and which sources, options and generators should be
+        used to generate them.
+        This is the only file you should have to edit if you are using
+        a given set of templates and generators.
+      </li>
+      <li>
+        For the generation process, generators (which create String output
+        out of sources) must be defined.
+        In each generator configuration file, one or more generators 
+        can be defined. 
+        The minimum information needed for each generator is a unique name,
+        its type, and the information to invoke the generator of this 
+        given type. 
+        For example, if the generator has the type &quot;velocity&quot;
+        i.e. the generator is a velocity template, then the path to
+        the template is needed as well.<br/>
+        All generator properties can be overridden in the controller
+        configuration.
+      </li>
+      <li>
+        If you are using template based generation (e.g. using velocity), 
+        of course the templates need to be provided. If you use java generation,
+        the java classes need to be present in the generator's classpath. 
+      </li>
+    </ul>
+  </section>
+  <section name="Standard directory layout">
+    The Torque generation framework uses a standard directory layout for its
+    configuration:
+    <source>
+      - torque-gf directory (e.g. src/main/torque-gf for maven 2)
+        - conf
+          - control.xml
+          - options.properties (not always present, name can differ)
+        - generatorDefs
+          - generation_config_example.xml (name not fixed)
+          - ... (other generator definitions)
+        - templates (only if template generators are used)
+          - template_example.vm (name not fixed)
+          - ... (other templates)
+    </source>
+    The sources are not considered part of the configuration; thus they do not
+    appear here (If you have no idea where to put the sources,
+    create a src directory in the torque-gf directory and put them there.)
+    The content of the various directories is described below.  
+  </section>
+  
+  <section name="The control configuration">
+    The main configuration consists of the file <code>control.xml</code>, 
+    and maybe of one or more options file, and is located in the directory
+    <code>conf</code>.<br/>
+    In the file <code>control.xml</code>, the option files are declared,
+    and the output files are defined. A control file may like this:
+    <source><![CDATA[
+<?xml version="1.0" encoding="UTF-8"?>
+<control loglevel="debug">
+  <options path="options.properties"/>
+  
+  <!-- Documentation html -->
+  <output file="datamodel.html">
+    <source elements="database" path="schema.xml"/>
+    <generator name="torque.doc.html:html"/>
+  </output>
+  
+  <!-- Base DB object classes -->
+  <output>
+    <filenameGenerator
+        type="java" 
+        class="org.apache.torque.gf.generator.java.FilenameGenerator">
+      <mergepoint name="package">
+        <action type="sourceElement" element="." attribute="baseDbObjectPackage" acceptEmpty="false"/>
+      </mergepoint>
+      <mergepoint name="classname">
+        <action type="sourceElement" element="." attribute="baseDbObjectClassName" acceptEmpty="false"/>
+      </mergepoint>
+    </filenameGenerator>
+    <source elements="database/table" path="schema.xml">
+      <transformer class="org.apache.torque.templates.transformer.om.OMTransformer"/>
+      <transformer class="org.apache.torque.templates.transformer.om.dbobject.base.BaseDbObjectTransformer"/>
+    </source>
+    <generator name="torque.om:baseDbObject"/>
+  </output>  
+</control>
+    ]]></source>
+    The loglevel attribute on the control file defines the amount of logging
+    during generation. Possible values are "debug", "info", "warn" and "error",
+    default is "info".<br/>
+    The "options" elements define which option files should be read
+    (one can define more than one).
+    If the same option is defined in different files, the value in the 
+    last file takes precedence.<br/>
+    The output tags define which output files are generated. 
+    The filename of the output files can either be defined in the "filename"
+    attribute if the filename is fixed, or in the filenameGenerator 
+    child element if the filename is generated from the sources.
+    The source elements for which output files are generated are defined in
+    the source child element of the output tag. A XPath-like notation
+    can be used to traverse the source graph (note that only the simplest 
+    XPath elements are recognized, i.e. explicit element names and the Tokens 
+    "/", ".." and "."). For each source element which matches the description
+    in the elements attribute, an output file is generated 
+    (note that this also applies for fixed output filenames).<br/>
+    The filename generator can be either referenced by name (if it is defined
+    elsewhere), or can be defined here by using the "type" and "class"
+    attributes.
+    If the source needs to be transformed before generation, transformer
+    tags are included as children of the source tag. For each transformer,
+    the class must be given. If more than one transformer is defined for a 
+    given source, the output of the first transformer is used as input for the 
+    second transformer, and so on, and the output of the last transformer is 
+    fed into the generators.
+  </section>
+  
+  <section name="Configuring the generators">
+    <p>
+      The generators can be defined and wired together in the generatorDefs 
+      subdirectory (recommended) or in the control.xml file 
+      (should only be used when overriding settings in existing 
+      template sets).
+      Each file in this directory defines one or more generators.
+      Each generator must be given an unique name; it is recommended to use
+      namespaces for avoiding name conflicts if more than one template set 
+      is used. Also, the type of the generator must be given (currently
+      supported are "velocity" and "java"). Depending on the type, further
+      informations need to be given: The velocity generators need the path
+      to the template (relative to the templates subdirectory),
+      the java generators need the class of the generator class.
+      For example, this defines a java and a velocity generator:
+    </p>
+    
+<source><![CDATA[
+<?xml version="1.0" encoding="UTF-8"?>
+<generators>
+  <generator name="org.apache.torque.gf:javaGenerator"
+      type="java" 
+      class="org.apache.torque.gf.JavaGenerator">
+  </generator>
+  <generator name="org.apache.torque.gf:velocityGenerator"
+      type="velocity" 
+      path="testTemplate.vm"/>
+</generators>
+]]></source>
+
+    <subsection name="mergepoints">
+      <p>
+        In each generator, mergepoints can be defined. 
+        Into each mergepoint, external content may be inserted 
+        (e.g. the value of an option or a 
+        variable or the output of another template). To keep your templates
+        flexible, it makes sense to define mergepoints where you do not need
+        them now but may need them in the future (you do not have to assign
+        content to a mergepoint, it can also stay empty).
+        The mergepoint inside the generator is referenced by
+        its name. 
+      </p>
+    </subsection>
+  </section>
+ </body>
+</document>
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/site/xdoc/gettingStarted.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/site/xdoc/gettingStarted.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/site/xdoc/gettingStarted.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/site/xdoc/gettingStarted.xml Tue Feb 16 17:15:43 2010
@@ -0,0 +1,517 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you 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.
+-->
+
+<document>
+
+ <properties>
+  <title>Getting Started</title>
+ </properties>
+
+ <body>
+  <section name="Introduction">
+    <p>
+      In this introduction, it will be shown how to generate code
+      using the Torque generation framework (torque-gf).
+      Maven 2 is used as a build tool (although the example can
+      also be run using plain java),
+      a xml source file is used as input for generation and
+      velocity is used as template language.
+      In the following section, the necessary steps to set up such a project
+      are described; and detailed by a simple example: We have a properties file
+      and want to create a java enum which contains the keys as constants.
+      The sample files can be found in the src/test/site/gettingStarted
+      directory of the torque-gf sources.
+    </p>
+    <p> 
+      In our example, from the source
+      <source><![CDATA[
+torque.sample.property = sampleValue
+torque.some.other.property = someOtherValue
+    ]]></source>
+      we want produce the output
+    <source><![CDATA[
+package org.apache.torque.gf.example.propertyenum;
+
+/**
+ * Contains all keys in the property file.
+ */
+public enum PropertyKeys 
+{
+    /** Key for torque.sample.property */
+    TORQUE_SAMPLE_PROPERTY("torque.sample.property"),
+
+    /** Key for torque.some.other.property */
+    TORQUE_SOME_OTHER_PROPERTY("torque.some.other.property");
+
+    /** The property key. */
+    private String key;
+
+    /**
+     * Constructor.
+     *
+     * @param key the key of the property. 
+     */
+    private PropertyKeys(String key)
+    {
+        this.key = key;
+    }
+
+    /**
+     * Returns the property key.
+     *
+     * @return the property key.
+     */
+    public String getKey() 
+    {
+        return key;
+    }
+
+    @Override
+    public String toString()
+    {
+        return key;
+    }
+}
+      ]]></source>
+    </p>
+  </section>
+  
+  <section name="Project setup">
+    <p>
+      Create a root folder for your project. In the root folder, create a 
+      src/main/torque-gf folder. This is where all the files for
+      torque-gf go. In the torque-gf folder, create a "conf" subdirectory
+      (this is where the main configuration goes), a "templates" subdirectory
+      (for the velocity templates), a "generatorDefs" subdirectory 
+      (for the definition of the generators) and a "src" directory 
+      (for the source files, they can be anywhere in the project but if
+      you do not know a better place for them, torque-gf/src is a reasonable
+      default).
+    </p> 
+  </section>
+  
+  <section name="Creating a sample source">
+    <p>
+      As a starting point, create the source file which keeps the information
+      you need to generate the output (to MDA addicts, 
+      this is known as the "Metamodel instance". There is no explicit metamodel
+      needel, it is defined implicitly by the templates.).
+      In our example, the source will be the property file listed above.
+    </p>
+    <p>
+      This file will be used to feed the generation process. 
+      Name this file "propertiesData.properties" and put it into
+      the src subdirectory of the torque-gf directory.
+    </p>
+    <p>
+      Internally, torque-gf uses a representation similar to a xml file
+      to represent the source: Elements make up a tree or graph structure,
+      and each element has a set of named attributes. The internal
+      representation of our property source looks like
+      <source><![CDATA[
+<properties>
+  <entry key="torque.sample.property">sampleValue</entry>
+  <entry key="torque.some.other.property">someOtherValue</entry>
+</properties>
+      ]]></source>
+      A text node is represented as the attribute with the key null.
+      The internal structure of the source is important because the
+      generation process traverses the source tree, and the attribute names
+      are used to access the textual information in the source.
+    </p>
+    <p>
+      Other input formats (currently xml) are also supported.
+    </p>
+  </section>
+
+  <section name="Creating the templates">
+    <p>
+      Create the templates which produce the generated code in the
+      "templates" subdirectory of the "torque-gf" folder. Use at least one
+      template per file you want to generate; it is better to use one
+      template per logical unit (this improves reusability and readability).
+      A good idea is to create some sample output and start putting in
+      control structures (variables, loops, includes) as necessary.
+    </p>
+    <p>
+      In our desired output above, we can identify the following logical units:
+      <ul>
+        <li>The enum class frame</li>
+        <li>The constants for the single properties</li>
+        <li>The fields of the enum</li>
+        <li>The methods of the enum</li>
+      </ul>
+      So let's create a template for each logical unit.
+    </p>
+    <p>
+      The template for the enum's class frame, classFrame.vm, 
+      contains the class outer frame plus mergepoints
+      for the constants, fields and methods of the enum:
+      <source><![CDATA[
+package org.apache.torque.gf.example.propertyenum;
+
+/**
+ * Contains all keys in the property file.
+ */
+public enum PropertyKeys 
+{
+$torqueGf.mergepoint("constants")##
+$torqueGf.mergepoint("fields")##
+$torqueGf.mergepoint("methods")##
+}
+      ]]></source>
+      As mentioned above, <a href="http://velocity.apache.org">velocity</a> is used
+      as template language. This introduction does not cover the velocity
+      template language itself; if you are not familiar with velocity,
+      look at <a href="http://velocity.apache.org">the velocity documentation</a>.
+      <br/>
+      The interesting part in the template is the call of the mergepoint method
+      of the torqueGf Object. The torqueGf object is placed into the velocity
+      context by torque-gf and contains methods for defining mergepoints
+      and accessing the source, options and variables. See
+      <a href="apidocs/org/apache/torque/gf/template/velocity/TorqueGfVelocity.html">its javadoc</a>
+      for the available methods.
+    </p>
+    <p>
+      The template constant.vm, which outputs a constant for each property,
+      is also interesting because we need to access information from the
+      source file. For outputting simple data, this is simple: 
+      The velocity construct "${key}" accesses the object named "key"
+      in the velocity context. The "key" object is put in the velocity
+      context by torque-gf, which by default puts all attributes of the 
+      current source element into the velocity context.<br/>
+      For the name of the constant, the key would also be used, but it needs
+      to be processed in some way (capitalized, underscores added).
+      For this processing we will use a built-in java generator, which
+      will be plugged into the mergepoint "constantName".<br/>
+      Finally, we need a comma after each definition, except for the last
+      definition, where we need a semicolon. To decide whether to render the
+      comma or the semicolon, we fetch the current source element from 
+      torgue-gf (${torqueGf.getSourceElement()) and ask it whether it
+      has following siblings (i.e. source elements with the same parent
+      and the same name) (see
+      <a href="apidocs/org/apache/torque/gf/source/RichSourceElementImpl.html">the RichSourceElementImpl javadoc</a>
+      for available methods on a source element).
+    </p>
+    <source><![CDATA[
+    /** Key for ${key} */
+    $torqueGf.mergepoint("constantName")("${key}")#if(${torqueGf.getSourceElement().hasFollowingSibling()}),#else;#end
+
+
+    ]]></source>
+    <p>
+      There is nothing new in the other templates: 
+    </p>
+    <p>
+      keyField.vm outputs the key field of the enum:
+    </p>
+    <source><![CDATA[
+    /** The property key. */
+    private String key;
+    ]]></source>
+    <p>
+      There are three methods; each has its own template:
+    </p>
+    <p>
+      constructor.vm renders the constructor method:
+    </p>
+    <source><![CDATA[
+    /**
+     * Constructor.
+     *
+     * @param key the key of the property. 
+     */
+    private PropertyKeys(String key)
+    {
+        this.key = key;
+    }
+    ]]></source>
+    <p>
+      getKey.vm renders the constructor method:
+    </p>
+    <source><![CDATA[
+    /**
+     * Returns the property key.
+     *
+     * @return the property key.
+     */
+    public String getKey() 
+    {
+        return key;
+    }
+    ]]></source>
+    <p>
+      and toString.vm creates the toString method:
+    </p>
+    <source><![CDATA[
+    @Override
+    public String toString()
+    {
+        return key;
+    }
+    ]]></source>
+    
+    <p>
+      You might ask yourself why we create so many templates and not use a
+      single large template (which is, of course, also possible).
+      The reason is that smaller templates can be re-used more easily, but
+      even more important, they can be re-plugged more easily. For example,
+      if you want to create an enum class without the toString() method,
+      you do not need to change a single template, but just the way they are
+      plugged together (see below).
+    </p>
+  </section>
+  
+  <section name="Creating the control file">
+    <p>
+      The control file contains information about all the files you want to
+      create. It is a XML file named "control.xml" and resides in the conf
+      directory.
+      
+      Create this file, and for each file or set of files in the output,
+      create a "output" tag in the root "control" tag. 
+      An output needs a name by which it can be identified.
+      Each output needs a filename, which can be either fixed 
+      (then you can use the "filename" attribute of the "output" tag),
+      or which is generated (in which case you would use a "filenameGenerator"
+      tag inside the "output" tag.
+    </p>
+    <p>
+      Each "output" tag needs a "source" tag which tells torque-gf which source
+      file to use. If you want to create more than one output file per "output"
+      tag, use the "elements" attribute of the "source" tag to select the
+      root elements for the different output files.
+    </p>
+    <p>
+      Also, each output tag needs a "generator" tag which contains the name
+      of the generator to invoke on the root elements. For defining generators,
+      see the next section.
+    </p>
+    <p>
+      In our example, we want to create only one file, thus we have a simple
+      control file:
+    </p>
+    <source><![CDATA[
+<?xml version="1.0" encoding="UTF-8"?>
+<control
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://db.apache.org/torque/gf/4.0/configuration http://db.apache.org/torque/gf/4.0/configuration.xsd"
+    xmlns="http://db.apache.org/torque/gf/4.0/configuration"
+    loglevel="debug">
+  <output name="propertyKeys"
+      file="org/apache/torque/gf/example/gettingstarted/PropertyKeys.java">
+    <source path="propertiesData.properties"/>
+    <generator name="classFrame"/>
+  </output>
+</control>
+    ]]></source>
+    <p>
+      The single "output" tag in this file contains the following definitions:
+      Its name is "propertyKeys",
+      the output is written to the file 
+      "org/apache/torque/gf/example/propertyenum/PropertyKeys.java",
+      the source is read from "propertiesData.properties" in the src directory,
+      and the generator named "classFrame" (defined below) will be the master
+      generator for the output. 
+    </p>
+  </section>
+    
+  <section name="Configuring the generators">
+    <p>
+      Now that we have created the templates and defined our input and output,
+      we must plug the templates into each other.
+      Torque-gf encapsulates each template in a concept named 
+      "generator". Each generator acts on a source element and produces a 
+      String output from it. Also, a generator can define so-called
+      "mergepoints" where it can call insert the output of other generators.
+      To define the generators, create one or more xml file in the 
+      "generatorDefs" subdirectory ending with the suffix ".xml". 
+      Into each file, put a root element "generators".
+    </p>
+    
+    <p>
+      You need at least one generator per template 
+      (you might have more than one if you want to fill the mergepoints
+      differently).
+      For each generator, create a "generator" tag in the "generators" root 
+      element. Set the "type" attribute to "velocity", the "path" attribute
+      with the path to the template relative to the "templates" subdirectory,
+      and give it an unique name using the "name" attribute.
+      For each mergepoint you want to fill in the generator, create 
+      a "mergepoint" tag in the "generator" tag with the "name" attribute 
+      set to the name of the mergepoint in the template.
+      Define the action you want to execute 
+      (e.g. for calling another generator, use the apply action, 
+      or for looping through several elements, use the traverse-all action).
+    </p>
+    <p>
+      In our example, we define the following generators in the file
+      "generatorDefs/enumGenerators.xml":
+    </p>
+    <source><![CDATA[
+<?xml version="1.0" encoding="UTF-8"?>
+<generators xmlns="http://db.apache.org/torque/gf/4.0/configuration"
+    xsi:schemaLocation="http://db.apache.org/torque/gf/4.0/configuration http://db.apache.org/torque/gf/4.0/generator.xsd"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <generator name="classFrame" xsi:type="velocityGenerator" path="classFrame.vm">
+    <mergepoint name="constants">
+      <action xsi:type="traverseAllAction" element="entry" generator="constant"/>
+    </mergepoint>
+    <mergepoint name="fields">
+      <action xsi:type="applyAction" generator="keyField"/>
+      <action xsi:type="applyAction" generator="newline"/>
+    </mergepoint>
+    <mergepoint name="methods">
+      <action xsi:type="applyAction" generator="constructor"/>
+      <action xsi:type="applyAction" generator="newline"/>
+      <action xsi:type="applyAction" generator="getKey"/>
+      <action xsi:type="applyAction" generator="newline"/>
+      <action xsi:type="applyAction" generator="toString"/>
+    </mergepoint>
+  </generator>
+  <generator name="constant" xsi:type="velocityGenerator" path="constant.vm">
+    <mergepoint name="constantName">
+      <action xsi:type="applyAction" generator="constantName"/>
+    </mergepoint>
+  </generator>
+  <generator name="constantName" xsi:type="javaGenerator" class="org.apache.torque.gf.generator.java.ConstantNameGenerator">
+    <inputSourceElement>.</inputSourceElement>
+    <sourceElementAttribute>key</sourceElementAttribute>
+  </generator>
+  <generator name="keyField" xsi:type="velocityGenerator" path="keyField.vm"/>
+  <generator name="constructor" xsi:type="velocityGenerator" path="constructor.vm"/>
+  <generator name="getKey" xsi:type="velocityGenerator" path="getKey.vm"/>
+  <generator name="toString" xsi:type="velocityGenerator" path="toString.vm"/>
+  <generator name="newline" xsi:type="javaGenerator" class="org.apache.torque.gf.generator.java.NewlineGenerator"/>
+</generators>    ]]></source>
+
+    <p>
+      So, e.g. in the "classFrame" generator, the three mergepoints 
+      "constants", "fields" and "methods" are filled. In the "constants"
+      mergepoint, the generator "constant" is invoked for each "entry" 
+      child element of the current source element. The output is then
+      concatenated and filled into the mergepoint. In the "fields" and
+      "methods" mergepoints, a bunch of generators is invoked on the current
+      source element ("properties"), the output is concatenated for each
+      mergepoint and inserted into the mergepoint.
+    </p>
+    <p>
+      The "constantName" and the "newline" generators are a special case.
+      The "constantName" generator generates the name of a java constant
+      from an input (e.h. converting to upper case, inserting underscores.)
+      The "newline"  generator simply prints a newline (\n) each time it is 
+      called, and is used to beautify the output.
+      Both generators are java generators which are provided by torque-gf 
+      and are referenced by their class name. The "constantName" generator
+      needs some additional configuration to know from where to read its input. 
+    </p>
+  </section>
+  
+  <section name="Generating the source">
+    <p>
+      There are currently two ways to run the generation process: Either the
+      generation can be integrated into a Maven 2 build process,
+      or a simple java program can be used.
+    </p>
+    
+    <subsection name="Using the Torque-gf Maven 2 plugin">
+      <p>
+        To hook the generation process into your Maven 2 build, you need to
+        install Maven 2.
+        If you are new to Maven 2, read
+        <a href="http://maven.apache.org/run-maven/index.html">the Maven2 documentation</a>.
+        Then, add the following section to your pom.xml:
+      </p>
+    <source><![CDATA[
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.torque</groupId>
+        <artifactId>maven-torque-gf-plugin</artifactId>
+        <version>0.2-SNAPSHOT</version>
+        <executions>
+          <execution>
+            <id>generate-sources</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>generate</goal>
+            </goals>
+            <configuration>
+              <!-- The torque-gf files are provided in a project directory -->
+              <packaging>directory</packaging>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>    
+    ]]></source>
+      <p>
+        Then, run "mvn generate-sources" in your project root dir,
+        and the generated sources should show up in the target/generated-sources
+        directory of your project.
+      </p>
+    </subsection>
+    
+    <subsection name="Using plain java">
+      <p>
+        As an alternative to maven2, you can also run the generation process
+        using plain java. For this, you can use the following small
+        program:
+      </p>
+      <source><![CDATA[
+package org.apache.torque.gf.example.gettingstarted;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.torque.gf.configuration.UnitDescriptor;
+import org.apache.torque.gf.configuration.paths.DefaultTorqueGfPaths;
+import org.apache.torque.gf.configuration.paths.Maven2DirectoryProjectPaths;
+import org.apache.torque.gf.control.Controller;
+
+public class GettingStarted
+{
+    public static void main(String argv[]) throws Exception
+    {
+        File target = new File("target");
+        FileUtils.deleteDirectory(target);
+        Controller controller = new Controller();
+        List<UnitDescriptor> unitDescriptors = new ArrayList<UnitDescriptor>();
+        unitDescriptors.add(new UnitDescriptor(
+                UnitDescriptor.Packaging.DIRECTORY,
+                new Maven2DirectoryProjectPaths(
+                        new File(".")),
+                new DefaultTorqueGfPaths()));
+        controller.run(unitDescriptors);
+    }
+}]]></source>
+      <p>
+        Add all the dependencies of torque-gf into the classpath, and
+        start this java program in the root directory of your project.
+        The generated source will show up in the target/generated-sources
+        subdirectory. 
+      </p>
+    </subsection>
+  </section>
+ </body>
+</document>
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/site/xdoc/index.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/site/xdoc/index.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/site/xdoc/index.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/site/xdoc/index.xml Tue Feb 16 17:15:43 2010
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you 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.
+-->
+
+<document>
+
+ <properties>
+  <title>Torque Generation Framework</title>
+ </properties>
+
+ <body>
+  <section name="Introduction">
+    The Torque Generation Framework is a framework for generation of code.
+    It is intended to make code generation easy and provides all necessary 
+    ingredients like reading in the sources, possibly transforming the
+    sources before generation, applying templates, writing the output files,
+    and plugging code generation into your build process. Of course, you still
+    need to write the generation templates and possibly transformators, 
+    link them together and define which templates are used for which output
+    file.   
+  </section>
+  <section name ="Features">
+    <ul>
+      <li>
+        Different input formats can be used, currently XML 
+        and property files
+      </li>
+      <li>
+        Different template languages can be used, even inside the same project
+        and for the same output file (currently velocity and java are
+        implemented)
+      </li>
+      <li>
+        The input can be transformed before applying the generation templates.        
+      </li>
+      <li>
+        Output from different templates can be inserted in pre-defined
+        mergepoints. 
+      </li>
+      <li>
+        Linkage of the template output is defined outside the templates, making
+        the templates more reusable.
+      </li>
+      <li>
+        Options can be used to fine-tune the outcome of the generation process.
+      </li>
+      <li>
+        Variables can be defined with different scopes
+        (template, template and children, output file, generation process)
+      </li>
+    </ul>
+  </section>      
+      
+ </body>
+</document>
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/site/xdoc/internals.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/site/xdoc/internals.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/site/xdoc/internals.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/site/xdoc/internals.xml Tue Feb 16 17:15:43 2010
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you 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.
+-->
+
+<document>
+
+ <properties>
+  <title>Configuration</title>
+ </properties>
+
+ <body>
+  <section name="Internals">
+    The documents in this section contains explanations how torque-gf
+    works internally. This information is not needed to just use torque-gf.
+  </section>
+
+ </body>
+</document>
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/site/xdoc/internals/generatorTypes.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/site/xdoc/internals/generatorTypes.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/site/xdoc/internals/generatorTypes.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/site/xdoc/internals/generatorTypes.xml Tue Feb 16 17:15:43 2010
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you 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.
+-->
+
+<document>
+
+ <properties>
+  <title>Generator Types</title>
+ </properties>
+
+ <body>
+  <section name="Introduction">
+    The Torque generator can handle different generator types, 
+    currently velocity and java generators.
+    The Velocity generators use templates to produce the output, 
+    the java generators create their output directly in java.
+  </section>
+  
+  <section name="Configuration">
+    As the different generator types need different configurations, a
+    custom configuration parser is needed for each generator type. 
+    (The generator type is determined by the "type" attribute of the
+    generator and filenameGenerator elements in the project configuration).
+    The Torque generator needs to be told which parser it should use for which 
+    generator type. This is done by registering a generatorHandlerFactory
+    for each generator type, see 
+    <code>ControllerState.registerGeneratorHandlerFactory(GeneratorSaxHandlerFactory)</code>.
+    This could in principle be used to plug in new generator types,
+    but alas, the plug-in process it is not yet configurable :-(.
+  </section>
+  
+ </body>
+</document>
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/configuration/package.html
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/configuration/package.html?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/configuration/package.html (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/configuration/package.html Tue Feb 16 17:15:43 2010
@@ -0,0 +1,24 @@
+<!--
+ Copyright 2001-2006 The Apache Software Foundation.
+
+ 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.
+-->
+
+<h2>Test configuration for the ReadConfigurationTest</h2>
+
+<p>
+  This directory and its subdirectories contain a test configuration
+  which is used by the ReadConfigurationTest to check whether
+  configuration files  can be  read from files and are interpreted correctly.
+</p>
+ 
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf-parent/conf/control.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf-parent/conf/control.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf-parent/conf/control.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf-parent/conf/control.xml Tue Feb 16 17:15:43 2010
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you 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.
+-->
+
+<control xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://db.apache.org/torque/gf/4.0/configuration http://db.apache.org/torque/gf/4.0/configuration.xsd"
+    xmlns="http://db.apache.org/torque/gf/4.0/configuration"
+    loglevel="warn">
+
+  <options path="parent-options.properties" xsi:type="propertiesOptions"/>
+  <output name="parentOutput">
+    <filenameGenerator xsi:type="javaGenerator" 
+        class="org.apache.torque.gf.java.JavaGenerator">
+      <foo>ParentFoo</foo>
+      <bar>ParentBar</bar>
+    </filenameGenerator>
+    <source element="sourceElement" path="parentSource" type="xml"/>
+    <generator name="org.apache.torque.gf.test.readConfiguration.testParentGenerator"/>
+  </output>
+  <output name="secondOutput">
+    <filenameGenerator xsi:type="velocityGenerator" path="testTemplate.vm"/>
+    <source path="parentSource" type="properties"/>
+    <generator name="org.apache.torque.gf.test.readConfiguration.parentGenerator"/>
+  </output>
+</control>
+  
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf-parent/conf/parent-options.properties
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf-parent/conf/parent-options.properties?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf-parent/conf/parent-options.properties (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf-parent/conf/parent-options.properties Tue Feb 16 17:15:43 2010
@@ -0,0 +1,26 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+
+#option without namespace, will be overwritten in child
+optionWithoutNamespace = optionWithoutNamespaceParentValue
+#option without namespace, will not be overwritten in child
+parentOptionWithoutNamespace = parentOptionWithoutNamespaceParentValue
+
+#option with namespace, will be overwritten in child
+org.apache.torque.gf.optionWithNamespace = optionWithNamespaceParentValue
+#option with namespace, will not be overwritten in child
+org.apache.torque.gf.parentOptionWithNamespace = parentOptionWithNamespaceParentValue

Added: db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf-parent/generatorDefs/testGenerator.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf-parent/generatorDefs/testGenerator.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf-parent/generatorDefs/testGenerator.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf-parent/generatorDefs/testGenerator.xml Tue Feb 16 17:15:43 2010
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you 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.
+-->
+
+<generators xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://db.apache.org/torque/gf/4.0/configuration http://db.apache.org/torque/gf/4.0/generator.xsd"
+    xmlns="http://db.apache.org/torque/gf/4.0/configuration">
+
+  <generator name="org.apache.torque.gf.test.readConfiguration.javaGenerator"
+      xsi:type="javaGenerator" 
+      class="org.apache.torque.gf.java.JavaGenerator">
+    <mergepoint name="properties">
+      <action xsi:type="traverseAllAction" element="entry" 
+          generator="org.apache.torque.gf.velocity.PropertyCopy"/>
+    </mergepoint>
+    <mergepoint name="mergepointFromParent">
+      <action xsi:type="traverseAllAction" element="xy" 
+          generator="someParentGenerator"/>
+    </mergepoint>
+    <foo>ParentFoo2</foo>
+    <bar>ParentBar2</bar>
+  </generator>
+  <generator name="org.apache.torque.gf.test.readConfiguration.parentGenerator"
+      xsi:type="velocityGenerator" 
+      path="testTemplate.vm"/>
+</generators>
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf-parent/src/parentSource
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf-parent/src/parentSource?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf-parent/src/parentSource (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf-parent/src/parentSource Tue Feb 16 17:15:43 2010
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.

Added: db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf-parent/templates/testTemplate.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf-parent/templates/testTemplate.vm?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf-parent/templates/testTemplate.vm (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf-parent/templates/testTemplate.vm Tue Feb 16 17:15:43 2010
@@ -0,0 +1,18 @@
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements.  See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership.  The ASF licenses this file
+## to you 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.
+##
+parent test template output
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf/conf/control.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf/conf/control.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf/conf/control.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf/conf/control.xml Tue Feb 16 17:15:43 2010
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you 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.
+-->
+
+<control
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://db.apache.org/torque/gf/4.0/configuration http://db.apache.org/torque/gf/4.0/configuration.xsd"
+    xmlns="http://db.apache.org/torque/gf/4.0/configuration"
+    loglevel="debug">
+  <options path="options.properties" xsi:type="propertiesOptions"/> 
+  <options path="options.xml" xsi:type="xmlOptions"/>
+  <output name="org.apache.torque.gf.firstOutput" skipIfExists="true">
+    <filenameGenerator xsi:type="javaGenerator" class="org.apache.torque.gf.java.JavaGenerator">
+      <foo>Foo</foo>
+      <bar>Bar</bar>
+    </filenameGenerator>
+    <source path="source" type="xml"/>
+    <generator name="org.apache.torque.gf.test.readConfiguration.javaGenerator"/>
+  </output>
+  <output name="secondOutput">
+    <filenameGenerator xsi:type="velocityGenerator" path="testTemplate.vm"/>
+    <source elements="properties/entry" path="secondSourcePath" type="properties"/>
+    <generator name="org.apache.torque.gf.test.readConfiguration.anotherGenerator"/>
+  </output>
+  <output name="thirdOutput" file="outputFileName">
+    <source path="third.source.path.properties"/>
+    <generator name="org.apache.torque.gf.test.readConfiguration.thirdGenerator"/>
+  </output>
+</control>
+  
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf/conf/options.properties
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf/conf/options.properties?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf/conf/options.properties (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf/conf/options.properties Tue Feb 16 17:15:43 2010
@@ -0,0 +1,26 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+
+#option without namespace
+optionWithoutNamespace = optionWithoutNamespaceValue
+#option with namespace
+org.apache.torque.gf.optionWithNamespace = optionWithNamespaceValue
+
+org.apache.optionWithNamespace = org.apache.optionWithNamespaceValue
+
+#options to test option precedences
+optionPrecedenceLastFile = value from properties

Added: db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf/conf/options.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf/conf/options.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf/conf/options.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf/conf/options.xml Tue Feb 16 17:15:43 2010
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you 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.
+-->
+
+<properties>
+  <entry key="optionPrecedenceLastFile">value from xml</entry>
+</properties>

Added: db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf/generatorDefs/testGenerator.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf/generatorDefs/testGenerator.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf/generatorDefs/testGenerator.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf/generatorDefs/testGenerator.xml Tue Feb 16 17:15:43 2010
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you 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.
+-->
+
+<torqueGfConf:generators xmlns="http://db.apache.org/torque/gf/4.0/configuration"
+    xmlns:torqueGfConf="http://db.apache.org/torque/gf/4.0/configuration"
+    xsi:schemaLocation="http://db.apache.org/torque/gf/4.0/configuration http://db.apache.org/torque/gf/4.0/generator.xsd"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <generator name="org.apache.torque.gf.test.readConfiguration.javaGenerator"
+      xsi:type="javaGenerator" 
+      class="org.apache.torque.gf.java.JavaGenerator">
+    <input elementName="inputElement"/>
+    <mergepoint name="properties">
+      <action xsi:type="traverseAllAction"
+          element="entry" 
+          generator="org.apache.torque.gf.velocity.propertyCopy"/>
+    </mergepoint>
+    <foo>Foo2</foo>
+    <bar>Bar2</bar>
+  </generator>
+  <torqueGfConf:generator name="org.apache.torque.gf.test.readConfiguration.anotherGenerator"
+      xsi:type="velocityGenerator" 
+      path="testTemplate.vm"
+      sourceAttributesInContext="false"
+      optionsInContext="false"
+      variablesInContext="false"/>
+  <mergepoint name="org.apache.torque.gf.test.readConfiguration.javaGenerator.mergepointName">
+      <action xsi:type="applyAction"
+           generator="someGeneratorAction"
+           acceptNotSet="false"/>
+  </mergepoint>
+  <mergepoint name="org.apache.torque.gf.test.readConfiguration.javaGenerator.mergepointFromParent">
+      <action xsi:type="applyAction"
+           generator="newGeneratorAction"/>
+  </mergepoint>
+</torqueGfConf:generators>
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf/src/source
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf/src/source?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf/src/source (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf/src/source Tue Feb 16 17:15:43 2010
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.

Added: db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf/templates/testTemplate.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf/templates/testTemplate.vm?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf/templates/testTemplate.vm (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/configuration/src/main/torque-gf/templates/testTemplate.vm Tue Feb 16 17:15:43 2010
@@ -0,0 +1,18 @@
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements.  See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership.  The ASF licenses this file
+## to you 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.
+##
+test template output
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/deeplyNestedMergepoints/package.html
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/deeplyNestedMergepoints/package.html?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/deeplyNestedMergepoints/package.html (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/deeplyNestedMergepoints/package.html Tue Feb 16 17:15:43 2010
@@ -0,0 +1,25 @@
+<!--
+ Copyright 2001-2006 The Apache Software Foundation.
+
+ 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.
+-->
+
+<h2>Test configuration for the DeeplyNestedMergepointTest</h2>
+
+<p>
+  This directory and its subdirectories contain a test configuration
+  which is used by the DeeplyNestedMergepointsTest to check whether
+  we can cope with mergepoints which invoke mergepoints which invoke
+  mergepoints and so on.
+</p>
+ 
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/deeplyNestedMergepoints/src/main/torque-gf/conf/control.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/deeplyNestedMergepoints/src/main/torque-gf/conf/control.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/deeplyNestedMergepoints/src/main/torque-gf/conf/control.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/deeplyNestedMergepoints/src/main/torque-gf/conf/control.xml Tue Feb 16 17:15:43 2010
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you 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.
+-->
+
+<control loglevel="debug"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://db.apache.org/torque/gf/4.0/configuration http://db.apache.org/torque/gf/4.0/configuration.xsd"
+    xmlns="http://db.apache.org/torque/gf/4.0/configuration">
+  <output name="output" file="output.txt">
+    <source element="sourceElement" path="source.xml" type="xml"/>
+    <generator name="nestingGenerator0"/>
+  </output>
+</control>
+  
\ No newline at end of file



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message