db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r377812 - /db/ddlutils/trunk/src/java/org/apache/ddlutils/task/DdlToDatabaseTask.java
Date Tue, 14 Feb 2006 20:07:06 GMT
Author: tomdz
Date: Tue Feb 14 12:07:03 2006
New Revision: 377812

URL: http://svn.apache.org/viewcvs?rev=377812&view=rev
Log:
Added parameter to the DdlToDatabase task that allows to specify whether the schema XML shall
be validated

Modified:
    db/ddlutils/trunk/src/java/org/apache/ddlutils/task/DdlToDatabaseTask.java

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/task/DdlToDatabaseTask.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/task/DdlToDatabaseTask.java?rev=377812&r1=377811&r2=377812&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/task/DdlToDatabaseTask.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/task/DdlToDatabaseTask.java Tue Feb 14
12:07:03 2006
@@ -41,6 +41,8 @@
     private ArrayList _fileSets = new ArrayList();
     /** Whether XML input files are validated against the internal or an external DTD. */
     private boolean _useInternalDtd = true;
+    /** Whether XML input files are validated at all. */
+    private boolean _validateXml = false;
 
     /**
      * Specifies whether XML input files are validated against the internal or an external
DTD.
@@ -53,6 +55,16 @@
     }
 
     /**
+     * Specifies whether XML input files are validated at all.
+     *
+     * @param validateXml <code>true</code> if input files are to be validated
+     */
+    public void setValidateXml(boolean validateXml)
+    {
+        _validateXml = validateXml;
+    }
+
+    /**
      * Adds a fileset.
      * 
      * @param fileset The additional input files
@@ -150,6 +162,7 @@
         DatabaseIO reader = new DatabaseIO();
         Database   model  = null;
 
+        reader.setValidateXml(_validateXml);
         reader.setUseInternalDtd(_useInternalDtd);
         if ((_singleSchemaFile != null) && !_fileSets.isEmpty())
         {



Mime
View raw message