public class TLcdKML22Kml extends TLcdDataObject implements ILcdModelTreeNode, ILcd2DBoundsIndexedModel, ILcdIntegerIndexedModel, ILcdCache, ReadWriteLock
This class is the root model of each decoded KML file.
This model is purely static, meaning that network links won't be resolved. A network link will be available in the model hierarchy as an empty model.
Dynamic contents of KML models can be enabled by wrapping this model into a TLcdKML22DynamicModel
.
ILcdModel.Query
Modifier and Type | Field and Description |
---|---|
static TLcdDataProperty |
ABSTRACT_FEATURE_GROUP_PROPERTY
Data property that maps to the
AbstractFeatureGroup element. |
static TLcdDataProperty |
HINT_PROPERTY
Data property that maps to the
hint attribute. |
static TLcdDataProperty |
KML_OBJECT_EXTENSION_GROUP_PROPERTY
Data property that maps to the
KmlObjectExtensionGroup element. |
static TLcdDataProperty |
KML_SIMPLE_EXTENSION_GROUP_PROPERTY
Data property that maps to the
KmlSimpleExtensionGroup element. |
static TLcdDataProperty |
NETWORK_LINK_CONTROL_PROPERTY
Data property that maps to the
NetworkLinkControl element. |
FIRE_LATER, FIRE_NOW, NO_EVENT
Constructor and Description |
---|
TLcdKML22Kml(TLcdDataType aType)
Creates a new
TLcdKML22Kml with a custom TLcdDataType . |
Modifier and Type | Method and Description |
---|---|
void |
addElement(Object aElement,
int aEventMode)
Adds the specified element to this model.
|
void |
addElements(Vector aElements,
int aEventMode)
Adds all of the elements in the specified vector to this model.
|
void |
addHierarchyModelContainerListener(ILcdModelContainerListener aModelContainerListener)
Registers the given
ILcdModelContainerListener to receive TLcdModelContainerEvent s from all the
ILcdModelTreeNode s contained in the tree with this node as root node. |
void |
addHierarchyModelListener(ILcdModelListener aModelListener)
Registers the given
ILcdModelListener to receive
TLcdModelChangedEvent s from all the ILcdModel s contained in the tree
with this node as root node. |
boolean |
addModel(ILcdModel aModel)
Adds the
ILcdModel aModel as a child model to this
ILcdModelTreeNode . |
void |
addModelContainerListener(ILcdModelContainerListener aModelContainerListener)
Adds an
ILcdModelContainerListener to this ILcdModelContainer . |
void |
addModelListener(ILcdModelListener aModelListener)
Registers the specified model listener to receive notifications of model changes on this model.
|
int |
applyOnInteract2DBounds(ILcdBounds aBounds,
boolean aStrictOverlap,
ILcdFunction aFunctionToApply,
double aPrecisionX,
double aPrecisionY)
Applies the specified function to all the model elements of which the 2D bounds overlap with the specified bounds.
|
int |
applyOnInteract2DBounds(ILcdBounds aBounds,
boolean aStrictOverlap,
ILcdFunction aFunctionToApply,
double aPrecisionX,
double aPrecisionY,
double aMinSizeX,
double aMinSizeY,
boolean aIncludePoints)
Applies the specified function to all the elements of which the 2D bounds overlap with the specified bounds.
|
boolean |
canAddElement(Object aElement)
Returns
true if the specified element can be added to this model, false otherwise. |
boolean |
canRemoveElement(Object aElement)
Returns
true if the specified element can be removed from this model, false otherwise. |
void |
clearCache()
Clears the cache.
|
TLcdDataObject |
clone(Map aObjectDictionary)
Returns a deep clone of this object.
|
void |
dispose()
Disposes of this model and allows it to release any system resources that it is holding.
|
Object |
elementAt(int aIndex)
Returns the element at the specified index.
|
void |
elementChanged(Object aElement,
int aEventMode)
Notifies this model that the specified element has changed.
|
Enumeration |
elements()
Returns an enumeration over all elements of this model.
|
void |
elementsChanged(Vector aElements,
int aEventMode)
Notifies this model that the elements in the specified vector have changed.
|
void |
fireCollectedModelChanges()
Fires all collected model change events, without an adjustment flag
|
void |
fireCollectedModelChanges(boolean aIsAdjusting)
Fires all collected model change events, with a given adjustment flag
|
TLcdKML22AbstractFeature |
getAbstractFeatureGroup()
Returns the value of the property that maps to the
AbstractFeatureGroup element. |
ILcdBounds |
getBounds()
Returns the
ILcdBounds by which the geometry of this ILcdBounded object
is bounded. |
Object |
getCachedObject(Object aKey)
Looks up and returns the cached Object corresponding to the given key.
|
String |
getHint()
Returns the value of the property that maps to the
hint attribute. |
ILcdModel |
getModel(int aIndex)
Returns the child model at the given index.
|
ILcdModelDescriptor |
getModelDescriptor()
Returns the
ILcdModelDescriptor providing meta information about this model and
its elements. |
ILcdModelEncoder |
getModelEncoder()
Returns, if available, a model encoder that is capable of encoding this model,
(
encoder.canEncode(this) ), null otherwise. |
TLcdModelMetadata |
getModelMetadata()
Collects and returns metadata about the model.
|
ILcdModelReference |
getModelReference()
Returns the
ILcdModelReference describing how the geometry of the elements contained in this
model should be interpreted. |
TLcdKML22NetworkLinkControl |
getNetworkLinkControl()
Returns the value of the property that maps to the
NetworkLinkControl element. |
int |
indexOf(Object aObject)
Returns the index of the first occurrence of the specified element in the model, or -1 if this model does not
contain the element.
|
void |
insertIntoCache(Object aKey,
Object aObject)
Inserts a cache Object corresponding to the given key Object.
|
boolean |
isEmpty()
Returns
true when the model node is only used as a container for other models,
and contains no useful data itself, false otherwise. |
int |
modelCount()
Returns the number of child models of this model node.
|
void |
modelProduced(TLcdModelProducerEvent aModelProducerEvent)
Notifies this ILcdModelProducerListener of a produced model.
|
Enumeration |
models()
Returns an
Enumeration of the child models of this
ILcdModelTreeNode . |
Lock |
readLock() |
void |
removeAllElements(int aEventMode)
Removes all elements from this model.
|
Object |
removeCachedObject(Object aKey)
Looks up and removes the cached Object corresponding to the given key.
|
void |
removeElement(Object aElement,
int aEventMode)
Removes the specified element from this model.
|
void |
removeElements(Vector aElements,
int aEventMode)
Removes all of the elements in the specified vector from this model.
|
void |
removeHierarchyModelContainerListener(ILcdModelContainerListener aModelContainerListener)
Unregisters the given
ILcdModelContainerListener from receiving TLcdModelContainerEvent s for the tree
with this node as root node. |
void |
removeHierarchyModelListener(ILcdModelListener aModelListener)
Unregisters the given
ILcdModelListener from
receiving TLcdModelChangedEvent s for the tree with this node as root node. |
boolean |
removeModel(ILcdModel aModel)
Removes the child model
aModel from this ILcdModelTreeNode . |
void |
removeModelContainerListener(ILcdModelContainerListener aModelContainerListener)
Removes an
ILcdModelContainerListener from this ILcdModelContainer . |
void |
removeModelListener(ILcdModelListener aModelListener)
Unregisters the specified model listener so that it no longer receives notifications of model changes on this model.
|
void |
setAbstractFeatureGroup(TLcdKML22AbstractFeature aValue)
Sets the value of the property that maps to the
AbstractFeatureGroup element. |
void |
setHint(String aValue)
Sets the value of the property that maps to the
hint attribute. |
void |
setModelDescriptor(ILcdModelDescriptor aModelDescriptor)
Sets the
ILcdModelDescriptor for this TLcdKML22Kml |
void |
setModelReference(ILcdModelReference aModelReference)
Sets the
ILcdModelReference for this TLcdKML22Kml |
void |
setNetworkLinkControl(TLcdKML22NetworkLinkControl aValue)
Sets the value of the property that maps to the
NetworkLinkControl element. |
int |
size()
Returns the number of elements in this model.
|
String |
toString()
Returns a string representation of this object
|
Lock |
writeLock() |
clone, getDataType, getValue, getValue, hasValue, hasValue, setValue, setValue
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getModels
query
close
public static final TLcdDataProperty HINT_PROPERTY
hint
attribute.
The possible values for this property are instances of String
.public static final TLcdDataProperty NETWORK_LINK_CONTROL_PROPERTY
NetworkLinkControl
element.
The possible values for this property are instances of TLcdKML22NetworkLinkControl
.public static final TLcdDataProperty ABSTRACT_FEATURE_GROUP_PROPERTY
AbstractFeatureGroup
element.
The possible values for this property are instances of TLcdKML22AbstractFeature
.public static final TLcdDataProperty KML_SIMPLE_EXTENSION_GROUP_PROPERTY
KmlSimpleExtensionGroup
element.
The possible values for this property are instances of List<String>
.public static final TLcdDataProperty KML_OBJECT_EXTENSION_GROUP_PROPERTY
KmlObjectExtensionGroup
element.
The possible values for this property are instances of List<TLcdKML22AbstractObject>
.public TLcdKML22Kml(TLcdDataType aType)
TLcdKML22Kml
with a custom TLcdDataType
.aType
- a custom TLcdDataType
public void setModelDescriptor(ILcdModelDescriptor aModelDescriptor)
Sets the ILcdModelDescriptor
for this TLcdKML22Kml
aModelDescriptor
- A valid ILcdModelDescriptor
public void setModelReference(ILcdModelReference aModelReference)
Sets the ILcdModelReference
for this TLcdKML22Kml
aModelReference
- A valid ILcdModelReference
public void fireCollectedModelChanges(boolean aIsAdjusting)
Fires all collected model change events, with a given adjustment flag
aIsAdjusting
- If true, will signal that more events will follow this event. If false,
signals that this is the final event in a series of events.public ILcdModelReference getModelReference()
ILcdModelTreeNode
ILcdModelReference
describing how the geometry of the elements contained in this
model should be interpreted.
This model reference is independent of the model reference(s) of the child models of this node.
getModelReference
in interface ILcdModel
getModelReference
in interface ILcdModelTreeNode
ILcdModelReference
of this ILcdModel
.public ILcdModelDescriptor getModelDescriptor()
ILcdModelTreeNode
ILcdModelDescriptor
providing meta information about this model and
its elements.
This model descriptor is independent of the model descriptor(s) of the child models of this node.
getModelDescriptor
in interface ILcdModel
getModelDescriptor
in interface ILcdModelTreeNode
ILcdModelDescriptor
of this ILcdModel
. Should not be null
.public ILcdModelEncoder getModelEncoder()
ILcdModelTreeNode
encoder.canEncode(this)
), null
otherwise.
It is implementation-dependant whether this encoder considers the child models or not.
getModelEncoder
in interface ILcdModel
getModelEncoder
in interface ILcdModelTreeNode
null
otherwise.public TLcdModelMetadata getModelMetadata()
ILcdModel
TLcdModelMetadata
instance every time it is called.
The default implementation uses TLcdModelMetadata.Builder.fromModel(com.luciad.model.ILcdModel)
.
Implementations can recreate
or extend
the metadata.
The following example adds a data category and source file mime type:
public TLcdModelMetadata getModelMetadata() {
String source = this.getModelDescriptor().getSourceName();
return this.getModelMetadata().asBuilder()
.entryPoint(new TLcdModelMetadata.Source(source, MIME_XML))
.addDataCategory(TLcdModelMetadata.DataCategory.VECTOR)
.build();
}
getModelMetadata
in interface ILcdModel
public Enumeration elements()
ILcdModelTreeNode
The elements of the child model(s) are not included in this enumeration.
elements
in interface ILcdModel
elements
in interface ILcdModelTreeNode
public void addElement(Object aElement, int aEventMode)
ILcdModelTreeNode
Models that support this operation may place limitations on what elements may be added to this model. For example,
implementations that are based on a spatial indexing structure will require that elements implement
ILcdBounded
.
When adding an element, the user should make sure that canAddElement(aElement)
holds, and that the
element's geometry is expressed in the same model reference as this model. It is generally undefined what happens
if an invalid element is added.
Implementations of this interface should clearly specify in their documentation any restrictions on what elements
may be added. Although it is unspecified what happens if the preconditions are not met, implementations are
encouraged to throw meaningful exceptions (for example, NullPointerException, IllegalArgumentException,
ClassCastException, UnsupportedOperationException
), whenever possible.
The element will only be added to this model node and not to any of the child model(s).
addElement
in interface ILcdModel
addElement
in interface ILcdModelTreeNode
aElement
- the element to be added to this model.aEventMode
- the mode for sending out the model change event. This can be FIRE_LATER
or NO_EVENT
.ILcdModel.canAddElement(Object)
public boolean canAddElement(Object aElement)
ILcdModelTreeNode
true
if the specified element can be added to this model, false
otherwise.
Note that this method generally does not validate whether the specified element is expressed in the same model reference as this model. It is the responsibility of the user of this model to make sure this precondition is fulfilled when an element is added to this model.
This method only checks this model node and not any of the child models.
canAddElement
in interface ILcdModel
canAddElement
in interface ILcdModelTreeNode
aElement
- the element to be verified.true
if the specified element can be added to this model, false
otherwise.public void addElements(Vector aElements, int aEventMode)
ILcdModelTreeNode
ILcdBounded
. Implementations of this interface should clearly specify in their documentation any
restrictions on what elements may be added.
The behavior of this operation is undefined if the specified vector is modified while the operation is in progress.
The specified elements will be added to this model in the order they are specified in the vector. If an element cannot be added, this method will return at the first failure. Succeeding elements won't be added.
Although it is unspecified what happens if the preconditions are not met, implementations are encouraged to
throw meaningful exceptions (for example, NullPointerException, IllegalArgumentException, ClassCastException,
UnsupportedOperationException
), whenever possible.
The elements will only be added to this model node and not to any of the child model(s).
addElements
in interface ILcdModel
addElements
in interface ILcdModelTreeNode
aElements
- the vector of elements to be added to this model.aEventMode
- the mode for sending the model change events This can be FIRE_LATER
or NO_EVENT
.ILcdModel.canAddElement(Object)
public void removeElement(Object aElement, int aEventMode)
ILcdModelTreeNode
Although it is unspecified what happens if the preconditions are not met, implementations are encouraged to
throw meaningful exceptions (for example, NullPointerException, IllegalArgumentException, ClassCastException,
UnsupportedOperationException
), whenever possible.
The element will not be removed from the child model(s).
removeElement
in interface ILcdModel
removeElement
in interface ILcdModelTreeNode
aElement
- the element to be removed from this model.aEventMode
- the mode for sending out the model change event. This can be FIRE_LATER
or NO_EVENT
.ILcdModel.canRemoveElement(Object)
public boolean canRemoveElement(Object aElement)
ILcdModelTreeNode
true
if the specified element can be removed from this model, false
otherwise.
Note that this method generally does not check whether the specified element is actually contained in this model.
This method will only check this model node and not any of the child models.
canRemoveElement
in interface ILcdModel
canRemoveElement
in interface ILcdModelTreeNode
aElement
- the element to be verified.true
if the specified element can be removed from this model, false
otherwise.public void removeElements(Vector aElements, int aEventMode)
ILcdModelTreeNode
The behavior of this operation is undefined if the specified vector is modified while the operation is in progress.
The specified elements will be removed from this model in the order they are specified in the vector. If an element cannot be removed, this method will return at the first failure. Succeeding elements won't be removed.
Although it is unspecified what happens if the preconditions are not met, implementations are encouraged to
throw meaningful exceptions (for example, NullPointerException, IllegalArgumentException, ClassCastException,
UnsupportedOperationException
), whenever possible.
The elements will not be removed from the child model(s).
removeElements
in interface ILcdModel
removeElements
in interface ILcdModelTreeNode
aElements
- the vector of elements to be removed from this model.aEventMode
- the mode for sending out the model change event. This can be FIRE_LATER
or NO_EVENT
.ILcdModel.canRemoveElement(Object)
public void removeAllElements(int aEventMode)
ILcdModelTreeNode
If an element cannot be removed, this method will return at the first failure. Succeeding elements won't be removed.
Although it is unspecified what happens if the preconditions are not met, implementations are encouraged to
throw meaningful exceptions (for example, NullPointerException, IllegalArgumentException, ClassCastException,
UnsupportedOperationException
), whenever possible.
It will not remove any elements from any of the child models.
removeAllElements
in interface ILcdModel
removeAllElements
in interface ILcdModelTreeNode
aEventMode
- the mode for sending out the model change event. This can be FIRE_LATER
or NO_EVENT
.public void elementChanged(Object aElement, int aEventMode)
ILcdModelTreeNode
When an element in one the child models has changed, this method must be called on that child model and not on this node.
elementChanged
in interface ILcdModel
elementChanged
in interface ILcdModelTreeNode
aElement
- the element that has changed.aEventMode
- the mode for sending out the model change event. This can be FIRE_LATER
or NO_EVENT
.public void elementsChanged(Vector aElements, int aEventMode)
ILcdModelTreeNode
When elements of one of the child models have changed, this method must be called on that child model and not on this node.
elementsChanged
in interface ILcdModel
elementsChanged
in interface ILcdModelTreeNode
aElements
- the vector of elements that have changed.aEventMode
- the mode for sending out the model change event. This can be FIRE_LATER
or NO_EVENT
.public void fireCollectedModelChanges()
Fires all collected model change events, without an adjustment flag
Calling this method is like calling fireCollectedModelChanges(false)
fireCollectedModelChanges
in interface ILcdModel
fireCollectedModelChanges
in interface ILcdModelTreeNode
fireCollectedModelChanges(boolean)
public void addModelListener(ILcdModelListener aModelListener)
ILcdModelTreeNode
Registers the specified model listener to receive notifications of model changes on this model.
Model changes are sent out when an element has been added, removed or changed. Model changes can be sent out
individually, grouped or silently applied without notifications, depending on the ILcdFireEventMode
that was specified with the change.
In case you need to register a listener which keeps a reference to an object with a shorter life-time than this model,
you can use a ALcdWeakModelListener
instance as model listener.
The model listener will not receive any notifications of model changes in any of the child
models. If the listener should also receive notifications about changes in the child models, it
should be registered as a hierarchy listener (see ILcdModelTreeNode.addHierarchyModelListener(ILcdModelListener)
).
addModelListener
in interface ILcdModel
addModelListener
in interface ILcdModelTreeNode
aModelListener
- the ILcdModelListener
to register on this model.ILcdModel.removeModelListener(com.luciad.model.ILcdModelListener)
,
ILcdModelListener
public void removeModelListener(ILcdModelListener aModelListener)
ILcdModelTreeNode
It is not possible to unregister hierarchy model listeners with this method. Use ILcdModelTreeNode.removeHierarchyModelListener(ILcdModelListener)
for this purpose.
removeModelListener
in interface ILcdModel
removeModelListener
in interface ILcdModelTreeNode
aModelListener
- the ILcdModelListener
to remove.ILcdModel.addModelListener(com.luciad.model.ILcdModelListener)
,
ILcdModelListener
public void dispose()
ILcdModelTreeNode
finalize
) on this model subsequent to a call to
this method is undefined.
Calling this method will not dispose any of the child models, or alter the hierarchical structure. If the child models should also be disposed, this method should be called on those models.
dispose
in interface ILcdModel
dispose
in interface ILcdModelTreeNode
dispose
in interface ILcdDisposable
public int size()
ILcdIntegerIndexedModel
size
in interface ILcdIntegerIndexedModel
public Object elementAt(int aIndex)
ILcdIntegerIndexedModel
elementAt
in interface ILcdIntegerIndexedModel
aIndex
- an index into this ILcdModel
.public int indexOf(Object aObject)
ILcdIntegerIndexedModel
i
for which this.elementAt(i).equals(aElement)
.indexOf
in interface ILcdIntegerIndexedModel
aObject
- the element to search for.public int applyOnInteract2DBounds(ILcdBounds aBounds, boolean aStrictOverlap, ILcdFunction aFunctionToApply, double aPrecisionX, double aPrecisionY)
ILcd2DBoundsIndexedModel
false
.applyOnInteract2DBounds
in interface ILcd2DBoundsIndexedModel
aBounds
- the rectangle to test overlap with.aStrictOverlap
- if false
, the spatial search may return more elements than the ones strictly
overlapping; if true
, the search only returns the elements that are
overlapping. The latter mode is more precise, but it may be slower.aFunctionToApply
- the function to apply on each element that overlaps with the given bounds.
The return value of the specified function is used as a stop criterion: the spatial query is interrupted
if the function returns false
.aPrecisionX
- the precision required in the x dimension, expressed in model units.
For example, for a cartesian grid system expressed in meters, the values
should be expressed in meters as well, for a geodetic coordinate system the accuracy
values should be expressed in degrees.
The precision is useful in combination with multi-leveled data (multiple representations of the same object, but with varying accuracy), so that the most appropriate accuracy level can be used. 0 means best possible accuracy, but it might trigger lazy-loaded implementations to load lots of data.
aPrecisionY
- the precision required in the y dimension, expressed in model units.ILcdFunction
has been applied.public int applyOnInteract2DBounds(ILcdBounds aBounds, boolean aStrictOverlap, ILcdFunction aFunctionToApply, double aPrecisionX, double aPrecisionY, double aMinSizeX, double aMinSizeY, boolean aIncludePoints)
ILcd2DBoundsInteractable
false
for an element it was applied on.applyOnInteract2DBounds
in interface ILcd2DBoundsIndexedModel
applyOnInteract2DBounds
in interface ILcd2DBoundsInteractable
aBounds
- the rectangle to test overlap with.aStrictOverlap
- if false
, the spatial search may return more elements than the ones strictly
overlapping; if true
, the search only returns the elements that are
overlapping. The latter mode is more precise, but it may be slower.aFunctionToApply
- the function to apply on each element that overlaps with the given bounds.aPrecisionX
- the precision required in the x dimension, expressed in model units.
For example, for a cartesian grid system expressed in meters, the values
should be expressed in meters as well, for a geodetic coordinate system the accuracy
values should be expressed in degrees.
The precision is useful in combination with multi-leveled data (multiple representations of the same object, but with varying accuracy), so that the most appropriate accuracy level can be used. 0 means best possible accuracy, but it might trigger lazy-loaded implementations to load lots of data.
aPrecisionY
- the precision required in the y dimension, expressed in model units.aMinSizeX
- the minimal element size in the x dimension (as in
ILcdBounds.getWidth()
), expressed in model units.
Elements that are smaller than this size will be skipped. This may, for example, be
useful when improving the efficiency of painting elements by skipping elements
that are smaller than some threshold (e.g. one pixel, converted to model units).aMinSizeY
- the minimal element size in the y dimension (as in
ILcdBounds.getHeight()
), expressed in model units.aIncludePoints
- if true
, zero-sized elements (points) are considered as well, even though they
might be smaller than the minimum size.ILcdFunction
has been applied.public ILcdBounds getBounds()
ILcdBounded
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.
If the geometry does not allow retrieving valid bounds (for example a polyline with 0 points)
the return value is unspecified.
It is highly recommended to return an undefined
bounds.
You can create undefined bounds using the default constructors
of TLcdLonLatBounds
or TLcdXYBounds
.
getBounds
in interface ILcdBounded
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.public void modelProduced(TLcdModelProducerEvent aModelProducerEvent)
ILcdModelProducerListener
modelProduced
in interface ILcdModelProducerListener
aModelProducerEvent
- the event describing the changes to a ILcdModelProducer
.public int modelCount()
ILcdModelTreeNode
Returns the number of child models of this model node.
modelCount
in interface ILcdModelContainer
modelCount
in interface ILcdModelTreeNode
public boolean addModel(ILcdModel aModel)
ILcdModelTreeNode
Adds the ILcdModel aModel
as a child model to this
ILcdModelTreeNode
.
addModel
in interface ILcdModelContainer
addModel
in interface ILcdModelTreeNode
aModel
- the model to be added.true
if this collection of models changed as a result of the callpublic boolean removeModel(ILcdModel aModel)
ILcdModelTreeNode
Removes the child model aModel
from this ILcdModelTreeNode
.
removeModel
in interface ILcdModelContainer
removeModel
in interface ILcdModelTreeNode
aModel
- the model to be removed.true
if a model was removed as a result of this callpublic ILcdModel getModel(int aIndex)
ILcdModelTreeNode
Returns the child model at the given index.
getModel
in interface ILcdModelContainer
getModel
in interface ILcdModelTreeNode
aIndex
- a valid index in this ILcdModelTreeNode
public Enumeration models()
ILcdModelTreeNode
Returns an Enumeration
of the child models of this
ILcdModelTreeNode
.
models
in interface ILcdModelContainer
models
in interface ILcdModelTreeNode
Enumeration
of the child models of this ILcdModelTreeNode
.public void addModelContainerListener(ILcdModelContainerListener aModelContainerListener)
ILcdModelTreeNode
ILcdModelContainerListener
to this ILcdModelContainer
.
It will only receive notifications of changes in this ILcdModelTreeNode
and not
of any changes in the state of the child model node(s). If this is required, the listener must
be registered as a hierarchy listener (see ILcdModelTreeNode.addHierarchyModelContainerListener(ILcdModelContainerListener)
).
addModelContainerListener
in interface ILcdModelContainer
addModelContainerListener
in interface ILcdModelTreeNode
aModelContainerListener
- the listener to be added.ILcdModelContainer.removeModelContainerListener(com.luciad.model.ILcdModelContainerListener)
public void removeModelContainerListener(ILcdModelContainerListener aModelContainerListener)
ILcdModelTreeNode
ILcdModelContainerListener
from this ILcdModelContainer
.
It is not possible to remove a hierarchy model container listener. Use ILcdModelTreeNode.removeHierarchyModelContainerListener(ILcdModelContainerListener)
for this purpose.
removeModelContainerListener
in interface ILcdModelContainer
removeModelContainerListener
in interface ILcdModelTreeNode
aModelContainerListener
- the listener to be removed.ILcdModelContainer.addModelContainerListener(com.luciad.model.ILcdModelContainerListener)
public boolean isEmpty()
ILcdModelTreeNode
Returns true
when the model node is only used as a container for other models,
and contains no useful data itself, false
otherwise.
isEmpty
in interface ILcdModelTreeNode
true
when the model node contains no useful data, false
otherwisepublic void addHierarchyModelContainerListener(ILcdModelContainerListener aModelContainerListener)
ILcdModelTreeNode
Registers the given ILcdModelContainerListener
to receive TLcdModelContainerEvent
s from all the
ILcdModelTreeNode
s contained in the tree with this node as root node. If the
listener should only receive events originating from this model node, it should be adedd as a
regular model listener (see ILcdModelTreeNode.addModelContainerListener(ILcdModelContainerListener)
).
The source ILcdModelContainer
of the event can be retrieved by calling TLcdModelContainerEvent.getModelContainer()
on the received TLcdModelContainerEvent
.
addHierarchyModelContainerListener
in interface ILcdModelTreeNode
aModelContainerListener
- the listenerILcdModelTreeNode.removeHierarchyModelContainerListener(ILcdModelContainerListener)
public void removeHierarchyModelContainerListener(ILcdModelContainerListener aModelContainerListener)
ILcdModelTreeNode
Unregisters the given ILcdModelContainerListener
from receiving TLcdModelContainerEvent
s for the tree
with this node as root node.
removeHierarchyModelContainerListener
in interface ILcdModelTreeNode
aModelContainerListener
- the listenerILcdModelTreeNode.addHierarchyModelContainerListener(ILcdModelContainerListener)
public void addHierarchyModelListener(ILcdModelListener aModelListener)
ILcdModelTreeNode
Registers the given ILcdModelListener
to receive
TLcdModelChangedEvent
s from all the ILcdModel
s contained in the tree
with this node as root node. If the listener should only receive events originating from this
model node, it should be added as a regular model listener (see ILcdModelTreeNode.addModelListener(ILcdModelListener)
).
The source ILcdModel
of the event can be retrieved by calling TLcdModelChangedEvent.getModel()
on the received TLcdModelChangedEvent
.
addHierarchyModelListener
in interface ILcdModelTreeNode
aModelListener
- the listenerILcdModelTreeNode.removeHierarchyModelListener(ILcdModelListener)
public void removeHierarchyModelListener(ILcdModelListener aModelListener)
ILcdModelTreeNode
Unregisters the given ILcdModelListener
from
receiving TLcdModelChangedEvent
s for the tree with this node as root node.
removeHierarchyModelListener
in interface ILcdModelTreeNode
aModelListener
- the listenerILcdModelTreeNode.addHierarchyModelListener(ILcdModelListener)
public void insertIntoCache(Object aKey, Object aObject)
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, ...)
.aObject
- the Object to be cached.public Object getCachedObject(Object aKey)
ILcdCache
getCachedObject
in interface ILcdCache
aKey
- the key Object that was used for storing the cache Object.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 Lock readLock()
readLock
in interface ReadWriteLock
public Lock writeLock()
writeLock
in interface ReadWriteLock
public String toString()
Returns a string representation of this object
toString
in class TLcdDataObject
ILcdModelDescriptor
, or super.toString() if
no model descriptor was set.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 TLcdDataObject
aObjectDictionary
- the Object dictionary that keeps track of the objects for which a clone has already been made,
and their corresponding clone Object.public String getHint()
hint
attribute.HINT_PROPERTY
property.public void setHint(String aValue)
hint
attribute.aValue
- the value to set for the HINT_PROPERTY
property.public TLcdKML22NetworkLinkControl getNetworkLinkControl()
NetworkLinkControl
element.NETWORK_LINK_CONTROL_PROPERTY
property.public void setNetworkLinkControl(TLcdKML22NetworkLinkControl aValue)
NetworkLinkControl
element.aValue
- the value to set for the NETWORK_LINK_CONTROL_PROPERTY
property.public TLcdKML22AbstractFeature getAbstractFeatureGroup()
AbstractFeatureGroup
element.ABSTRACT_FEATURE_GROUP_PROPERTY
property.public void setAbstractFeatureGroup(TLcdKML22AbstractFeature aValue)
AbstractFeatureGroup
element.aValue
- the value to set for the ABSTRACT_FEATURE_GROUP_PROPERTY
property.