Package ucar.unidata.data
Class DataInstance
java.lang.Object
ucar.unidata.data.DataInstance
- Direct Known Subclasses:
GridDataInstance,PointDataInstance
A superclass for data instances. It's a wrapper for a Data object
that allows quick access to metadata about it.
This class is thread-compatible.
- Version:
- $Revision: 1.47 $
- Author:
- IDV development team
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DataChoiceTheDataChoiceassociated with the instanceprotected DataSelectionThe dataselection for the choiceprotected booleanflag for initializationprotected booleanflag for errorsprotected static LogUtil.LogCategorylogging categoryprotected HashtableExtra request properties -
Constructor Summary
ConstructorsConstructorDescriptionDataInstance(DataChoice dataChoice, DataSelection dataSelection, Hashtable requestProperties) Create a new DataInstance.DataInstance(DataChoice dataChoice, DataSelection dataSelection, Hashtable requestProperties, Data theData) Create a new DataInstance. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCheck if this has been initialized.booleandataOk()Is the data held by this DataInstance ok.getData()Calls getData, passing in the member DataSelectiongetData(DataSelection dataSelection) Get the data using the specified sub selection.getData(DataSelection dataSelection, Hashtable requestProperties) Get the data using the specified sub selection and extra request propertiesGet theDataChoiceassociated with this instance.protected static intGet the next instance id.Get the parameter name associated with this instance.protected voidinit()Initialize the instancebooleanDoes this data instance need to be initializedvoidReinitilize this instance.protected void_more_voidsetDataSelection(DataSelection dataSelection) Set the data selectionvoidsetTheData(Data d) Have this be setTheData so it is not the same signature as getData in case this gets persisted
-
Field Details
-
log_
logging category -
haveBeenInitialized
protected boolean haveBeenInitializedflag for initialization -
inError
protected boolean inErrorflag for errors -
dataChoice
TheDataChoiceassociated with the instance -
dataSelection
The dataselection for the choice -
myRequestProperties
Extra request properties
-
-
Constructor Details
-
DataInstance
public DataInstance(DataChoice dataChoice, DataSelection dataSelection, Hashtable requestProperties) throws VisADException, RemoteException Create a new DataInstance.- Parameters:
dataChoice- choice for datadataSelection- sub-selection criteriarequestProperties- extra request properties- Throws:
RemoteException- Java RMI problemVisADException- VisAD problem
-
DataInstance
public DataInstance(DataChoice dataChoice, DataSelection dataSelection, Hashtable requestProperties, Data theData) throws VisADException, RemoteException Create a new DataInstance.- Parameters:
dataChoice- choice for datadataSelection- sub-selection criteriarequestProperties- extra request propertiestheData- Any initial data. Usually is null.- Throws:
RemoteException- Java RMI problemVisADException- VisAD problem
-
-
Method Details
-
init
Initialize the instance- Throws:
RemoteException- Java RMI problemVisADException- VisAD problem
-
needsInitialization
public boolean needsInitialization()Does this data instance need to be initialized- Returns:
- needs to be initialized
-
checkInit
protected void checkInit()Check if this has been initialized. If not, initialize. -
reInitialize
Reinitilize this instance. Set internal fields to null and call init()- Throws:
RemoteException- Java RMI problemVisADException- VisAD problem
-
getDataSelection
-
getDataChoice
Get theDataChoiceassociated with this instance.- Returns:
- associated DataChoice
-
setTheData
Have this be setTheData so it is not the same signature as getData in case this gets persisted- Parameters:
d- data to use
-
getData
Calls getData, passing in the member DataSelection- Returns:
- the Data for this instance
- Throws:
RemoteException- Java RMI problemVisADException- VisAD problem
-
getData
Get the data using the specified sub selection.- Parameters:
dataSelection- sub selection criteria- Returns:
- the data
- Throws:
RemoteException- Java RMI problemVisADException- VisAD problem
-
getData
public Data getData(DataSelection dataSelection, Hashtable requestProperties) throws VisADException, RemoteException Get the data using the specified sub selection and extra request properties- Parameters:
dataSelection- sub selection criteriarequestProperties- extra request properties- Returns:
- the data specific to the request
- Throws:
RemoteException- Java RMI problemVisADException- VisAD problem
-
setData
_more_- Parameters:
newData- _more_
-
setDataSelection
Set the data selection- Parameters:
dataSelection- the data selection
-
dataOk
Is the data held by this DataInstance ok. That is, is it non-null.- Returns:
- true if the data is okay
- Throws:
RemoteException- Java RMI problemVisADException- VisAD problem
-
getParamName
Get the parameter name associated with this instance.- Returns:
- name of the pararmeter
-
getNextId
protected static int getNextId()Get the next instance id.- Returns:
- next instance id
-