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 Stringidprotected List<VariablePlugin>pluginsprotected 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 voidaddVariablePlugin(VariablePlugin plugin)Adds aVariablePluginto this dataset to generate derived variables from existing ones in theDatasetStringgetId()Set<VariableMetadata>getTopLevelVariables()Set<String>getVariableIds()VariableMetadatagetVariableMetadata(String variableId)Returns theVariableMetadataassociated with a particular variable IDprotected VariablePluginisDerivedVariable(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 thisDatasetvars- ACollectionofVariableMetadataobjects 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:DatasetReturns theVariableMetadataassociated with a particular variable ID- Specified by:
getVariableMetadatain 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:
getTopLevelVariablesin interfaceDataset- Returns:
- the variables at the top level of the hierarchy.
-
getVariableIds
public Set<String> getVariableIds()
- Specified by:
getVariableIdsin 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:DatasetAdds aVariablePluginto this dataset to generate derived variables from existing ones in theDataset- Specified by:
addVariablePluginin interfaceDataset- Parameters:
plugin- TheVariablePluginto add- Throws:
EdalException- If there is a problem adding the plugin
-
-