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 DataSelectionNull DataSelectionstatic final Stringstatus templatestatic final Stringchooser time matching propertystatic final StringFlag to use any times set elsewherestatic final StringProperty for selected levelsstatic final Stringview manager - used for time/region matchingstatic final Stringregion optionstatic final Stringprogressive resolutionstatic final Stringregion optionstatic final Stringas time subset selectionstatic final Stringregion optionstatic final Stringregion optionstatic final Stringregion optionstatic final Stringstatus templatestatic final intFlag to use any times set elsewherestatic final intFlag 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 aDataSelectionwith a list of times.DataSelection(List times, int timesMode) Construct aDataSelectionwith a list of times and a particular times mode.DataSelection(DataSelection that) Construct aDataSelectionfrom another instance. -
Method Summary
Modifier and TypeMethodDescriptioncloneMe()Method for creating a clone of this DataSelectionbooleanSee 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 propertybooleangetProperty(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 DataSelectionintGet the times mode.Get the ToLevel property.booleanDetermine whether we should use the times from this DataSelection or not.inthashCode()Get the hash code for this DataSelectionbooleanhasTimes()Check whether this DataSelection has a time selection or not.static DataSelectionmerge(DataSelection higherPriority, DataSelection lowerPriority) If either of the params are null then simply return the other one.voidputProperty(Object key, Object value) put the propertyvoidremoveProperty(Object key) remove the property identified by the given keyvoidsetBounds(double north, double west, double south, double east) set the clipping boundsvoidsetFromLevel(Object value) Set the FromLevel property.voidsetGeoSelection(GeoSelection value) Set the GeoSelection property.voidSet the level.voidsetLevelRange(Object fromLevel, Object toLevel) Set the Level property.voidsetProperties(Hashtable value) Set the Properties property.voidsetTheTimeDriverTimes(List<DateTime> value) Set the TimeDriverTimes property.voidSet the times list held by this DataSelection.voidsetTimesMode(int mode) Set the times mode.voidsetToLevel(Object value) Set the ToLevel property.voidsetXStride(int stride) set the x stridevoidsetXYStride(int stride) set the x and y stridevoidsetYStride(int stride) set the y stridevoidsetZStride(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 aDataSelectionwith a list of times. Use the default times mode- Parameters:
times-Listof DateTimes
-
DataSelection
Construct aDataSelectionwith a list of times and a particular times mode.- Parameters:
times-Listof DateTimestimesMode- mode to use (TIMESMODE_USETHIS, TIMESMODE_USEOTHER)
-
DataSelection
Construct aDataSelectionfrom 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
-