Package uk.ac.rdg.resc.edal.dataset
Class AbstractDataset
- java.lang.Object
-
- uk.ac.rdg.resc.edal.dataset.AbstractDataset
-
- All Implemented Interfaces:
Serializable
,Dataset
- Direct Known Subclasses:
AbstractContinuousDomainDataset
,HorizontallyDiscreteDataset
public abstract class AbstractDataset extends Object implements Dataset, Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String
id
protected List<VariablePlugin>
plugins
protected Map<String,VariableMetadata>
vars
-
Constructor Summary
Constructors Constructor Description AbstractDataset(String id, Collection<? extends VariableMetadata> vars)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addVariablePlugin(VariablePlugin plugin)
Adds aVariablePlugin
to this dataset to generate derived variables from existing ones in theDataset
String
getId()
Set<VariableMetadata>
getTopLevelVariables()
Set<String>
getVariableIds()
VariableMetadata
getVariableMetadata(String variableId)
Returns theVariableMetadata
associated with a particular variable IDprotected VariablePlugin
isDerivedVariable(String varId)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface uk.ac.rdg.resc.edal.dataset.Dataset
extractProfileFeatures, extractTimeseriesFeatures, getFeatureIds, getFeatureType, getMapFeatureType, readFeature, supportsProfileFeatureExtraction, supportsTimeseriesExtraction
-
-
-
-
Field Detail
-
id
protected final String id
-
vars
protected Map<String,VariableMetadata> vars
-
plugins
protected List<VariablePlugin> plugins
-
-
Constructor Detail
-
AbstractDataset
public AbstractDataset(String id, Collection<? extends VariableMetadata> vars)
- Parameters:
id
- The ID to use for thisDataset
vars
- ACollection
ofVariableMetadata
objects representing the data which will be stored in thisDataset
-
-
Method Detail
-
getId
public String getId()
-
getVariableMetadata
public VariableMetadata getVariableMetadata(String variableId) throws VariableNotFoundException
Description copied from interface:Dataset
Returns theVariableMetadata
associated with a particular variable ID- Specified by:
getVariableMetadata
in interfaceDataset
- Parameters:
variableId
- The variable ID to search for- Returns:
- The desired
VariableMetadata
- Throws:
VariableNotFoundException
- If the requested variable is not available
-
getTopLevelVariables
public Set<VariableMetadata> getTopLevelVariables()
- Specified by:
getTopLevelVariables
in interfaceDataset
- Returns:
- the variables at the top level of the hierarchy.
-
getVariableIds
public Set<String> getVariableIds()
- Specified by:
getVariableIds
in interfaceDataset
- Returns:
- the IDs of variables in this
Dataset
. Generally the term "variable" refers to a measured physical quantity
-
isDerivedVariable
protected VariablePlugin isDerivedVariable(String varId)
-
addVariablePlugin
public void addVariablePlugin(VariablePlugin plugin) throws EdalException
Description copied from interface:Dataset
Adds aVariablePlugin
to this dataset to generate derived variables from existing ones in theDataset
- Specified by:
addVariablePlugin
in interfaceDataset
- Parameters:
plugin
- TheVariablePlugin
to add- Throws:
EdalException
- If there is a problem adding the plugin
-
-