// Path: src/main/java/liquibase/ext/spatial/statement/CreateSpatialIndexStatement.java
// public class CreateSpatialIndexStatement extends AbstractSqlStatement {
// 
//    private final String tableCatalogName;
//    private final String tableSchemaName;
//    private final String indexName;
//    private final String tableName;
//    private final String[] columns;
//    private String tablespace;
// 
//    /** The WKT geometry type (e.g. Geometry, Point, etc). */
//    private String geometryType;
// 
//    /** The Spatial Reference ID (e.g. 4326). */
//    private Integer srid;
// 
//    /**
//     * Constructs a new instance with the given parameters.
//     * 
//     * @param indexName
//     *           the name of the index to create.
//     * @param tableCatalogName
//     *           the optional table's catalog name.
//     * @param tableSchemaName
//     *           the optional table's schema name.
//     * @param tableName
//     *           the table name.
//     * @param columns
//     *           the array of column names.
//     * @param tablespace
//     *           the optional table space name.
//     * @param geometryType
//     *           the optional geometry type.
//     * @param srid
//     *           the optional Spatial Reference ID.
//     */
//    public CreateSpatialIndexStatement(final String indexName,
//          final String tableCatalogName, final String tableSchemaName,
//          final String tableName, final String[] columns, final String tablespace,
//          final String geometryType, final Integer srid) {
//       this.indexName = indexName;
//       this.tableCatalogName = tableCatalogName;
//       this.tableSchemaName = tableSchemaName;
//       this.tableName = tableName;
//       this.columns = columns.clone();
//       this.tablespace = tablespace;
//       this.geometryType = geometryType;
//       this.srid = srid;
//    }
// 
//    public String getTableCatalogName() {
//       return this.tableCatalogName;
//    }
// 
//    public String getTableSchemaName() {
//       return this.tableSchemaName;
//    }
// 
//    public String getIndexName() {
//       return this.indexName;
//    }
// 
//    public String getTableName() {
//       return this.tableName;
//    }
// 
//    public String[] getColumns() {
//       return this.columns;
//    }
// 
//    public String getTablespace() {
//       return this.tablespace;
//    }
// 
//    public CreateSpatialIndexStatement setTablespace(final String tablespace) {
//       this.tablespace = tablespace;
//       return this;
//    }
// 
//    /**
//     * Sets the WKT geometry type (e.g. Geometry, Point, etc).
//     * 
//     * @param geometryType
//     *           the geometry type.
//     */
//    public void setGeometryType(final String geometryType) {
//       this.geometryType = geometryType;
//    }
// 
//    /**
//     * Returns the WKT geometry type (e.g. Geometry, Point, etc).
//     * 
//     * @return the geometry type.
//     */
//    public String getGeometryType() {
//       return this.geometryType;
//    }
// 
//    /**
//     * Sets the Spatial Reference ID (e.g. 4326).
//     * 
//     * @param srid
//     *           the SRID.
//     */
//    public void setSrid(final Integer srid) {
//       this.srid = srid;
//    }
// 
//    /**
//     * Returns the Spatial Reference ID (e.g. 4326).
//     * 
//     * @return the SRID.
//     */
//    public Integer getSrid() {
//       return this.srid;
//    }
// }
// 
// Path: src/main/java/liquibase/ext/spatial/xml/XmlConstants.java
// public interface XmlConstants {
//    /** The extension's XML namespace. */
//    static final String SPATIAL_CHANGELOG_NAMESPACE = "http://www.liquibase.org/xml/ns/dbchangelog-ext/liquibase-spatial";
// }


import java.util.ArrayList;
import java.util.List;
import liquibase.change.AbstractChange;
import liquibase.change.Change;
import liquibase.change.ChangeMetaData;
import liquibase.change.ChangeWithColumns;
import liquibase.change.ColumnConfig;
import liquibase.change.DatabaseChange;
import liquibase.change.DatabaseChangeProperty;
import liquibase.database.Database;
import liquibase.exception.ValidationErrors;
import liquibase.ext.spatial.statement.CreateSpatialIndexStatement;
import liquibase.ext.spatial.xml.XmlConstants;
import liquibase.statement.SqlStatement;
import liquibase.util.StringUtils;
      int ii = 0;
      for (final ColumnConfig columnConfig : this.columns) {
         columns[ii++] = columnConfig.getName();
      }

      // Parse the string SRID into an integer.
      Integer srid = null;
      if (getSrid() != null) {
         srid = Integer.valueOf(getSrid());
      }

      final CreateSpatialIndexStatement statement = new CreateSpatialIndexStatement(
            getIndexName(), getCatalogName(), getSchemaName(), getTableName(), columns,
            getTablespace(), getGeometryType(), srid);
      return new SqlStatement[] { statement };
   }

   @Override
   protected Change[] createInverses() {
      final DropSpatialIndexChange inverse = new DropSpatialIndexChange();
      inverse.setCatalogName(getCatalogName());
      inverse.setSchemaName(getSchemaName());
      inverse.setTableName(getTableName());
      inverse.setIndexName(getIndexName());

      return new Change[] { inverse };
   }

   @Override
   public String getSerializedObjectNamespace() {
// Path: src/main/java/liquibase/ext/spatial/statement/CreateSpatialIndexStatement.java
// public class CreateSpatialIndexStatement extends AbstractSqlStatement {
// 
//    private final String tableCatalogName;
//    private final String tableSchemaName;
//    private final String indexName;
//    private final String tableName;
//    private final String[] columns;
//    private String tablespace;
// 
//    /** The WKT geometry type (e.g. Geometry, Point, etc). */
//    private String geometryType;
// 
//    /** The Spatial Reference ID (e.g. 4326). */
//    private Integer srid;
// 
//    /**
//     * Constructs a new instance with the given parameters.
//     * 
//     * @param indexName
//     *           the name of the index to create.
//     * @param tableCatalogName
//     *           the optional table's catalog name.
//     * @param tableSchemaName
//     *           the optional table's schema name.
//     * @param tableName
//     *           the table name.
//     * @param columns
//     *           the array of column names.
//     * @param tablespace
//     *           the optional table space name.
//     * @param geometryType
//     *           the optional geometry type.
//     * @param srid
//     *           the optional Spatial Reference ID.
//     */
//    public CreateSpatialIndexStatement(final String indexName,
//          final String tableCatalogName, final String tableSchemaName,
//          final String tableName, final String[] columns, final String tablespace,
//          final String geometryType, final Integer srid) {
//       this.indexName = indexName;
//       this.tableCatalogName = tableCatalogName;
//       this.tableSchemaName = tableSchemaName;
//       this.tableName = tableName;
//       this.columns = columns.clone();
//       this.tablespace = tablespace;
//       this.geometryType = geometryType;
//       this.srid = srid;
//    }
// 
//    public String getTableCatalogName() {
//       return this.tableCatalogName;
//    }
// 
//    public String getTableSchemaName() {
//       return this.tableSchemaName;
//    }
// 
//    public String getIndexName() {
//       return this.indexName;
//    }
// 
//    public String getTableName() {
//       return this.tableName;
//    }
// 
//    public String[] getColumns() {
//       return this.columns;
//    }
// 
//    public String getTablespace() {
//       return this.tablespace;
//    }
// 
//    public CreateSpatialIndexStatement setTablespace(final String tablespace) {
//       this.tablespace = tablespace;
//       return this;
//    }
// 
//    /**
//     * Sets the WKT geometry type (e.g. Geometry, Point, etc).
//     * 
//     * @param geometryType
//     *           the geometry type.
//     */
//    public void setGeometryType(final String geometryType) {
//       this.geometryType = geometryType;
//    }
// 
//    /**
//     * Returns the WKT geometry type (e.g. Geometry, Point, etc).
//     * 
//     * @return the geometry type.
//     */
//    public String getGeometryType() {
//       return this.geometryType;
//    }
// 
//    /**
//     * Sets the Spatial Reference ID (e.g. 4326).
//     * 
//     * @param srid
//     *           the SRID.
//     */
//    public void setSrid(final Integer srid) {
//       this.srid = srid;
//    }
// 
//    /**
//     * Returns the Spatial Reference ID (e.g. 4326).
//     * 
//     * @return the SRID.
//     */
//    public Integer getSrid() {
//       return this.srid;
//    }
// }
// 
// Path: src/main/java/liquibase/ext/spatial/xml/XmlConstants.java
// public interface XmlConstants {
//    /** The extension's XML namespace. */
//    static final String SPATIAL_CHANGELOG_NAMESPACE = "http://www.liquibase.org/xml/ns/dbchangelog-ext/liquibase-spatial";
// }


// Path: src/main/java/liquibase/ext/spatial/change/CreateSpatialIndexChange.java
import java.util.ArrayList;
import java.util.List;
import liquibase.change.AbstractChange;
import liquibase.change.Change;
import liquibase.change.ChangeMetaData;
import liquibase.change.ChangeWithColumns;
import liquibase.change.ColumnConfig;
import liquibase.change.DatabaseChange;
import liquibase.change.DatabaseChangeProperty;
import liquibase.database.Database;
import liquibase.exception.ValidationErrors;
import liquibase.ext.spatial.statement.CreateSpatialIndexStatement;
import liquibase.ext.spatial.xml.XmlConstants;
import liquibase.statement.SqlStatement;
import liquibase.util.StringUtils;

      int ii = 0;
      for (final ColumnConfig columnConfig : this.columns) {
         columns[ii++] = columnConfig.getName();
      }

      // Parse the string SRID into an integer.
      Integer srid = null;
      if (getSrid() != null) {
         srid = Integer.valueOf(getSrid());
      }

      final CreateSpatialIndexStatement statement = new CreateSpatialIndexStatement(
            getIndexName(), getCatalogName(), getSchemaName(), getTableName(), columns,
            getTablespace(), getGeometryType(), srid);
      return new SqlStatement[] { statement };
   }

   @Override
   protected Change[] createInverses() {
      final DropSpatialIndexChange inverse = new DropSpatialIndexChange();
      inverse.setCatalogName(getCatalogName());
      inverse.setSchemaName(getSchemaName());
      inverse.setTableName(getTableName());
      inverse.setIndexName(getIndexName());

      return new Change[] { inverse };
   }

   @Override
   public String getSerializedObjectNamespace() {
      return XmlConstants.SPATIAL_CHANGELOG_NAMESPACE;