You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-dev@db.apache.org by to...@apache.org on 2006/03/10 21:47:00 UTC

svn commit: r384913 - /db/ddlutils/trunk/src/java/org/apache/ddlutils/io/DatabaseIO.java

Author: tomdz
Date: Fri Mar 10 12:46:58 2006
New Revision: 384913

URL: http://svn.apache.org/viewcvs?rev=384913&view=rev
Log:
Fixed DDLUTILS-78 as suggested by Ludovic MaƮtre

Modified:
    db/ddlutils/trunk/src/java/org/apache/ddlutils/io/DatabaseIO.java

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/io/DatabaseIO.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/io/DatabaseIO.java?rev=384913&r1=384912&r2=384913&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/io/DatabaseIO.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/io/DatabaseIO.java Fri Mar 10 12:46:58 2006
@@ -198,6 +198,27 @@
     }
 
     /**
+     * Reads the database model from the given input source.
+     *
+     * @param source The input source
+     * @return The database model
+     */
+    public Database read(InputSource source) throws DdlUtilsException
+    {
+        Database model = null;
+
+        try
+        {
+            model = (Database)getReader().parse(source);
+        }
+        catch (Exception ex)
+        {
+            throw new DdlUtilsException(ex);
+        }
+        model.initialize();
+        return model;
+    }
+    /**
      * Writes the database model to the specified file.
      * 
      * @param model    The database model