Package com.luciad.model
Interface ILcdFeatureIndexedModel
- All Superinterfaces:
AutoCloseable,ILcdDisposable,ILcdModel,Serializable
- All Known Subinterfaces:
ILcdFeatureIndexedAnd2DBoundsIndexedModel
- All Known Implementing Classes:
TLcdFeatureIndexedAnd2DBoundsIndexedModel,TLcdFeatureIndexedVectorModel
Deprecated.
An
ILcdModel whose elements can be retrieved via a feature value-based index.
First an index on a certain set of features must be created in order to have efficient access to the model
elements using these features. After adding an index, elements can be retrieved using a set of values for the
features specified in the index.
Two types of indices are supported:
- unique indices: each combination of feature values in the index is unique.
- non-unique indices: a combination of feature values can exist more than once in the index.
ILcdFeatured interface) and which additional constraints they impose on the model (for example, have a model
descriptor that implements ILcdFeaturedModelDescriptor).- Since:
- 6.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.luciad.model.ILcdModel
ILcdModel.Query -
Field Summary
Fields inherited from interface com.luciad.model.ILcdModel
FIRE_LATER, FIRE_NOW, NO_EVENT -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.Creates an index based on a set of feature names.booleancanAddIndex(List aFeatureNames, boolean aIsUniqueIndex) Deprecated.Returns whether a useful index can be created for the given list of feature names.voidremoveIndex(List aFeatureNames) Deprecated.Removes an index from the model.retrieveByIndex(List aFeatureNames, List aFeatureValues) Deprecated.Returns aVectorcontaining all the model elements that haveaFeatureValuesas value for the index defined byaFeatureNames.retrieveByUniqueIndex(List aFeatureNames, List aFeatureValues) Deprecated.Returns a single model element that has aFeatureValues as values for the index defined by aFeatureNames.Methods inherited from interface com.luciad.util.ILcdDisposable
closeMethods inherited from interface com.luciad.model.ILcdModel
addElement, addElements, addModelListener, canAddElement, canRemoveElement, dispose, elementChanged, elements, elementsChanged, fireCollectedModelChanges, getModelDescriptor, getModelEncoder, getModelMetadata, getModelReference, query, removeAllElements, removeElement, removeElements, removeModelListener
-
Method Details
-
addIndex
Deprecated.Creates an index based on a set of feature names. All elements already contained in the model will be added to the new index; elements which are added after the index has been created, will be added automatically to all indices that have been created already. Note that each index consumes memory and it is advisable to keep the number of indices to a minimum. When an index is added that exists already (same names, same order), no new index is created.- Parameters:
aFeatureNames- theListof feature names defining the index to be created.aUniqueIndex- a boolean indicating whether the features used in this index form a unique key for the model elements (this means that for each element the set of feature values foraFeatureNamesis unique in the model). If a unique index is created on a non-unique feature, only one element per feature value is stored in the index.- Throws:
NullPointerException- if aFeatureNames or one of its elements isnull.}.
-
retrieveByIndex
Deprecated.Returns aVectorcontaining all the model elements that haveaFeatureValuesas value for the index defined byaFeatureNames. Can returnnullif there is no match.- Parameters:
aFeatureNames- aListof feature names defining the index to be used.aFeatureValues- aListof feature values that should match with the values of the elements to be retrieved.- Returns:
- a Vector with zero or more matching elements, or
nullif there is no match - Throws:
IllegalArgumentException- if no index was added foraFeatureNames.NullPointerException- ifaFeatureNames == null || aFeatureValues == nullor one of the feature names isnull.
-
retrieveByUniqueIndex
Deprecated.Returns a single model element that has aFeatureValues as values for the index defined by aFeatureNames. This method should only be used for indices create withaUniqueIndex == true.- Parameters:
aFeatureNames- aListof feature names defining the index to be used.aFeatureValues- aListof feature values that should match with the values of the elements to be retrieved.- Returns:
- A single model element that has
aFeatureValuesas values for the index defined byaFeatureNames, ornullif no such element exist in this model. - Throws:
IllegalArgumentException- if no index was added foraFeatureNames, or if the index was created as a non-unique index.NullPointerException- ifaFeatureNames == null || aFeatureValues == nullor one of the feature names isnull.
-
removeIndex
Deprecated.Removes an index from the model. If the specified index does not exist in this model, this method has no effect.- Parameters:
aFeatureNames- aListof feature names defining the index to be removed.- Throws:
NullPointerException- if aFeatureNames or one of its elements isnull.
-
canAddIndex
Deprecated.Returns whether a useful index can be created for the given list of feature names. Implementations should specify in their documentation which restrictions are placed on the indices they accept.- Parameters:
aFeatureNames- aListof feature names defining the index to be validated.aIsUniqueIndex- a boolean indicating whether the features used in this index form a unique key for the model elements.- Returns:
trueif a useful index can be created for the given list of feature names,falseotherwise.
-
ILcdFeaturedinterface has been deprecated in favor ofILcdDataObjectandTLcdDataModel.