Package uk.ac.rdg.resc.edal.feature
Class AbstractDiscreteFeature<P,DO>
- java.lang.Object
-
- uk.ac.rdg.resc.edal.feature.AbstractDiscreteFeature<P,DO>
-
- Type Parameters:
P
- The type of object used to identify positions within the feature's domain. This may be a spatial, temporal, or combined spatiotemporal position.DO
- The type of domain object
- All Implemented Interfaces:
Serializable
,DiscreteFeature<P,DO>
,Feature<P>
- Direct Known Subclasses:
GridFeature
,MapFeature
,PointCollectionFeature
,PointFeature
,PointSeriesFeature
,ProfileFeature
,TrajectoryFeature
public abstract class AbstractDiscreteFeature<P,DO> extends Object implements DiscreteFeature<P,DO>, Serializable
A partial implementation of aFeature
containing common functionality- Author:
- Guy
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDescription()
DiscreteDomain<P,DO>
getDomain()
Properties
getFeatureProperties()
String
getId()
String
getName()
Parameter
getParameter(String parameterId)
Map<String,Parameter>
getParameterMap()
Array<Number>
getValues(String paramId)
Gets the array of values for the given parameter.Set<String>
getVariableIds()
-
-
-
Method Detail
-
getId
public String getId()
-
getName
public String getName()
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceFeature<P>
- Returns:
- a (perhaps lengthy) human-readable description of this feature.
-
getVariableIds
public Set<String> getVariableIds()
- Specified by:
getVariableIds
in interfaceFeature<P>
- Returns:
- the set of identifiers of the variables recorded in this Feature
-
getParameter
public Parameter getParameter(String parameterId)
Description copied from interface:Feature
- Specified by:
getParameter
in interfaceFeature<P>
- Parameters:
parameterId
- The ID of the desiredParameter
- Returns:
- the desired
Parameter
-
getParameterMap
public Map<String,Parameter> getParameterMap()
- Specified by:
getParameterMap
in interfaceFeature<P>
- Returns:
- the set of identifiers of the variables in this Feature mapped to
the
Parameter
s themselves
-
getValues
public Array<Number> getValues(String paramId)
Description copied from interface:DiscreteFeature
Gets the array of values for the given parameter. The shape of this array must match the shape of the array of domain objects (fromDiscreteDomain.getDomainObjects()
).- Specified by:
getValues
in interfaceDiscreteFeature<P,DO>
- Parameters:
paramId
- The identifier from theFeature.getVariableIds()
set of parameter IDs.- Returns:
- the list of values for the requested member
-
getDomain
public DiscreteDomain<P,DO> getDomain()
Description copied from interface:DiscreteFeature
-
getFeatureProperties
public Properties getFeatureProperties()
- Specified by:
getFeatureProperties
in interfaceFeature<P>
- Returns:
- a
Properties
object containing an arbitrary list ofString
properties associated with thisFeature
. This can be used to attach any additional information to theFeature
which doesn't fit elsewhere. Will not returnnull
, but may be empty.
-
-