Package ucar.unidata.data
Class DataSelection
java.lang.Object
ucar.unidata.data.DataSelection
A class that represents some selection of data.
- Author:
- IDV Development Team
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DataSelection
Null DataSelectionstatic final String
status templatestatic final String
chooser time matching propertystatic final String
Flag to use any times set elsewherestatic final String
Property for selected levelsstatic final String
view manager - used for time/region matchingstatic final String
region optionstatic final String
progressive resolutionstatic final String
region optionstatic final String
as time subset selectionstatic final String
region optionstatic final String
region optionstatic final String
region optionstatic final String
status templatestatic final int
Flag to use any times set elsewherestatic final int
Flag to use any times set here -
Constructor Summary
ConstructorsConstructorDescriptionConstruct aDataSelection
.DataSelection
(boolean setDefaults) Construct aDataSelection
.DataSelection
(int zStride) ctorDataSelection
(int xStride, int yStride, int zStride) ctorDataSelection
(Object fromLevel, Object toLevel) ctorDataSelection
(List times) Construct aDataSelection
with a list of times.DataSelection
(List times, int timesMode) Construct aDataSelection
with a list of times and a particular times mode.DataSelection
(DataSelection that) Construct aDataSelection
from another instance. -
Method Summary
Modifier and TypeMethodDescriptioncloneMe()
Method for creating a clone of this DataSelectionboolean
See if the Object in question is equal to this DataSelection.Get the FromLevel property.Get the GeoSelection property.getGeoSelection
(boolean createIfNeeded) Get the GeoSelection property.Get the Properties property.getProperty
(Object key) get the propertyboolean
getProperty
(String name, boolean dflt) Get the named boolean propertygetProperty
(String name, String dflt) Get the named object propertyGet the TimeDriverTimes property.getTimes()
Get the list of times held by this DataSelectionint
Get the times mode.Get the ToLevel property.boolean
Determine whether we should use the times from this DataSelection or not.int
hashCode()
Get the hash code for this DataSelectionboolean
hasTimes()
Check whether this DataSelection has a time selection or not.static DataSelection
merge
(DataSelection higherPriority, DataSelection lowerPriority) If either of the params are null then simply return the other one.void
putProperty
(Object key, Object value) put the propertyvoid
removeProperty
(Object key) remove the property identified by the given keyvoid
setBounds
(double north, double west, double south, double east) set the clipping boundsvoid
setFromLevel
(Object value) Set the FromLevel property.void
setGeoSelection
(GeoSelection value) Set the GeoSelection property.void
Set the level.void
setLevelRange
(Object fromLevel, Object toLevel) Set the Level property.void
setProperties
(Hashtable value) Set the Properties property.void
setTheTimeDriverTimes
(List<DateTime> value) Set the TimeDriverTimes property.void
Set the times list held by this DataSelection.void
setTimesMode
(int mode) Set the times mode.void
setToLevel
(Object value) Set the ToLevel property.void
setXStride
(int stride) set the x stridevoid
setXYStride
(int stride) set the x and y stridevoid
setYStride
(int stride) set the y stridevoid
setZStride
(int stride) set the z stridetoString()
Return a string representation of this DataSelection.
-
Field Details
-
NULL
Null DataSelection -
PROP_DEFAULT_LEVELS
Property for selected levels- See Also:
-
PROP_DATESELECTION
Flag to use any times set elsewhere- See Also:
-
PROP_USESTIMEDRIVER
status template- See Also:
-
PROP_ASTIMEDRIVER
status template- See Also:
-
PROP_CHOOSERTIMEMATCHING
chooser time matching property- See Also:
-
PROP_TIMESUBSET
as time subset selection- See Also:
-
PROP_PROGRESSIVERESOLUTION
progressive resolution- See Also:
-
PROP_REGIONOPTION
region option- See Also:
-
PROP_HASCORNER
region option- See Also:
-
PROP_USEDISPLAYAREA
region option- See Also:
-
PROP_USEDEFAULTAREA
region option- See Also:
-
PROP_USESELECTEDAREA
region option- See Also:
-
PROP_DEFAULTVIEW
view manager - used for time/region matching- See Also:
-
TIMESMODE_USETHIS
public static final int TIMESMODE_USETHISFlag to use any times set here- See Also:
-
TIMESMODE_USEOTHER
public static final int TIMESMODE_USEOTHERFlag to use any times set elsewhere- See Also:
-
-
Constructor Details
-
DataSelection
public DataSelection()Construct aDataSelection
. -
DataSelection
ctor- Parameters:
fromLevel
- from leveltoLevel
- -0
-
DataSelection
public DataSelection(int zStride) ctor- Parameters:
zStride
- z stride
-
DataSelection
public DataSelection(int xStride, int yStride, int zStride) ctor- Parameters:
xStride
- strideyStride
- stridezStride
- stride
-
DataSelection
public DataSelection(boolean setDefaults) Construct aDataSelection
.- Parameters:
setDefaults
- If true then we set our defaults from the global defaults
-
DataSelection
Construct aDataSelection
with a list of times. Use the default times mode- Parameters:
times
-List
of DateTimes
-
DataSelection
Construct aDataSelection
with a list of times and a particular times mode.- Parameters:
times
-List
of DateTimestimesMode
- mode to use (TIMESMODE_USETHIS, TIMESMODE_USEOTHER)
-
DataSelection
Construct aDataSelection
from another instance.- Parameters:
that
- other DataSelection
-
-
Method Details
-
setXYStride
public void setXYStride(int stride) set the x and y stride- Parameters:
stride
- the stride
-
setXStride
public void setXStride(int stride) set the x stride- Parameters:
stride
- the stride
-
setYStride
public void setYStride(int stride) set the y stride- Parameters:
stride
- the stride
-
setZStride
public void setZStride(int stride) set the z stride- Parameters:
stride
- the stride
-
setBounds
public void setBounds(double north, double west, double south, double east) set the clipping bounds- Parameters:
north
- northwest
- westsouth
- southeast
- east
-
merge
If either of the params are null then simply return the other one. Else, create a new DataSelection and set its times and other attributes to those held by the higherPriority param if it contains times, etc., else set it to the lowerPriority param.- Parameters:
higherPriority
- DataSelection with higher prioritylowerPriority
- DataSelection with lower priority- Returns:
- the new DataSelection
-
getUseThisTimes
public boolean getUseThisTimes()Determine whether we should use the times from this DataSelection or not.- Returns:
- true if we should use the times from this
-
setTimesMode
public void setTimesMode(int mode) Set the times mode.- Parameters:
mode
- (TIMESMODE_USEOTHER, TIMESMODE_USETHIS)
-
getTimesMode
public int getTimesMode()Get the times mode.- Returns:
- TIMESMODE_USEOTHER or TIMESMODE_USETHIS
-
cloneMe
Method for creating a clone of this DataSelection- Returns:
- cloned version
-
hasTimes
public boolean hasTimes()Check whether this DataSelection has a time selection or not.- Returns:
- true if it has times set
-
setTimes
Set the times list held by this DataSelection. The given argument may be null and is cloned. This list represents the set of selected times which may either be DateTime objects or Integer indices.- Parameters:
selectedTimes
- The new times list.
-
getTimes
Get the list of times held by this DataSelection- Returns:
- list of times
-
hashCode
public int hashCode()Get the hash code for this DataSelection -
equals
See if the Object in question is equal to this DataSelection. -
toString
Return a string representation of this DataSelection. -
setLevel
Set the level. This in effect sets both the from and the to level to the argument- Parameters:
level
- The level
-
setLevelRange
Set the Level property.- Parameters:
fromLevel
- from leveltoLevel
- to level
-
setFromLevel
Set the FromLevel property.- Parameters:
value
- The new value for FromLevel
-
getFromLevel
Get the FromLevel property.- Returns:
- The FromLevel
-
setToLevel
Set the ToLevel property.- Parameters:
value
- The new value for ToLevel
-
getToLevel
Get the ToLevel property.- Returns:
- The ToLevel
-
setGeoSelection
Set the GeoSelection property.- Parameters:
value
- The new value for GeoSelection
-
getGeoSelection
Get the GeoSelection property.- Returns:
- The GeoSelection
-
getGeoSelection
Get the GeoSelection property.- Parameters:
createIfNeeded
- If true then create the geosubset of we don't have one already.- Returns:
- The GeoSelection
-
setProperties
Set the Properties property.- Parameters:
value
- The new value for Properties
-
getProperties
Get the Properties property.- Returns:
- The Properties
-
getProperty
get the property- Parameters:
key
- property key- Returns:
- property value
-
removeProperty
remove the property identified by the given key- Parameters:
key
- property key
-
getProperty
Get the named boolean property- Parameters:
name
- name of propertydflt
- default value- Returns:
- the value of the property or the default
-
getProperty
Get the named object property- Parameters:
name
- name of propertydflt
- default value- Returns:
- the value of the property or the default
-
putProperty
put the property- Parameters:
key
- keyvalue
- value
-
setTheTimeDriverTimes
Set the TimeDriverTimes property.- Parameters:
value
- The new value for TimeDriverTimes
-
getTimeDriverTimes
Get the TimeDriverTimes property.- Returns:
- The TimeDriverTimes
-