Package com.luciad.layers.features
Class FeatureQueryConfiguration
java.lang.Object
com.luciad.layers.features.FeatureQueryConfiguration
- All Implemented Interfaces:
AutoCloseable
The
FeatureQueryConfiguration
specifies which conditions to use for feature querying based on the map's current scale.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Builder
for theFeatureQueryConfiguration
class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected void
finalize()
getCondition
(long scaleLevel) Returns the model query condition at a certain scale level, ornull
if no condition is set for this scale level i.e.Returns the scales at which the model query condition changes, ordered from zoomed out to zoomed in.long
Returns the scale level count.Returns a new builder for creating aFeatureQueryConfiguration
.
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
newBuilder
Returns a new builder for creating aFeatureQueryConfiguration
.- Returns:
- a new builder for creating a
FeatureQueryConfiguration
.
-
getScaleBreaks
Returns the scales at which the model query condition changes, ordered from zoomed out to zoomed in.This set contains every min or max scale that was passed to the builder through
FeatureQueryConfiguration.Builder#addCondition
once. The valuesMapScale#maxZoomedOut()
orMapScale#maxZoomedIn()
are an exception and will never be contained in this set, as these values are considered to be the bounds of valid scale values and therefore not an actual scale break.Scale breaks define the borders of the defined scale levels. This means that there is one more scale level than there are scale breaks. Imagine for example that 3 scale levels were added:
- [MaxZoomedOut, scaleBreak1] -> condition1
- [scaleBreak1, scaleBreak2] -> condition2
- [scaleBreak2, MaxZoomedIn] -> condition3
These 3 scale levels correspond with:
- 2 scale breaks, returned by this method: {scaleBreak1, scaleBreak2}
- 3 conditions, returned by the
FeatureQueryConfiguration#getCondition
method: {condition1, condition2, condition3}
- Returns:
- the scales at which the model query condition changes, ordered from zoomed out to zoomed in.
-
getCondition
Returns the model query condition at a certain scale level, ornull
if no condition is set for this scale level i.e.all features are selected.
- Parameters:
scaleLevel
- the desired scale level to retrieve the condition for. This value must be smaller than the count returned byFeatureQueryConfiguration#getScaleLevelCount
. If not, an exception is thrown.- Returns:
- the model query condition at a certain scale level, or
null
if no condition is set for this scale level i.e. all features are selected. - Throws:
IllegalArgumentException
- If scaleLevel parameter is greater or equal than the scale level count.- See Also:
-
getScaleLevelCount
public long getScaleLevelCount()Returns the scale level count.This is the number of scale breaks + 1.
- Returns:
- the scale level count.
- See Also:
-