Package org.apache.ddlutils.io

Examples of org.apache.ddlutils.io.DatabaseIO


        }

        try
        {
            FileWriter outputWriter = new FileWriter(_outputFile);
            DatabaseIO dbIO         = new DatabaseIO();

            dbIO.write(model, outputWriter);
            outputWriter.close();
            _log.info("Written schema to " + _outputFile.getAbsolutePath());
        }
        catch (Exception ex)
        {
View Full Code Here


    /**
     * {@inheritDoc}
     */
    protected Database readModel()
    {
        DatabaseIO reader = new DatabaseIO();
        Database   model  = null;

        reader.setValidateXml(_validateXml);
        reader.setUseInternalDtd(_useInternalDtd);
        if ((_singleSchemaFile != null) && !_fileSets.isEmpty())
        {
            throw new BuildException("Please use either the schemafile attribute or the sub fileset element, but not both");
        }
        if (_singleSchemaFile != null)
View Full Code Here

     * @param dbDef The database XML definition
     * @return The database model
     */
    protected Database parseDatabaseFromString(String dbDef)
    {
        DatabaseIO dbIO = new DatabaseIO();
       
        dbIO.setUseInternalDtd(true);
        dbIO.setValidateXml(false);
        return dbIO.read(new StringReader(dbDef));
    }
View Full Code Here

  }
 
  private void writeDatabase (org.apache.ddlutils.model.Database database, DataModel dataModel) {
      String filename = getFileSourceName(dataModel);
      if (filename!= null)
        new DatabaseIO().write(database, filename);
  }
View Full Code Here

   *
   * @param fileName
   */
  public void writeDatabaseSchematoFile(String fileName)
  {
    new DatabaseIO().write(model, fileName);
  }
View Full Code Here

   *            The database XML definition
   * @return The database model
   */
  protected Database createDatabaseSchemaFromXML(String fileName)
  {
    DatabaseIO io = new DatabaseIO();
    io.setValidateXml(false);
    return io.read(fileName);
  }
View Full Code Here

   *            The database XML definition
   * @return The database model
   */
  protected Database createDatabaseSchemaFromString(String dbDef)
  {
    DatabaseIO dbIO = new DatabaseIO();

    dbIO.setUseInternalDtd(true);
    dbIO.setValidateXml(false);
    return dbIO.read(new StringReader(dbDef));
  }
View Full Code Here

   *
   * @param fileName
   */
  public void writeDatabaseSchematoFile(String fileName)
  {
    new DatabaseIO().write(model, fileName);
  }
View Full Code Here

   *            The database XML definition
   * @return The database model
   */
  protected Database createDatabaseSchemaFromXML(String fileName)
  {
    DatabaseIO io = new DatabaseIO();
    io.setValidateXml(false);
    return io.read(fileName);
  }
View Full Code Here

   *            The database XML definition
   * @return The database model
   */
  protected Database createDatabaseSchemaFromString(String dbDef)
  {
    DatabaseIO dbIO = new DatabaseIO();

    dbIO.setUseInternalDtd(true);
    dbIO.setValidateXml(false);
    return dbIO.read(new StringReader(dbDef));
  }
View Full Code Here

TOP

Related Classes of org.apache.ddlutils.io.DatabaseIO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.