Author: simonetripodi
Date: Sun Feb 20 01:37:58 2011
New Revision: 1072475

URL: http://svn.apache.org/viewvc?rev=1072475&view=rev
Log:
imported and adapted the dbinsert example

Added:
    commons/sandbox/digester3/trunk/src/examples/dbinsert/example.xml   (with 
props)
    commons/sandbox/digester3/trunk/src/examples/dbinsert/readme.txt   (with 
props)
    commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/
    
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/
    
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/
    
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/
    
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/
    
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/
    
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/DBInsertModule.java
   (with props)
    
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/Main.java
   (with props)
    
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/Row.java
   (with props)
    
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/RowInserterRule.java
   (with props)
    
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/Table.java
   (with props)
Modified:
    commons/sandbox/digester3/trunk/src/examples/dbinsert/pom.xml

Added: commons/sandbox/digester3/trunk/src/examples/dbinsert/example.xml
URL: 
http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/examples/dbinsert/example.xml?rev=1072475&view=auto
==============================================================================
--- commons/sandbox/digester3/trunk/src/examples/dbinsert/example.xml (added)
+++ commons/sandbox/digester3/trunk/src/examples/dbinsert/example.xml Sun Feb 
20 01:37:58 2011
@@ -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.
+-->
+<database>
+    <table name="muppets">
+        <row>
+            <column name="name">Kermit</column>
+            <column name="colour">green</column>
+            <column name="hobby">worrying</column>
+        </row>
+        <row>
+            <column name="name">Miss Piggy</column>
+            <column name="colour">pink</column>
+            <column name="hobby">karate</column>
+        </row>
+    </table>
+
+    <table name="things">
+        <row>
+            <column name="name">Drums</column>
+            <column name="owner">Animal</column>
+        </row>
+    </table>
+</database>

Propchange: commons/sandbox/digester3/trunk/src/examples/dbinsert/example.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/digester3/trunk/src/examples/dbinsert/example.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: commons/sandbox/digester3/trunk/src/examples/dbinsert/example.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: commons/sandbox/digester3/trunk/src/examples/dbinsert/pom.xml
URL: 
http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/examples/dbinsert/pom.xml?rev=1072475&r1=1072474&r2=1072475&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/examples/dbinsert/pom.xml (original)
+++ commons/sandbox/digester3/trunk/src/examples/dbinsert/pom.xml Sun Feb 20 
01:37:58 2011
@@ -32,4 +32,19 @@
     <packaging>jar</packaging>
     <name>Commons Digester :: Examples :: DB Insert</name>
 
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>exec-maven-plugin</artifactId>
+                <configuration>
+                    
<mainClass>org.apache.commons.digester3.examples.dbinsert.Main</mainClass>
+                    <arguments>
+                        <argument>example.xml</argument>
+                    </arguments>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
 </project>

Added: commons/sandbox/digester3/trunk/src/examples/dbinsert/readme.txt
URL: 
http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/examples/dbinsert/readme.txt?rev=1072475&view=auto
==============================================================================
--- commons/sandbox/digester3/trunk/src/examples/dbinsert/readme.txt (added)
+++ commons/sandbox/digester3/trunk/src/examples/dbinsert/readme.txt Sun Feb 20 
01:37:58 2011
@@ -0,0 +1,44 @@
+#########################################################################
+# 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.
+#########################################################################
+
+== overview
+
+The files in this directory are intended as an example of how to use
+the Apache Digester's basic functionality via its java interface.
+
+Topics covered:
+* how to write a custom Rule class.
+* How to use digester to perform actions during parsing, rather
+  than just build in-memory models of the input.
+
+== compiling and running
+
+First rename the build.properties.sample file in the parent directory
+to build.properties and edit it to suit your environment. Then in this
+directory:
+
+* to compile:
+  mvn compile
+
+* to build the jar artifact
+  mvn package
+
+* to run:
+  mvn verify
+
+Alternatively, you can set up your CLASSPATH appropriately, and
+run the example directly.

Propchange: commons/sandbox/digester3/trunk/src/examples/dbinsert/readme.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/digester3/trunk/src/examples/dbinsert/readme.txt
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: commons/sandbox/digester3/trunk/src/examples/dbinsert/readme.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/DBInsertModule.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/DBInsertModule.java?rev=1072475&view=auto
==============================================================================
--- 
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/DBInsertModule.java
 (added)
+++ 
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/DBInsertModule.java
 Sun Feb 20 01:37:58 2011
@@ -0,0 +1,76 @@
+/*
+ * 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.commons.digester3.examples.dbinsert;
+
+import org.apache.commons.digester3.AbstractRulesModule;
+
+public final class DBInsertModule extends AbstractRulesModule {
+
+    @Override
+    protected void configure() {
+        forPattern("database/table")
+            // Create a new instance of class Table, and push that
+            // object onto the digester stack of objects. We only need
+            // this so that when a row is inserted, it can find out what
+            // the enclosing tablename was. 
+            //
+            // Note that the object is popped off the stack at the end of the 
+            // "table" tag (normal behaviour for ObjectCreateRule). Because we 
+            // never added the table object to some parent object, when it is 
+            // popped off the digester stack it becomes garbage-collected. 
That 
+            // is fine in this situation; we've done all the necessary work and
+            // don't need the table object any more.
+            .createObject().ofType(Table.class)
+            .then()
+
+            // Map *any* attributes on the table tag to appropriate
+            // setter-methods on the top object on the stack (the Table
+            // instance created by the preceeding rule). We only expect one
+            // attribute, though: a 'name' attribute specifying what table
+            // we are inserting rows into.
+            .setProperties();
+
+        // When we encounter a "row" tag, invoke methods on the provided
+        // RowInserterRule instance.
+        //
+        // This rule creates a Row instance and pushes it on the digester
+        // object stack, rather like ObjectCreateRule, so that the column
+        // tags have somewhere to store their information. And when the
+        // </row> end tag is found, the rule will trigger to remove this
+        // object from the stack, and also do an actual database insert.
+        //
+        // Note that the rule instance we are passing to the digester has
+        // been initialised with some useful data (the SQL connection).
+        //
+        // Note also that in this case we are not using the digester's
+        // factory methods to create the rule instance; that's just a
+        // convenience - and obviously not an option for Rule classes
+        // that are not part of the digester core implementation.
+        forPattern("database/table/row").addRule(new RowInserterRule());
+
+        // when we encounter a "column" tag, call setColumn on the top
+        // object on the stack, passing two parameters: the "name"
+        // attribute, and the text within the tag body.
+        forPattern("database/table/row/column").
+            callMethod("addColumn").withParamTypes(String.class, String.class)
+            .then()
+            .callParam().fromAttribute("name")
+            .then()
+            .callParam().ofIndex(1);
+    }
+
+}

Propchange: 
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/DBInsertModule.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/DBInsertModule.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: 
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/DBInsertModule.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/Main.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/Main.java?rev=1072475&view=auto
==============================================================================
--- 
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/Main.java
 (added)
+++ 
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/Main.java
 Sun Feb 20 01:37:58 2011
@@ -0,0 +1,88 @@
+/*
+ * 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.commons.digester3.examples.dbinsert;
+
+import static org.apache.commons.digester3.DigesterLoader.newLoader;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.commons.digester3.Digester;
+import org.xml.sax.SAXException;
+
+/**
+ * A simple program to demonstrate that the Commons Digester module can be
+ * used to trigger actions as the xml is parsed, rather than just build
+ * up in-memory representations of the parsed data. This example also shows
+ * how to write a custom Rule class.
+ * <p>
+ * This code will parse the provided "example.xml" file, and immediately 
+ * insert the processed data into a database as each row tag is parsed,
+ * instead of building up an in-memory representation. Actually, in order 
+ * to keep this example simple and easy to run, sql insert statements are 
+ * printed out rather than actually performing database inserts, but the 
+ * principle remains.
+ * <p> 
+ * Very verbose comments are included here, as this class is intended
+ * as a tutorial; if you look closely at method "addRules", you will
+ * see that the amount of code required to use the Digester is actually
+ * quite low.
+ * <p>
+ * Usage: java Main example.xml
+ */
+public class Main {
+    
+    /**
+     * Main method : entry point for running this example program.
+     * <p>
+     * Usage: java Main example.xml
+     */
+    public static void main(String[] args) {
+        if (args.length != 1) {
+            usage();
+            System.exit(-1);
+        }
+
+        String filename = args[0];
+
+        // Create a Digester instance
+        Digester d = newLoader(new DBInsertModule()).newDigester();
+
+        // Process the input file.
+        System.out.println("Parsing commencing...");
+        try {
+            File srcfile = new File(filename);
+            d.parse(srcfile);
+        } catch (IOException ioe) {
+            System.out.println("Error reading input file:" + ioe.getMessage());
+            System.exit(-1);
+        } catch (SAXException se) {
+            System.out.println("Error parsing input file:" + se.getMessage());
+            System.exit(-1);
+        }
+
+        // And here there is nothing to do. The digester rules have
+        // (deliberately) not built a representation of the input, but
+        // instead processed the data as it was read.
+        System.out.println("Parsing complete.");
+    }
+
+    private static void usage() {
+        System.out.println("Usage: java Main example.xml");
+    }
+
+}

Propchange: 
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/Main.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/Main.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: 
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/Main.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/Row.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/Row.java?rev=1072475&view=auto
==============================================================================
--- 
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/Row.java
 (added)
+++ 
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/Row.java
 Sun Feb 20 01:37:58 2011
@@ -0,0 +1,67 @@
+/*
+ * 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.commons.digester3.examples.dbinsert;
+
+import java.util.List;
+import java.util.LinkedList;
+
+/**
+ * See Main.java.
+ */
+public class Row {
+
+    /**
+     * Alas, we can't just use a Map to store the (name, value) pairs because
+     * the output will look weird if we don't preserve the column order. This
+     * wouldn't be a problem if we were really inserting into a database; it
+     * only matters because we are displaying the SQL statements via stdout
+     * instead. The LinkedHashMap class would be nice to use, but that would
+     * require java 1.4, so we'll use a list instead, and may as well call the
+     * entries in the list 'Column' objects.
+     */
+    public static class Column {
+
+        private String name, value;
+
+        public Column(String name, String value) {
+            this.name = name;
+            this.value = value;
+        }
+
+        public String getName() {
+            return name;
+        }
+
+        public String getValue() {
+            return value;
+        }
+    }
+
+    private LinkedList<Column> columns = new LinkedList<Column>();
+
+    public Row() {
+    }
+
+    public void addColumn(String name, String value) {
+        columns.add(new Column(name, value));
+    }
+
+    public List<Column> getColumns() {
+        return columns;
+    }
+
+}

Propchange: 
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/Row.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/Row.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: 
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/Row.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/RowInserterRule.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/RowInserterRule.java?rev=1072475&view=auto
==============================================================================
--- 
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/RowInserterRule.java
 (added)
+++ 
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/RowInserterRule.java
 Sun Feb 20 01:37:58 2011
@@ -0,0 +1,93 @@
+/*
+ * 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.commons.digester3.examples.dbinsert;
+
+import org.apache.commons.digester3.Rule;
+
+/**
+ * See Main.java.
+ */
+public class RowInserterRule extends Rule {
+
+    /**
+     * This method is invoked when the start tag for an xml element 
representing
+     * a database row is encountered. It pushes a new Row instance onto the
+     * digester stack (rather like an ObjectCreateRule) so that column data
+     * can be stored on it.
+     */
+    public void begin(String namespace, String name, org.xml.sax.Attributes 
attrs) {
+        this.getDigester().push(new Row());
+    }
+
+    /**
+     * This method is invoked when the end tag for an xml element representing
+     * a database row is encountered. It pops a fully-configured Row instance
+     * off the digester stack, accesses the object below it on the stack (a
+     * Table object) to get the tablename, then does an SQL insert). Actually,
+     * here we just print out text rather than do the sql insert, but the
+     * real implementation should be fairly simple.
+     * <p>
+     * Note that after this rule completes, the row/column information is
+     * <i>discarded</i>, ie this rule performs actions <i>as the input is
+     * parsed</i>. This contrasts with the more usual way digester is used,
+     * which is to build trees of objects for later use. But it's a perfectly
+     * valid use of Digester.
+     */
+    public void end(String namespace, String name) {
+        Row row = (Row) this.getDigester().pop();
+        Table table = (Table) this.getDigester().peek();
+
+        // Obviously, all this would be replaced by code like:
+        //   stmt = conn.prepareStatement();
+        //   stmt.setString(n, value);
+        //
+        // Many improvements can then be implemented, such as using the 
+        // PreparedStatement.getParameterMetaData method to retrieve
+        // retrieve parameter types, etc.
+
+        StringBuffer colnames = new StringBuffer();
+        StringBuffer colvalues = new StringBuffer();
+
+        for (Row.Column column : row.getColumns()) {
+            if (colnames.length() > 0) {
+                colnames.append(", ");
+                colvalues.append(", ");
+            }
+
+            colnames.append("'");
+            colnames.append(column.getName());
+            colnames.append("'");
+
+            colvalues.append("'");
+            colvalues.append(column.getValue());
+            colvalues.append("'");
+        }
+
+        StringBuffer buf = new StringBuffer();
+        buf.append("insert into ");
+        buf.append(table.getName());
+        buf.append(" (");
+        buf.append(colnames.toString());
+        buf.append(") values (");
+        buf.append(colvalues.toString());
+        buf.append(")");
+
+        // here the prepared statement would be executed....
+        System.out.println(buf.toString());
+    }
+
+}

Propchange: 
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/RowInserterRule.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/RowInserterRule.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: 
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/RowInserterRule.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/Table.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/Table.java?rev=1072475&view=auto
==============================================================================
--- 
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/Table.java
 (added)
+++ 
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/Table.java
 Sun Feb 20 01:37:58 2011
@@ -0,0 +1,37 @@
+/*
+ * 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.commons.digester3.examples.dbinsert;
+
+/**
+ * See Main.java.
+ */
+public class Table {
+
+    private String name;
+
+    public Table() {
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+}

Propchange: 
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/Table.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/Table.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: 
commons/sandbox/digester3/trunk/src/examples/dbinsert/src/main/java/org/apache/commons/digester3/examples/dbinsert/Table.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain


Reply via email to