com.luciad.format.gml2.xml
, com.luciad.format.gml31.xml
and
com.luciad.format.gml32.xml
.public class TLcdGMLModelList extends Object implements ILcdModel
ILcdModel
used to represent a subset of a
complete data set, such that only the selected subset will be exported by
the GML model encoder.
TLcdGMLModelList
contains the following items for each feature type:
ILcdModel
containing all the features of the given type;
ILcdGMLFeatureIDRetriever
for features of the given type;
ILcdModel.Query
FIRE_LATER, FIRE_NOW, NO_EVENT
Constructor and Description |
---|
TLcdGMLModelList()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addElement(Object o,
int i)
Deprecated.
Adds the specified element to this model.
|
void |
addElements(Vector vector,
int i)
Deprecated.
Adds all of the elements in the specified vector to this model.
|
void |
addFeatureType(String aTypeName,
ILcdModel aModel,
ILcdGMLFeatureIDRetriever aFeatureIDRetriever,
int[] aPropertyIndices)
Deprecated.
Adds features of a given type to this model list.
|
void |
addModelListener(ILcdModelListener aModelListener)
Deprecated.
Registers the specified model listener to receive notifications of model changes on this model.
|
boolean |
canAddElement(Object o)
Deprecated.
Returns
true if the specified element can be added to this model, false otherwise. |
boolean |
canRemoveElement(Object o)
Deprecated.
Returns
true if the specified element can be removed from this model, false otherwise. |
void |
dispose()
Deprecated.
Disposes of this model and allows it to release any system resources that it is holding.
|
void |
elementChanged(Object o,
int i)
Deprecated.
Notifies this model that the specified element has changed.
|
Enumeration |
elements()
Deprecated.
Returns an enumeration over all elements of this model.
|
void |
elementsChanged(Vector vector,
int i)
Deprecated.
Notifies this model that the elements in the specified vector have changed.
|
void |
fireCollectedModelChanges()
Deprecated.
Notifies all listeners that are registered on this model of all the changes that have been collected between the
previous notification and now.
|
ILcdGMLFeatureIDRetriever |
getFeatureIDRetriever(int aFeatureTypeIndex)
Deprecated.
Returns the feature ID retriever of the given submodel.
|
int |
getFeatureTypeCount()
Deprecated.
Returns the number of feature types described by this
TLcdGMLModelList . |
String |
getFeatureTypeName(int aFeatureTypeIndex)
Deprecated.
Returns the feature type name of the given submodel.
|
ILcdModel |
getModel(int aFeatureTypeIndex)
Deprecated.
Returns the submodel at the given index.
|
ILcdModelDescriptor |
getModelDescriptor()
Deprecated.
Returns the
ILcdModelDescriptor providing meta information about this model and
its elements. |
ILcdModelEncoder |
getModelEncoder()
Deprecated.
Returns, if available, a model encoder that is capable of encoding this model,
(
encoder.canEncode(this) ), null otherwise. |
ILcdModelReference |
getModelReference()
Deprecated.
Returns the model reference of the first submodel, or null if there are no submodels.
|
int[] |
getSelectedPropertyIndices(int aFeatureTypeIndex)
Deprecated.
Returns the selected property indices of the given submodel.
|
void |
removeAllElements(int i)
Deprecated.
Removes all elements from this model.
|
void |
removeElement(Object o,
int i)
Deprecated.
Removes the specified element from this model.
|
void |
removeElements(Vector vector,
int i)
Deprecated.
Removes all of the elements in the specified vector from this model.
|
void |
removeModelListener(ILcdModelListener aModelListener)
Deprecated.
Unregisters the specified model listener so that it no longer receives notifications of model changes on this model.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
all, filter, getModelMetadata, query
close
public int getFeatureTypeCount()
TLcdGMLModelList
.TLcdGMLModelList
.public void addFeatureType(String aTypeName, ILcdModel aModel, ILcdGMLFeatureIDRetriever aFeatureIDRetriever, int[] aPropertyIndices)
aTypeName
- The name of the GML feature type being added.aModel
- An ILcdModel
containing domain objects of the given feature type.aFeatureIDRetriever
- An ILcdGMLFeatureIDRetriever
for the given feature type.aPropertyIndices
- An array specifying the indices of the properties that should be retained for the given feature type.public String getFeatureTypeName(int aFeatureTypeIndex) throws IndexOutOfBoundsException
aFeatureTypeIndex
- The index of a submodel.IndexOutOfBoundsException
public ILcdModel getModel(int aFeatureTypeIndex) throws IndexOutOfBoundsException
aFeatureTypeIndex
- The index of a submodel.ILcdModel
.IndexOutOfBoundsException
public ILcdGMLFeatureIDRetriever getFeatureIDRetriever(int aFeatureTypeIndex) throws IndexOutOfBoundsException
aFeatureTypeIndex
- The index of a submodel.ILcdGMLFeatureIDRetriever
.IndexOutOfBoundsException
public int[] getSelectedPropertyIndices(int aFeatureTypeIndex) throws IndexOutOfBoundsException
aFeatureTypeIndex
- The index of a submodel.IndexOutOfBoundsException
public ILcdModelReference getModelReference()
getModelReference
in interface ILcdModel
public ILcdModelDescriptor getModelDescriptor()
ILcdModel
ILcdModelDescriptor
providing meta information about this model and
its elements.getModelDescriptor
in interface ILcdModel
ILcdModelDescriptor
of this ILcdModel
. Should not be null
.public ILcdModelEncoder getModelEncoder()
ILcdModel
encoder.canEncode(this)
), null
otherwise.getModelEncoder
in interface ILcdModel
null
otherwise.public Enumeration elements()
ILcdModel
public void addElement(Object o, int i) throws IllegalArgumentException
ILcdModel
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.
addElement
in interface ILcdModel
o
- the element to be added to this model.i
- the mode for sending out the model change event. This can be FIRE_LATER
or NO_EVENT
.IllegalArgumentException
ILcdModel.canAddElement(Object)
public boolean canAddElement(Object o)
ILcdModel
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.
canAddElement
in interface ILcdModel
o
- the element to be verified.true
if the specified element can be added to this model, false
otherwise.public void addElements(Vector vector, int i)
ILcdModel
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.
addElements
in interface ILcdModel
vector
- the vector of elements to be added to this model.i
- the mode for sending the model change events This can be FIRE_LATER
or NO_EVENT
.ILcdModel.canAddElement(Object)
public void removeElement(Object o, int i) throws IllegalArgumentException
ILcdModel
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.
removeElement
in interface ILcdModel
o
- the element to be removed from this model.i
- the mode for sending out the model change event. This can be FIRE_LATER
or NO_EVENT
.IllegalArgumentException
ILcdModel.canRemoveElement(Object)
public boolean canRemoveElement(Object o)
ILcdModel
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.canRemoveElement
in interface ILcdModel
o
- the element to be verified.true
if the specified element can be removed from this model, false
otherwise.public void removeElements(Vector vector, int i)
ILcdModel
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.
removeElements
in interface ILcdModel
vector
- the vector of elements to be removed from this model.i
- the mode for sending out the model change event. This can be FIRE_LATER
or NO_EVENT
.ILcdModel.canRemoveElement(Object)
public void removeAllElements(int i)
ILcdModel
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.
removeAllElements
in interface ILcdModel
i
- the mode for sending out the model change event. This can be FIRE_LATER
or NO_EVENT
.public void elementChanged(Object o, int i)
ILcdModel
elementChanged
in interface ILcdModel
o
- the element that has changed.i
- the mode for sending out the model change event. This can be FIRE_LATER
or NO_EVENT
.public void elementsChanged(Vector vector, int i)
ILcdModel
elementsChanged
in interface ILcdModel
vector
- the vector of elements that have changed.i
- the mode for sending out the model change event. This can be FIRE_LATER
or NO_EVENT
.public void fireCollectedModelChanges()
ILcdModel
fireCollectedModelChanges
in interface ILcdModel
ILcdModelListener.modelChanged(TLcdModelChangedEvent)
public void addModelListener(ILcdModelListener aModelListener)
ILcdModel
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.
addModelListener
in interface ILcdModel
aModelListener
- the ILcdModelListener
to register on this model.ILcdModel.removeModelListener(com.luciad.model.ILcdModelListener)
,
ILcdModelListener
public void removeModelListener(ILcdModelListener aModelListener)
ILcdModel
removeModelListener
in interface ILcdModel
aModelListener
- the ILcdModelListener
to remove.ILcdModel.addModelListener(com.luciad.model.ILcdModelListener)
,
ILcdModelListener
public void dispose()
ILcdModel
finalize
) on this model subsequent to a call to
this method is undefined.dispose
in interface ILcdModel
dispose
in interface ILcdDisposable