Package org.gvsig.oracle.dal.operations
Class OracleUpdateSpatialIndexAndMetadata
java.lang.Object
org.gvsig.oracle.dal.operations.OracleUpdateSpatialIndexAndMetadata
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionOracleUpdateSpatialIndexAndMetadata(org.gvsig.fmap.dal.store.jdbc2.JDBCHelper helper, String database, String schema, String table, org.gvsig.fmap.dal.feature.FeatureType featureType) -
Method Summary
Modifier and TypeMethodDescriptionvoidbegin()protected voidclean()voidcreateOrRebuildSpatialIndex(org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor geomDescriptor) voidexecute()Executes the operationprotected List<OracleDimensionMetadata> Fetches dimensions from ALL_SDO_GEOM_METADATA table and updates the layer envelope using the provided oneprotected org.gvsig.fmap.geom.primitive.EnvelopegetEnvelope(List<OracleDimensionMetadata> dimensions) booleaninsertUserMetadata(List<OracleDimensionMetadata> dimensions, String geomColumnName, int srid) Inserts layer metatada on USER_SDO_GEOM_METADATA tableprotected booleanupdateDimensions(List<OracleDimensionMetadata> dimensions, org.gvsig.fmap.geom.primitive.Envelope newEnvelope) Updates the dimension definition using the provided envelope.booleanupdateOrInsertMetadata(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.booleanupdateUserMetadata(List<OracleDimensionMetadata> dimensions, String geomColumnName, int srid) Updates layer metatada on USER_SDO_GEOM_METADATA table
-
Field Details
-
helper
protected final org.gvsig.fmap.dal.store.jdbc2.JDBCHelper helper -
database
-
schema
-
table
-
featureType
protected final org.gvsig.fmap.dal.feature.FeatureType featureType
-
-
Constructor Details
-
OracleUpdateSpatialIndexAndMetadata
-
-
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.DataExceptionExecutes 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
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)
-