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 [17/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/test/java/org/apache/torque/gf/template/velocity/VelocityTemplateFilterTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/gf/template/velocity/VelocityTemplateFilterTest.java?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/gf/template/velocity/VelocityTemplateFilterTest.java (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/gf/template/velocity/VelocityTemplateFilterTest.java Tue Feb 16 17:15:43 2010
@@ -0,0 +1,160 @@
+package org.apache.torque.gf.template.velocity;
+
+/*
+ * 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.
+ */
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class VelocityTemplateFilterTest
+{
+    VelocityTemplateFilter velocityTemplateFilter;
+
+    @Before
+    public void setUp()
+    {
+        velocityTemplateFilter = new VelocityTemplateFilter();
+    }
+
+    @Test
+    public void testEmptyInput() throws IOException
+    {
+        assertFilteredEquals("", "");
+    }
+
+    @Test
+    public void testEmptyLines() throws IOException
+    {
+        assertFilteredEquals("\n", "\n");
+        assertFilteredEquals("\r\n", "\r\n");
+    }
+
+    @Test
+    public void testCommentWithoutSpaces() throws IOException
+    {
+        assertFilteredEquals("#Comment", "#Comment");
+        assertFilteredEquals("#Comment\n", "#Comment\n");
+        assertFilteredEquals("#Comment\r\n", "#Comment\r\n");
+    }
+
+    @Test
+    public void testCommentWithSpaces() throws IOException
+    {
+        assertFilteredEquals("# Com ment", "# Com ment");
+        assertFilteredEquals("# Com ment\n", "# Com ment\n");
+        assertFilteredEquals("# Com ment\r\n", "# Com ment\r\n");
+    }
+
+    @Test
+    public void testWhitespaceLine() throws IOException
+    {
+        assertFilteredEquals("        ", "    \t");
+        assertFilteredEquals("        \n", "    \t\n");
+        assertFilteredEquals("        \r\n", "    \t\r\n");
+    }
+
+    @Test
+    public void testLineStartingWithWhitespaceNoComment() throws IOException
+    {
+        assertFilteredEquals("     ab    cd", "\t ab\tcd");
+        assertFilteredEquals("     ab    cd\n", "\t ab\tcd\n");
+        assertFilteredEquals("      ab    cd\r\n", "\t ab\tcd\r\n");
+    }
+
+    @Test
+    public void testLineStartingWithWhitespaceComment() throws IOException
+    {
+        assertFilteredEquals("# ab    cd", "\t # ab\tcd");
+        assertFilteredEquals("# ab    cd\n", "\t # ab\tcd\n");
+        assertFilteredEquals("# ab    cd\r\n", "\t # ab\tcd\r\n");
+    }
+
+    @Test
+    public void testCommentAfterWhitespaceLineSpaces() throws IOException
+    {
+        assertFilteredEquals(" \n#Comment", " \n #Comment");
+        assertFilteredEquals(" \n#Comment\n", " \n #Comment\n");
+        assertFilteredEquals(" \n#Comment\r\n", " \n #Comment\r\n");
+    }
+
+    /**
+     * Filters the input <code>input</code> and checks whether the output
+     * of the filter is equal to <code>expected</code>.
+     *
+     * @param expected The expected outcome.
+     * @param input the input for the filter.
+     *
+     * @throws IOException If an IOException occurs during Streaming.
+     */
+    private void assertFilteredEquals(String expected, String input)
+            throws IOException
+    {
+        InputStream inputStream = velocityTemplateFilter.filter(
+                new ByteArrayInputStream(expected.getBytes("ISO-8859-1")),
+                "ISO-8859-1");
+        String result = readAndCloseStream(inputStream, "ISO-8859-1");
+        assertEquals(expected, result);
+    }
+
+    /**
+     * Reads the content of a Stream into a String.
+     *
+     * @param stream the stream to read, not null.
+     * @param encoding The encoding to use.
+     *
+     * @return the Stream as String.
+     *
+     * @throws IOException If an IO Error occurs during reading.
+     */
+    private String readAndCloseStream(InputStream stream, String encoding)
+            throws IOException
+    {
+        Reader reader;
+        if (encoding == null)
+        {
+            reader = new InputStreamReader(stream);
+        }
+        else
+        {
+            reader = new InputStreamReader(stream, encoding);
+        }
+
+        StringBuffer contentBuffer = new StringBuffer();
+        while(true)
+        {
+            char[] charBuffer = new char[8192];
+            int filledChars = reader.read(charBuffer);
+            if (filledChars == -1)
+            {
+                break;
+            }
+            contentBuffer.append(charBuffer, 0, filledChars);
+        }
+        stream.close();
+        return contentBuffer.toString();
+    }
+}

Added: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/gf/variable/VariableStoreTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/gf/variable/VariableStoreTest.java?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/gf/variable/VariableStoreTest.java (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/gf/variable/VariableStoreTest.java Tue Feb 16 17:15:43 2010
@@ -0,0 +1,323 @@
+package org.apache.torque.gf.variable;
+
+/*
+ * 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.
+ */
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import org.apache.torque.gf.BaseTest;
+import org.apache.torque.gf.qname.QualifiedName;
+import org.apache.torque.gf.qname.QualifiedNameMap;
+import org.junit.Test;
+
+public class VariableStoreTest extends BaseTest
+{
+    @Test
+    public void testVariableScopePrecedence()
+    {
+        VariableStore store = new VariableStore();
+        store.startGenerator();
+        QualifiedName qualifiedName
+            = new QualifiedName("org.apache.torque.name");
+
+        // fill store
+        store.set(new Variable(
+                qualifiedName,
+                "org.apache.torque.GENERATOR",
+                Variable.Scope.GENERATOR));
+        store.set(new Variable(
+                qualifiedName,
+                "org.apache.torque.CHILDREN1",
+                Variable.Scope.CHILDREN));
+        store.startGenerator();
+        store.set(new Variable(
+                qualifiedName,
+                "org.apache.torque.CHILDREN2",
+                Variable.Scope.CHILDREN));
+        store.set(new Variable(
+                qualifiedName,
+                "org.apache.torque.FILE",
+                Variable.Scope.FILE));
+        store.set(new Variable(
+                qualifiedName,
+                "org.apache.torque.GLOBAL",
+                Variable.Scope.GLOBAL));
+
+        assertEquals(
+                "org.apache.torque.GENERATOR",
+                store.getInHierarchy(qualifiedName).getValue());
+        assertEquals(
+                "org.apache.torque.GENERATOR",
+                store.getContent().get(qualifiedName).getValue());
+
+        store.remove(store.getInHierarchy(qualifiedName));
+
+        assertEquals(
+                "org.apache.torque.CHILDREN2",
+                store.getInHierarchy(qualifiedName).getValue());
+        assertEquals(
+                "org.apache.torque.CHILDREN2",
+                store.getContent().get(qualifiedName).getValue());
+
+        store.endGenerator();
+
+        assertEquals(
+                "org.apache.torque.CHILDREN1",
+                store.getInHierarchy(qualifiedName).getValue());
+        assertEquals(
+                "org.apache.torque.CHILDREN1",
+                store.getContent().get(qualifiedName).getValue());
+
+        store.endGenerator();
+
+        assertEquals(
+                "org.apache.torque.FILE",
+                store.getInHierarchy(qualifiedName).getValue());
+        assertEquals(
+                "org.apache.torque.FILE",
+                store.getContent().get(qualifiedName).getValue());
+
+        store.endFile();
+
+        assertEquals(
+                "org.apache.torque.GLOBAL",
+                store.getInHierarchy(qualifiedName).getValue());
+        assertEquals(
+                "org.apache.torque.GLOBAL",
+                store.getContent().get(qualifiedName).getValue());
+
+        store.endGeneration();
+
+        assertNull(store.getInHierarchy(qualifiedName));
+        assertNull(store.getContent().get(qualifiedName));
+    }
+
+    public void testNamespaceVisibility()
+    {
+        VariableStore store = new VariableStore();
+        store.set(new Variable(
+                new QualifiedName("org.apache.torque.name"),
+                "org.apache.torque.GENERATOR",
+                Variable.Scope.GENERATOR));
+        store.set(new Variable(
+                new QualifiedName("org.apache.name"),
+                "org.apache.FILE",
+                Variable.Scope.FILE));
+        QualifiedName qualifiedName
+            = new QualifiedName("org.apache.torque.name");
+        assertEquals(
+                "org.apache.torque.GENERATOR",
+                store.getInHierarchy(qualifiedName).getValue());
+
+        store.clear();
+        store.set(new Variable(
+                new QualifiedName("org.apache.name"),
+                "org.apache.GENERATOR",
+                Variable.Scope.GENERATOR));
+        store.set(new Variable(
+                new QualifiedName("org.apache.torque.name"),
+                "org.apache.torque.FILE",
+                Variable.Scope.FILE));
+        assertEquals(
+                "org.apache.torque.FILE",
+                store.getInHierarchy(qualifiedName).getValue());
+
+    }
+
+    public void testGetInHierarchy()
+    {
+        VariableStore store = new VariableStore();
+        store.set(new Variable(
+                new QualifiedName("org.apache.torque.name"),
+                "org.apache.torque",
+                Variable.Scope.GENERATOR));
+        QualifiedName qualifiedName
+            = new QualifiedName("org.apache.torque.name");
+        assertEquals(
+                "org.apache.torque",
+                store.getInHierarchy(qualifiedName).getValue());
+        qualifiedName
+            = new QualifiedName("org.apache.torque.generator.name");
+        assertEquals(
+                "org.apache.torque",
+                store.getInHierarchy(qualifiedName).getValue());
+        qualifiedName
+            = new QualifiedName("org.apache.name");
+        assertNull(store.getInHierarchy(qualifiedName));
+    }
+
+    public void testGetContents()
+    {
+        VariableStore store = new VariableStore();
+        store.startGenerator();
+        store.set(new Variable(
+                new QualifiedName("org.apache.torque.generator"),
+                "org.apache.torque.generator",
+                Variable.Scope.GENERATOR));
+        store.set(new Variable(
+                new QualifiedName("org.apache.torque.children1"),
+                "org.apache.torque.children1",
+                Variable.Scope.CHILDREN));
+        store.startGenerator();
+        store.set(new Variable(
+                new QualifiedName("org.apache.torque.children2"),
+                "org.apache.torque.children2",
+                Variable.Scope.CHILDREN));
+        store.set(new Variable(
+                new QualifiedName("org.apache.torque.file"),
+                "org.apache.torque.file",
+                Variable.Scope.FILE));
+        store.set(new Variable(
+                new QualifiedName("org.apache.torque.global"),
+                "org.apache.torque.global",
+                Variable.Scope.GLOBAL));
+
+        QualifiedNameMap<Variable> storeContent = store.getContent();
+        assertEquals("storeContent should contain 5 entries",
+                5,
+                storeContent.size());
+
+        {
+            Variable variable
+                    = storeContent.get(
+                        new QualifiedName("org.apache.torque.generator"));
+            assertEquals(
+                    "org.apache.torque.generator",
+                    variable.getValue());
+        }
+        {
+            Variable variable
+                    = storeContent.get(
+                        new QualifiedName("org.apache.torque.children1"));
+            assertEquals(
+                    "org.apache.torque.children1",
+                    variable.getValue());
+        }
+        {
+            Variable variable
+                    = storeContent.get(
+                        new QualifiedName("org.apache.torque.children2"));
+            assertEquals(
+                    "org.apache.torque.children2",
+                    variable.getValue());
+        }
+        {
+            Variable variable
+                    = storeContent.get(
+                        new QualifiedName("org.apache.torque.file"));
+            assertEquals(
+                    "org.apache.torque.file",
+                    variable.getValue());
+        }
+        {
+            Variable variable
+                    = storeContent.get(
+                        new QualifiedName("org.apache.torque.global"));
+            assertEquals(
+                    "org.apache.torque.global",
+                    variable.getValue());
+        }
+    }
+
+    public void testRemove()
+    {
+        VariableStore store = new VariableStore();
+        store.startGenerator();
+        QualifiedName qualifiedName
+            = new QualifiedName("org.apache.torque.name");
+
+        // fill store
+        store.set(new Variable(
+                qualifiedName,
+                "org.apache.torque.GENERATOR",
+                Variable.Scope.GENERATOR));
+        store.set(new Variable(
+                qualifiedName,
+                "org.apache.torque.CHILDREN",
+                Variable.Scope.CHILDREN));
+        store.set(new Variable(
+                qualifiedName,
+                "org.apache.torque.FILE",
+                Variable.Scope.FILE));
+        store.set(new Variable(
+                qualifiedName,
+                "org.apache.torque.GLOBAL",
+                Variable.Scope.GLOBAL));
+
+        assertEquals(
+                "org.apache.torque.GENERATOR",
+                store.getInHierarchy(qualifiedName).getValue());
+
+        store.remove(store.getInHierarchy(qualifiedName));
+
+        assertEquals(
+                "org.apache.torque.CHILDREN",
+                store.getInHierarchy(qualifiedName).getValue());
+
+        store.remove(store.getInHierarchy(qualifiedName));
+
+        assertEquals(
+                "org.apache.torque.FILE",
+                store.getInHierarchy(qualifiedName).getValue());
+
+        store.remove(store.getInHierarchy(qualifiedName));
+
+        assertEquals(
+                "org.apache.torque.GLOBAL",
+                store.getInHierarchy(qualifiedName).getValue());
+
+        store.remove(store.getInHierarchy(qualifiedName));
+
+        assertNull(store.getInHierarchy(qualifiedName));
+
+        // test whether we can remove hidden variables
+        Variable childrenVariable = new Variable(
+                qualifiedName,
+                "org.apache.torque.CHILDREN",
+                Variable.Scope.CHILDREN);
+
+        store.set(new Variable(
+                qualifiedName,
+                "org.apache.torque.GENERATOR",
+                Variable.Scope.GENERATOR));
+        store.set(childrenVariable);
+        store.set(new Variable(
+                qualifiedName,
+                "org.apache.torque.FILE",
+                Variable.Scope.FILE));
+
+        assertEquals(
+                "org.apache.torque.GENERATOR",
+                store.getInHierarchy(qualifiedName).getValue());
+
+        store.remove(childrenVariable);
+
+        assertEquals(
+                "org.apache.torque.GENERATOR",
+                store.getInHierarchy(qualifiedName).getValue());
+
+        store.remove(store.getInHierarchy(qualifiedName));
+
+        assertEquals(
+                "org.apache.torque.FILE",
+                store.getInHierarchy(qualifiedName).getValue());
+
+    }
+}

Added: db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/gf/variable/VariableTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/gf/variable/VariableTest.java?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/gf/variable/VariableTest.java (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/java/org/apache/torque/gf/variable/VariableTest.java Tue Feb 16 17:15:43 2010
@@ -0,0 +1,83 @@
+package org.apache.torque.gf.variable;
+
+/*
+ * 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.
+ */
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
+
+import org.apache.torque.gf.BaseTest;
+import org.apache.torque.gf.qname.Namespace;
+import org.apache.torque.gf.qname.QualifiedName;
+import org.junit.Test;
+
+/**
+ * Unit test for the Variable Class.
+ */
+public class VariableTest extends BaseTest
+{
+    /**
+     * Tests the constructor.
+     */
+    @Test
+    public void testConstructor()
+    {
+        Variable variable = new Variable(
+                new QualifiedName("generator", "org.apache.torque"),
+                "value",
+                Variable.Scope.FILE);
+        assertEquals(
+                new Namespace("org.apache.torque"),
+                variable.getName().getNamespace());
+        assertEquals("generator",variable.getName().getName());
+        assertEquals("value", variable.getValue());
+        assertEquals(Variable.Scope.FILE, variable.getScope());
+
+        try
+        {
+            variable = new Variable(
+                    null,
+                    "value",
+                    Variable.Scope.CHILDREN);
+            fail("NullPointerException expected");
+        }
+        catch (NullPointerException e)
+        {
+        }
+
+        try
+        {
+            variable = new Variable(
+                    new QualifiedName("org.apache.torque","generator"),
+                    new Object(),
+                    null);
+            fail("NullPointerException expected");
+        }
+        catch (NullPointerException e)
+        {
+        }
+
+        variable = new Variable(
+                new QualifiedName("org.apache.torque","generator"),
+                null,
+                Variable.Scope.GLOBAL);
+        assertNull(variable.getValue());
+    }
+}

Added: db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/conf/control.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/conf/control.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/conf/control.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/conf/control.xml Tue Feb 16 17:15:43 2010
@@ -0,0 +1,58 @@
+<?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"/> 
+  <output name="propertiesClass">
+    <filenameGenerator xsi:type="javaGenerator" 
+        class="org.apache.torque.gf.generator.java.JavaFilenameGenerator">
+      <mergepoint name="classname">
+        <action xsi:type="optionAction" option="propertiesClassName" />
+      </mergepoint>
+      <mergepoint name="package">
+        <action xsi:type="optionAction" option="package" />
+       </mergepoint>
+    </filenameGenerator>
+    <source element="properties" path="propertiesData.properties"/>
+    <generator name="org.apache.torque.gf.velocity.propertiesToJava" />
+  </output>
+  <output name="extendingClass">
+    <filenameGenerator xsi:type="javaGenerator" 
+        class="org.apache.torque.gf.generator.java.JavaFilenameGenerator">
+      <mergepoint name="classname">
+        <action xsi:type="optionAction" option="extendingClassName" />
+      </mergepoint>
+      <mergepoint name="package">
+        <action xsi:type="optionAction" option="package" />
+       </mergepoint>
+    </filenameGenerator>
+    <source element="properties" path="propertiesData.properties"/>
+    <generator name="org.apache.torque.gf.velocity.propertiesExtendedToJava" />
+  </output>
+  <output name="properties" file="Properties.properties">
+    <source element="properties" path="propertiesData.properties"/>
+    <generator name="org.apache.torque.gf.velocity.propertiesCopy"/>
+  </output>
+</control>
+  
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/conf/options.properties
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/conf/options.properties?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/conf/options.properties (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/conf/options.properties Tue Feb 16 17:15:43 2010
@@ -0,0 +1,23 @@
+# 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
+# both for the generator and the filenameGenerator 
+package = org.apache.torque.gf.properties
+#option with namespace
+org.apache.torque.gf.velocity.propertiesClassName = VelocityProperties
+org.apache.torque.gf.velocity.extendingClassName = VelocityExtendedProperties
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/generatorDefs/javaTestGenerator.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/generatorDefs/javaTestGenerator.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/generatorDefs/javaTestGenerator.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/generatorDefs/javaTestGenerator.xml Tue Feb 16 17:15:43 2010
@@ -0,0 +1,38 @@
+<?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="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.java.testGenerator" 
+      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>
+    <foo>Foo</foo>
+    <bar>Bar</bar>
+  </generator>
+  <generator name="org.apache.torque.gf.velocity.propertyCopy"
+      xsi:type="velocityGenerator" 
+      path="propertyCopy.vm"/>
+</generators>
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/generatorDefs/velocityExtendedPropertiesGenerator.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/generatorDefs/velocityExtendedPropertiesGenerator.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/generatorDefs/velocityExtendedPropertiesGenerator.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/generatorDefs/velocityExtendedPropertiesGenerator.xml Tue Feb 16 17:15:43 2010
@@ -0,0 +1,31 @@
+<?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="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.velocity.propertiesExtendedToJava"
+       xsi:type="velocityGenerator" 
+       path="propertiesExtendedToJava.vm"
+       optionsInContext="true"
+       sourceAttributesInContext="true">
+    <input elementName="properties"/>
+  </generator>
+</generators>
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/generatorDefs/velocityPropertiesCopy.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/generatorDefs/velocityPropertiesCopy.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/generatorDefs/velocityPropertiesCopy.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/generatorDefs/velocityPropertiesCopy.xml Tue Feb 16 17:15:43 2010
@@ -0,0 +1,35 @@
+<?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="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.velocity.propertiesCopy"
+      xsi:type="velocityGenerator" 
+      path="propertiesCopy.vm">
+    <mergepoint name="properties">
+      <action xsi:type="traverseAllAction" element="entry" 
+          generator="org.apache.torque.gf.velocity.propertyCopy"/>
+    </mergepoint>
+  </generator>
+  <generator name="org.apache.torque.gf.velocity.propertyCopy"
+      xsi:type="velocityGenerator" 
+      path="propertyCopy.vm"/>
+</generators>
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/generatorDefs/velocityPropertiesGenerator.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/generatorDefs/velocityPropertiesGenerator.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/generatorDefs/velocityPropertiesGenerator.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/generatorDefs/velocityPropertiesGenerator.xml Tue Feb 16 17:15:43 2010
@@ -0,0 +1,39 @@
+<?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="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.velocity.propertiesToJava"
+       xsi:type="velocityGenerator" 
+       path="propertiesToJava.vm"
+       optionsInContext="true"
+       sourceAttributesInContext="true">
+    <input elementName="properties"/>
+    <mergepoint name="variableDefinitions">
+      <action xsi:type="traverseAllAction" element="entry" 
+          generator="org.apache.torque.gf.velocity.variableDefinition"/>
+    </mergepoint>
+    <mergepoint name="variableAssignments">
+      <action xsi:type="traverseAllAction" element="entry" 
+          generator="org.apache.torque.gf.velocity.variableAssignment"/>
+    </mergepoint>
+  </generator>
+</generators>
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/generatorDefs/velocityVariableAssignment.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/generatorDefs/velocityVariableAssignment.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/generatorDefs/velocityVariableAssignment.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/generatorDefs/velocityVariableAssignment.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.
+-->
+
+<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="org.apache.torque.gf.velocity.variableAssignment"
+      xsi:type="velocityGenerator"
+      path="variableAssignment.vm">
+    <input elementName="entry"/>
+  </generator>
+</generators>
+  
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/generatorDefs/velocityVariableDefinition.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/generatorDefs/velocityVariableDefinition.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/generatorDefs/velocityVariableDefinition.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/generatorDefs/velocityVariableDefinition.xml Tue Feb 16 17:15:43 2010
@@ -0,0 +1,29 @@
+<?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="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.velocity.variableDefinition"
+       xsi:type="velocityGenerator"
+       path="variableDefinition.vm">
+    <input elementName="entry"/>
+  </generator>
+</generators>
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/src/propertiesData.properties
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/src/propertiesData.properties?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/src/propertiesData.properties (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/src/propertiesData.properties Tue Feb 16 17:15:43 2010
@@ -0,0 +1,19 @@
+# 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.
+#
+propertyName1 = propertyValue1
+propertyName2 = propertyValue2

Added: db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/src/propertiesData.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/src/propertiesData.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/src/propertiesData.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/src/propertiesData.xml Tue Feb 16 17:15:43 2010
@@ -0,0 +1,24 @@
+<?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.
+-->
+
+<properties>
+  <entry key="propertyName1">propertyValue1</entry>
+  <entry key="propertyName2">propertyValue2</entry>
+</properties>

Added: db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/properties.xsl
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/properties.xsl?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/properties.xsl (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/properties.xsl Tue Feb 16 17:15:43 2010
@@ -0,0 +1,27 @@
+<?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.
+-->
+
+<xsl:template match="properties">
+  <xsl:text>public class Properties {
+</xsl:text>
+  <xalan:extension name="constants"/>
+  <xsl:text>}
+</xsl:text>
+</xsl:template>"
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/propertiesCopy.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/propertiesCopy.vm?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/propertiesCopy.vm (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/propertiesCopy.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.
+##
+$torqueGf.mergepoint("properties")
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/propertiesExtendedToJava.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/propertiesExtendedToJava.vm?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/propertiesExtendedToJava.vm (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/propertiesExtendedToJava.vm Tue Feb 16 17:15:43 2010
@@ -0,0 +1,23 @@
+## 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.
+##
+package $torqueGf.option("package");
+
+public class $torqueGf.option("extendingClassName") 
+    extends $torqueGf.option("propertiesClassName")
+{
+}
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/propertiesToJava.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/propertiesToJava.vm?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/propertiesToJava.vm (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/propertiesToJava.vm Tue Feb 16 17:15:43 2010
@@ -0,0 +1,28 @@
+## 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.
+##
+package $torqueGf.option("package");
+
+public class $torqueGf.option("propertiesClassName")
+{
+$torqueGf.mergepoint("variableDefinitions")
+
+    static
+    {
+$torqueGf.mergepoint("variableAssignments")
+    }
+}
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/property.xsl
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/property.xsl?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/property.xsl (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/property.xsl Tue Feb 16 17:15:43 2010
@@ -0,0 +1,28 @@
+<?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.
+-->
+
+<xsl:template match="property">
+  <xsl:text>public static final String </xsl:text>
+  <xsl:value-of select="name"/>
+  <xsl:text> = </xsl:text>
+  <xsl:value-of select="value"/>
+  <xsl:text>;
+</xsl:text>
+</xsl:template>
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/propertyCopy.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/propertyCopy.vm?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/propertyCopy.vm (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/propertyCopy.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.
+##
+$key = ${value}

Added: db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/variableAssignment.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/variableAssignment.vm?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/variableAssignment.vm (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/variableAssignment.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.
+##
+        $key = "$value";

Added: db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/variableDefinition.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/variableDefinition.vm?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/variableDefinition.vm (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/propertyToJava/src/main/torque-gf/templates/variableDefinition.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.
+##
+    public static final String $key;

Added: db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/example/gettingstarted/PropertyKeys.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/example/gettingstarted/PropertyKeys.java?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/example/gettingstarted/PropertyKeys.java (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/example/gettingstarted/PropertyKeys.java Tue Feb 16 17:15:43 2010
@@ -0,0 +1,61 @@
+package org.apache.torque.gf.example.gettingstarted;
+
+/*
+ * 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.
+ */
+
+/**
+ * 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;
+    }
+}

Added: db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/source/properties/propertiesParserTest.properties
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/source/properties/propertiesParserTest.properties?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/source/properties/propertiesParserTest.properties (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/source/properties/propertiesParserTest.properties Tue Feb 16 17:15:43 2010
@@ -0,0 +1,19 @@
+# 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.
+
+propertyName1 = propertyValue1
+  propertyName2 = propertyValue2

Added: db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/source/xml/source.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/source/xml/source.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/source/xml/source.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/source/xml/source.xml Tue Feb 16 17:15:43 2010
@@ -0,0 +1,28 @@
+<?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.
+-->
+
+<root rootElementAttribute="rootElementAttributeValue">
+  <secondLevelElement1>
+    <thirdLevelElement1 tla="tlaValue"/>
+  </secondLevelElement1>
+  <secondLevelElement2/>
+  <secondLevelElement3 sla="slaValue"> text For<thirdLevelElement2 tla2="tla2Value"/> Second Level Element 3 </secondLevelElement3>
+  <secondLevelElement4>  text For Second Level Element 4  </secondLevelElement4>
+</root>

Added: db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/source/xml/sourceToXmlResult.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/source/xml/sourceToXmlResult.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/source/xml/sourceToXmlResult.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/source/xml/sourceToXmlResult.xml Tue Feb 16 17:15:43 2010
@@ -0,0 +1,28 @@
+<!--
+ 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.
+-->
+
+<root rootElementAttribute="rootElementAttributeValue" id="1">
+  <secondLevelElement1 id="2">
+    <thirdLevelElement1 tla="tlaValue" id="3"/>
+  </secondLevelElement1>
+  <secondLevelElement2 id="4"/>
+  <secondLevelElement3 sla="slaValue" id="5"> text For Second Level Element 3 <thirdLevelElement2 tla2="tla2Value" id="6"/>
+  </secondLevelElement3>
+  <secondLevelElement4 id="7">  text For Second Level Element 4  </secondLevelElement4>
+</root>

Added: db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/source/xml/sourceToXmlWithReferenceResult.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/source/xml/sourceToXmlWithReferenceResult.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/source/xml/sourceToXmlWithReferenceResult.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/source/xml/sourceToXmlWithReferenceResult.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.
+-->
+
+<root rootElementAttribute="rootElementAttributeValue" id="1">
+  <secondLevelElement1 id="2">
+    <thirdLevelElement1 tla="tlaValue" id="3"/>
+  </secondLevelElement1>
+  <secondLevelElement2 id="4"/>
+  <secondLevelElement3 sla="slaValue" id="5"> text For Second Level Element 3 <thirdLevelElement2 tla2="tla2Value" id="6"/>
+  </secondLevelElement3>
+  <secondLevelElement4 id="7">  text For Second Level Element 4  </secondLevelElement4>
+  <secondLevelElement3 refid="5"/>
+</root>

Added: db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/test/readfromclasspath/conf/control.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/test/readfromclasspath/conf/control.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/test/readfromclasspath/conf/control.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/test/readfromclasspath/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 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">
+  <options path="options.properties" xsi:type="propertiesOptions"/> 
+  <output name="properties" file="Properties.properties">
+    <source element="properties" path="propertiesData.properties"/>
+    <generator name="org.apache.torque.gf.velocity.PropertiesCopy"/>
+  </output>
+</control>
+  
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/test/readfromclasspath/conf/options.properties
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/test/readfromclasspath/conf/options.properties?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/test/readfromclasspath/conf/options.properties (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/test/readfromclasspath/conf/options.properties 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.
+
+configuration = fromClasspath

Added: db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/test/readfromclasspath/generatorDefs/testGenerator.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/test/readfromclasspath/generatorDefs/testGenerator.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/test/readfromclasspath/generatorDefs/testGenerator.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/test/readfromclasspath/generatorDefs/testGenerator.xml Tue Feb 16 17:15:43 2010
@@ -0,0 +1,35 @@
+<?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 xsi:type="velocityGenerator" 
+      name="org.apache.torque.gf.TestTemplateFromClasspath" 
+      path="testTemplate.vm">
+    <mergepoint name="testMergepoint">
+      <action xsi:type="traverseAllAction" element="entry" 
+          generator="org.apache.torque.gf.test.readConfiguration.JavaGenerator"/>
+    </mergepoint>
+  </generator>
+  <generator xsi:type="javaGenerator"
+      name="org.apache.torque.gf.test.readConfiguration.JavaGenerator"
+      class="org.apache.torque.gf.java.JavaGenerator"/>
+</generators>
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/test/readfromclasspath/package.html
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/test/readfromclasspath/package.html?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/test/readfromclasspath/package.html (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/test/readfromclasspath/package.html Tue Feb 16 17:15:43 2010
@@ -0,0 +1,23 @@
+<!--
+ 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 contains a test configuration
+  which is used by the ReadConfigurationTest to check 
+  whether configuration files can be read from the classpath
+  and are interpreted correctly.
+</p>

Added: db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/test/readfromclasspath/templates/testTemplate.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/test/readfromclasspath/templates/testTemplate.vm?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/test/readfromclasspath/templates/testTemplate.vm (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/resources/org/apache/torque/gf/test/readfromclasspath/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.
+##
+$torqueGf.mergepoint("properties")
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/site/gettingStarted/src/main/torque-gf/conf/control.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/site/gettingStarted/src/main/torque-gf/conf/control.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/site/gettingStarted/src/main/torque-gf/conf/control.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/site/gettingStarted/src/main/torque-gf/conf/control.xml Tue Feb 16 17:15:43 2010
@@ -0,0 +1,32 @@
+<?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">
+  <output name="propertyKeys"
+      file="org/apache/torque/gf/example/gettingstarted/PropertyKeys.java">
+    <source path="propertiesData.properties"/>
+    <generator name="classFrame"/>
+  </output>
+</control>
+  
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/site/gettingStarted/src/main/torque-gf/generatorDefs/enumGenerators.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/site/gettingStarted/src/main/torque-gf/generatorDefs/enumGenerators.xml?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/site/gettingStarted/src/main/torque-gf/generatorDefs/enumGenerators.xml (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/site/gettingStarted/src/main/torque-gf/generatorDefs/enumGenerators.xml Tue Feb 16 17:15:43 2010
@@ -0,0 +1,54 @@
+<?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="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>
\ No newline at end of file

Added: db/torque/torque4/trunk/torque-generator/src/test/site/gettingStarted/src/main/torque-gf/src/propertiesData.properties
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/site/gettingStarted/src/main/torque-gf/src/propertiesData.properties?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/site/gettingStarted/src/main/torque-gf/src/propertiesData.properties (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/site/gettingStarted/src/main/torque-gf/src/propertiesData.properties Tue Feb 16 17:15:43 2010
@@ -0,0 +1,19 @@
+# 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.
+#
+torque.sample.property = sampleValue
+torque.some.other.property = someOtherValue

Added: db/torque/torque4/trunk/torque-generator/src/test/site/gettingStarted/src/main/torque-gf/templates/classFrame.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/site/gettingStarted/src/main/torque-gf/templates/classFrame.vm?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/site/gettingStarted/src/main/torque-gf/templates/classFrame.vm (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/site/gettingStarted/src/main/torque-gf/templates/classFrame.vm Tue Feb 16 17:15:43 2010
@@ -0,0 +1,47 @@
+## 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.
+##
+package org.apache.torque.gf.example.gettingstarted;
+
+/*
+ * 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.
+ */
+
+/**
+ * Contains all keys in the property file.
+ */
+public enum PropertyKeys 
+{
+$torqueGf.mergepoint("constants")##
+$torqueGf.mergepoint("fields")##
+$torqueGf.mergepoint("methods")##
+}

Added: db/torque/torque4/trunk/torque-generator/src/test/site/gettingStarted/src/main/torque-gf/templates/constant.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/site/gettingStarted/src/main/torque-gf/templates/constant.vm?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/site/gettingStarted/src/main/torque-gf/templates/constant.vm (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/site/gettingStarted/src/main/torque-gf/templates/constant.vm Tue Feb 16 17:15:43 2010
@@ -0,0 +1,21 @@
+## 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.
+##
+    /** Key for ${key} */
+    $torqueGf.mergepoint("constantName")("${key}")#if(${torqueGf.getSourceElement().hasFollowingSibling()}),#else;#end
+
+

Added: db/torque/torque4/trunk/torque-generator/src/test/site/gettingStarted/src/main/torque-gf/templates/constructor.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/site/gettingStarted/src/main/torque-gf/templates/constructor.vm?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/site/gettingStarted/src/main/torque-gf/templates/constructor.vm (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/site/gettingStarted/src/main/torque-gf/templates/constructor.vm 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.
+##
+    /**
+     * Constructor.
+     *
+     * @param key the key of the property. 
+     */
+    private PropertyKeys(String key)
+    {
+        this.key = key;
+    }

Added: db/torque/torque4/trunk/torque-generator/src/test/site/gettingStarted/src/main/torque-gf/templates/getKey.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/test/site/gettingStarted/src/main/torque-gf/templates/getKey.vm?rev=910600&view=auto
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/test/site/gettingStarted/src/main/torque-gf/templates/getKey.vm (added)
+++ db/torque/torque4/trunk/torque-generator/src/test/site/gettingStarted/src/main/torque-gf/templates/getKey.vm 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.
+##
+    /**
+     * Returns the property key.
+     *
+     * @return the property key.
+     */
+    public String getKey() 
+    {
+        return key;
+    }



---------------------------------------------------------------------
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