if ((_catalog != null) && (_catalog.length() > 0)) { reader.setCatalog(_catalog); } if ((_schema != null) && (_schema.length() > 0)) { reader.setSchema(_schema); }  String[] tableTypes = getTableTypes();  if (tableTypes.length > 0) { reader.setTableTypes(tableTypes); }
    private Database readSchema()    {        // TODO: This should largely be deducable from the jdbc connection url        if (_databaseType == null)        {            throw new BuildException("The database type needs to be defined.");        }        if (_dataSource == null)        {            throw new BuildException("No database specified.");        }        try        {            JdbcModelReader reader = new JdbcModelReader(_dataSource.getConnection());            return reader.getDatabase();        }        catch (Exception ex)        {            throw new BuildException("Could not read the schema from the specified database", ex);        }    }