public class TLcdAIXM51AbstractAIXMFeature extends TLcdAIXM51AbstractAIXMFeatureBase implements ILcdShapeList, ILcdCache
A feature consists of a set of timeslices, that each represent the state of the feature during a
certain time extent. The timeslices can be retrieved through the method getTimeSlices()
.
A feature can either be stand-alone, or contained inside a message, represented by the class
TLcdAIXM51AbstractAIXMMessage
.
A feature implements ILcdShapeList
and can contain a set of shapes, depending on
the
type
of feature (e.g., some features do not have a geographical position).
To determine the geometry of a feature, the method collectShapes()
is invoked by
the AIXM 5.1 Message that contains this feature.
Each timeslice in this feature is an ILcdShapeList
, which can potentially
be added to the list of shapes in this feature. The method collectShapes()
runs by default over all timeslices and adds them to the list of shapes in this feature,
if they are accepted by the geometry filter (see getGeometryFilter()
) or if no filter is
set.
TLcdAIXM51AbstractAIXMTimeSlice
,
TLcdAIXM51AbstractAIXMMessage
,
Serialized FormModifier and Type | Field and Description |
---|---|
static TLcdDataProperty |
BOUNDED_BY_PROPERTY
Data property that maps to the
boundedBy element. |
static TLcdDataProperty |
FEATURE_METADATA_PROPERTY
Data property that maps to the
featureMetadata element. |
static TLcdDataProperty |
LOCATION_PROPERTY
Data property that maps to the
location element. |
DATA_SOURCE_PROPERTY, DATA_SOURCE_REFERENCE_PROPERTY, HISTORY_PROPERTY, VALID_TIME_PROPERTY
DESCRIPTION_PROPERTY, DESCRIPTION_REFERENCE_PROPERTY, ID_PROPERTY, IDENTIFIER_PROPERTY, META_DATA_PROPERTY_PROPERTY, NAME_PROPERTY
Constructor and Description |
---|
TLcdAIXM51AbstractAIXMFeature(TLcdDataType aType)
Constructs a new
TLcdAIXM51AbstractAIXMFeature for the given type. |
Modifier and Type | Method and Description |
---|---|
void |
clearCache()
Clears the cache.
|
TLcdDataObject |
clone(Map aObjectDictionary)
Returns a deep clone of this object.
|
protected List<ILcdShape> |
collectShapes()
Override this method to collect all shapes that needs to be included in the ILcdShapeList
implementation of this feature.
|
TLcdGML32BoundingShape |
getBoundedBy()
Returns the value of the property that maps to the
boundedBy element. |
ILcdBounds |
getBounds()
Returns the bounds of this feature.
|
Object |
getCachedObject(Object aKey)
Looks up and returns the cached Object corresponding to the given key.
|
TLcdAIXM51FeatureMetadataProperty |
getFeatureMetadata()
Returns the value of the property that maps to the
featureMetadata element. |
ILcdPoint |
getFocusPoint()
Returns the focus point of this
ILcdShape . |
ILcdFilter |
getGeometryFilter()
Returns the filter that is used to determine the timeslices for which the geometry
has to be taken into account.
|
Object |
getLocation()
Returns the value of the property that maps to the
location element. |
List<TLcdAIXM51AbstractAIXMTimeSlice> |
getTimeSlices()
Returns a list of objects corresponding to AIXM 5.1 types with base type
AbstractAIXMTimeSliceType . |
void |
insertIntoCache(Object aKey,
Object aValue)
Inserts a cache Object corresponding to the given key Object.
|
Object |
removeCachedObject(Object aKey)
Looks up and removes the cached Object corresponding to the given key.
|
void |
setBoundedBy(TLcdGML32BoundingShape aValue)
Sets the value of the property that maps to the
boundedBy element. |
void |
setFeatureMetadata(TLcdAIXM51FeatureMetadataProperty aValue)
Sets the value of the property that maps to the
featureMetadata element. |
void |
setGeometryFilter(ILcdFilter aGeometryFilter)
Sets the filter that is used to determine the timeslices for which the geometry
has to be taken into account.
|
void |
setLocation(Object aValue)
Sets the value of the property that maps to the
location element. |
void |
shapesChanged()
Notifies this
ILcdShapeList that some (possibly all) of its shapes have changed. |
getDataSource, getDataSourceReference, getHistory, getValidTime, setDataSource, setDataSourceReference, setHistory, setValidTime
clone, contains2D, contains2D, contains3D, contains3D, getShape, getShapeCount, invalidateObject
getDescription, getDescriptionReference, getId, getIdentifier, getMetaDataProperty, getName, setDescription, setDescriptionReference, setId, setIdentifier
getDataType, getValue, getValue, hasValue, hasValue, setValue, setValue, toString
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getShape, getShapeCount
contains2D, contains2D, contains3D, contains3D
clone
public static final TLcdDataProperty FEATURE_METADATA_PROPERTY
featureMetadata
element.
The possible values for this property are instances of TLcdAIXM51FeatureMetadataProperty
.public static final TLcdDataProperty BOUNDED_BY_PROPERTY
boundedBy
element.
The possible values for this property are instances of TLcdGML32BoundingShape
.public static final TLcdDataProperty LOCATION_PROPERTY
location
element.
The possible values for this property are instances of TLcdGML32LocationProperty
.public TLcdAIXM51AbstractAIXMFeature(TLcdDataType aType)
TLcdAIXM51AbstractAIXMFeature
for the given type. This type
must be a subtype of AbstractAIXMFeatureType
.aType
- the feature type for which to create a new instancepublic ILcdFilter getGeometryFilter()
ILcdFilter
is set that only takes the geometry
of BASELINE
and SNAPSHOT
timeslices into account.setGeometryFilter(ILcdFilter)
public void setGeometryFilter(ILcdFilter aGeometryFilter)
aGeometryFilter
- the filter that is used to determine the timeslices for which the geometry
has to be taken into account.getGeometryFilter()
public List<TLcdAIXM51AbstractAIXMTimeSlice> getTimeSlices()
AbstractAIXMTimeSliceType
.
This list can be used to add and remove timeslices from this feature. It will also create the necessary timeslice
properties when timeslices are added to this feature, to ensure a valid XML mapping.List
should be of type TLcdAIXM51AbstractAIXMTimeSlice
.public ILcdBounds getBounds()
If this feature contains actual shapes, the bounding box of these shapes is returned.
If no geometry is found, the boundedBy
element is used as bounds if available;
otherwise, the result of TLcdGML32AbstractFeature.getBounds()
is returned.
getBounds
in interface ILcdBounded
getBounds
in class TLcdGML32AbstractFeature
public ILcdPoint getFocusPoint()
ILcdShape
ILcdShape
.getFocusPoint
in interface ILcdShape
getFocusPoint
in class TLcdGML32AbstractFeature
ILcdShape
.public void shapesChanged()
TLcdGML32AbstractFeature
ILcdShapeList
that some (possibly all) of its shapes have changed.
This method should be called whenever a shape in this GML feature has been changed, or when
a shape is inserted in or removed in one the properties of this GML feature.
This method is the same as TLcdGML32AbstractFeature.invalidateObject()
.shapesChanged
in class TLcdGML32AbstractFeature
public TLcdDataObject clone(Map aObjectDictionary)
TLcdDataObject
ILcdDataObject
, the value is cloned by first creating a new instance via
the value.getDataType().newInstance()
method, and then cloning its properties one by one.ILcdDeepCloneable
or
ILcdCloneable
then this interface is used to clone the value.clone
in interface ILcdDeepCloneable
clone
in class TLcdGML32AbstractFeature
aObjectDictionary
- the Object dictionary that keeps track of the objects for which a clone has already been made,
and their corresponding clone Object.protected List<ILcdShape> collectShapes()
TLcdGML32AbstractFeature
ILcdDataObject
for all features implementing ILcdShape
.collectShapes
in class TLcdGML32AbstractFeature
public void insertIntoCache(Object aKey, Object aValue)
ILcdCache
insertIntoCache
in interface ILcdCache
aKey
- the key Object that will be used to identify the Object.
The key must therefore be a unique identifier, typically the caller
itself: insertIntoCache(this, ...)
.aValue
- the Object to be cached.public Object removeCachedObject(Object aKey)
ILcdCache
removeCachedObject
in interface ILcdCache
aKey
- the key Object that was used for storing the cache Object.public void clearCache()
ILcdCache
clearCache
in interface ILcdCache
public Object getCachedObject(Object aKey)
ILcdCache
getCachedObject
in interface ILcdCache
aKey
- the key Object that was used for storing the cache Object.public TLcdAIXM51FeatureMetadataProperty getFeatureMetadata()
featureMetadata
element.FEATURE_METADATA_PROPERTY
property.public void setFeatureMetadata(TLcdAIXM51FeatureMetadataProperty aValue)
featureMetadata
element.aValue
- the value to set for the FEATURE_METADATA_PROPERTY
property.public TLcdGML32BoundingShape getBoundedBy()
boundedBy
element.
This property describes the minimum bounding box or rectangle that encloses the entire feature.
BOUNDED_BY_PROPERTY
property.public void setBoundedBy(TLcdGML32BoundingShape aValue)
boundedBy
element.
This property describes the minimum bounding box or rectangle that encloses the entire feature.
aValue
- the value to set for the BOUNDED_BY_PROPERTY
property.public Object getLocation()
location
element.LOCATION_PROPERTY
property.TLcdGML32LocationProperty
public void setLocation(Object aValue)
location
element.aValue
- the value to set for the LOCATION_PROPERTY
property.