Class AbstractIndexedDataSet
- java.lang.Object
-
- oracle.spatial.network.nfe.vis.maps.index.AbstractIndexedDataSet
-
public abstract class AbstractIndexedDataSet extends java.lang.Object
An indexed dataset that is associated to a data layer
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractDataSet
dataSet
Data set object.protected AbstractDataSetLayer
dataSetLayer
The layer owning this objectprotected AbstractSpatialIndex
sptIndex
Spatial index object that contains the data set features, and is based on the feature MBR's.
-
Constructor Summary
Constructors Constructor Description AbstractIndexedDataSet()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
addFeature(AbstractFeature feature)
Adds a new feature to index data set.boolean
appendFeature(AbstractFeature feature)
Appends a feature to index data set.AbstractFeature
getAbstractFeature(java.lang.String featKey)
Returns the feature associated to the given key Returns the abstract featureAbstractDataSet
getDataSet()
AbstractDataSetLayer
getDataSetLayer()
Returns the layer owning this objectjava.util.Set<GeoObject>
getFeatures(java.awt.geom.Area area)
Returns all the features that interact with the given areajava.util.List<GeoObject>
getFeatures(java.awt.geom.Point2D point, double tolerance)
Returns all the features interacting with the given point used the specified tolerance as buffer around the pointjava.util.List<GeoObject>
getFeatures(java.awt.geom.Rectangle2D mbr)
Returns all the features that interact with the given MBRjava.util.List<GeoObject>
getFeaturesByAttribute(java.awt.geom.Rectangle2D mbr, oracle.mapviewer.share.Field attribute)
Returns the feature that interact with input mbr and have an attribute value equal to input attribute.AbstractSpatialIndex
getSpatialindex()
abstract AbstractFeature
identify(java.awt.geom.Point2D point, double tolerance, int granularity)
Returns a feature that is located at the given point using the specified tolerancevoid
redo(EditChangeEvent change)
Restores the last edit operation.boolean
removeFeature(AbstractFeature feature)
Removes feature from index data set.void
setDataSetLayer(AbstractDataSetLayer dataSetLayer)
void
setSpatialIndex(AbstractSpatialIndex index)
void
undo(EditChangeEvent change)
Removes the last edit operation.boolean
updateSpatialAttribute(java.lang.Object key, java.lang.Object spatialChange)
Updates feature of index data set.
-
-
-
Field Detail
-
dataSetLayer
protected AbstractDataSetLayer dataSetLayer
The layer owning this object
-
dataSet
protected AbstractDataSet dataSet
Data set object.
-
sptIndex
protected AbstractSpatialIndex sptIndex
Spatial index object that contains the data set features, and is based on the feature MBR's.
-
-
Method Detail
-
getDataSet
public AbstractDataSet getDataSet()
- Returns:
-
getSpatialindex
public AbstractSpatialIndex getSpatialindex()
- Returns:
-
setSpatialIndex
public void setSpatialIndex(AbstractSpatialIndex index)
- Parameters:
index
-
-
addFeature
public boolean addFeature(AbstractFeature feature) throws java.lang.Exception
Adds a new feature to index data set. Data set must be read-write mode. Data set change manager records change.- Parameters:
feature
-- Returns:
- Throws:
java.lang.Exception
-
appendFeature
public boolean appendFeature(AbstractFeature feature) throws java.lang.Exception
Appends a feature to index data set. Data set change manager does not record change. Use this method if you want to extend the feature list, but do not want to record it as a data set change.- Parameters:
feature
-- Returns:
- Throws:
java.lang.Exception
-
removeFeature
public boolean removeFeature(AbstractFeature feature) throws java.lang.Exception
Removes feature from index data set. Data set must be read-write mode. Data set change manager records change.- Parameters:
feature
-- Returns:
- Throws:
java.lang.Exception
-
updateSpatialAttribute
public boolean updateSpatialAttribute(java.lang.Object key, java.lang.Object spatialChange) throws java.lang.Exception
Updates feature of index data set. Data set must be read-write mode. Data set change manager records change.- Parameters:
key
-spatialChange
-- Returns:
- Throws:
java.lang.Exception
-
getFeatures
public java.util.List<GeoObject> getFeatures(java.awt.geom.Point2D point, double tolerance)
Returns all the features interacting with the given point used the specified tolerance as buffer around the point- Parameters:
point
-tolerance
-- Returns:
- a list of interacting features
-
getFeatures
public java.util.List<GeoObject> getFeatures(java.awt.geom.Rectangle2D mbr)
Returns all the features that interact with the given MBR- Parameters:
mbr
-- Returns:
- a list of interacting features
-
getFeatures
public java.util.Set<GeoObject> getFeatures(java.awt.geom.Area area)
Returns all the features that interact with the given area- Parameters:
area
-- Returns:
- a set of interacting features
-
getAbstractFeature
public AbstractFeature getAbstractFeature(java.lang.String featKey)
Returns the feature associated to the given key Returns the abstract feature- Parameters:
featKey
- a feature or null if the feature was not found for the key- Returns:
-
undo
public void undo(EditChangeEvent change) throws java.lang.Exception
Removes the last edit operation.- Parameters:
change
-- Throws:
java.lang.Exception
-
redo
public void redo(EditChangeEvent change) throws java.lang.Exception
Restores the last edit operation.- Parameters:
change
-- Throws:
java.lang.Exception
-
identify
public abstract AbstractFeature identify(java.awt.geom.Point2D point, double tolerance, int granularity)
Returns a feature that is located at the given point using the specified tolerance- Parameters:
point
-tolerance
-granularity
-- Returns:
- a feature or null if no point is located at the given point
-
setDataSetLayer
public void setDataSetLayer(AbstractDataSetLayer dataSetLayer)
-
getDataSetLayer
public AbstractDataSetLayer getDataSetLayer()
Returns the layer owning this object- Returns:
-
getFeaturesByAttribute
public java.util.List<GeoObject> getFeaturesByAttribute(java.awt.geom.Rectangle2D mbr, oracle.mapviewer.share.Field attribute)
Returns the feature that interact with input mbr and have an attribute value equal to input attribute.- Parameters:
mbr
-attribute
- should of same type as feature attribute.- Returns:
-
-