Class OracleUpdateSpatialIndexAndMetadata

java.lang.Object
org.gvsig.oracle.dal.operations.OracleUpdateSpatialIndexAndMetadata

public class OracleUpdateSpatialIndexAndMetadata extends Object
Updates the layer extent on table USER_SDO_GEOM_METADATA and rebuild the SpatialIndex. The metadata record is inserted if not existing. The SpatialIndex is also created if not existing.
Author:
Cesar Martinez Izquierdo
  • Field Details

    • helper

      protected final org.gvsig.fmap.dal.store.jdbc2.JDBCHelper helper
    • database

      protected final String database
    • schema

      protected final String schema
    • table

      protected final String table
    • featureType

      protected final org.gvsig.fmap.dal.feature.FeatureType featureType
  • Constructor Details

    • OracleUpdateSpatialIndexAndMetadata

      public OracleUpdateSpatialIndexAndMetadata(org.gvsig.fmap.dal.store.jdbc2.JDBCHelper helper, String database, String schema, String table, org.gvsig.fmap.dal.feature.FeatureType featureType)
  • Method Details

    • begin

      public void begin() throws org.gvsig.fmap.dal.resource.exception.AccessResourceException
      Throws:
      org.gvsig.fmap.dal.resource.exception.AccessResourceException
    • clean

      protected void clean()
    • execute

      public void execute() throws org.gvsig.fmap.dal.exception.DataException
      Executes the operation
      Throws:
      org.gvsig.fmap.dal.exception.DataException
    • updateOrInsertMetadata

      public boolean updateOrInsertMetadata(org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor geomDescriptor)
      Updates the USER_SDO_GEOM_METADATA table or inserts if an entry is not found for the layer. The update is only performed if the new layer extent is bigger than current one.
      Parameters:
      geomDescriptor -
      Returns:
      true if the metadata table was changed, false otherwise
    • updateUserMetadata

      public boolean updateUserMetadata(List<OracleDimensionMetadata> dimensions, String geomColumnName, int srid)
      Updates layer metatada on USER_SDO_GEOM_METADATA table
      Parameters:
      dimensions -
      geomColumnName -
      srid -
      Returns:
      Returns true if the layer record exists on the table and has been correctly updated, false otherwise
    • insertUserMetadata

      public boolean insertUserMetadata(List<OracleDimensionMetadata> dimensions, String geomColumnName, int srid)
      Inserts layer metatada on USER_SDO_GEOM_METADATA table
      Parameters:
      dimensions -
      geomColumnName -
      srid -
      Returns:
      Returns true if the layer record has been correctly inserted, false otherwise
    • getEnvelope

      protected org.gvsig.fmap.geom.primitive.Envelope getEnvelope(List<OracleDimensionMetadata> dimensions)
    • updateDimensions

      protected boolean updateDimensions(List<OracleDimensionMetadata> dimensions, org.gvsig.fmap.geom.primitive.Envelope newEnvelope)
      Updates the dimension definition using the provided envelope. The update is only performed if the new layer extent is bigger than the one defined on dimension metadata.
      Parameters:
      dimensions -
      newEnvelope -
      Returns:
      true if the definition was updated, false otherwise
    • fetchDimensionMetadata

      protected List<OracleDimensionMetadata> fetchDimensionMetadata()
      Fetches dimensions from ALL_SDO_GEOM_METADATA table and updates the layer envelope using the provided one
      Returns:
    • createOrRebuildSpatialIndex

      public void createOrRebuildSpatialIndex(org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor geomDescriptor)