Package org.n52.series.spi.srv
Class ParameterService<T extends ParameterOutput>
- java.lang.Object
-
- org.n52.series.spi.srv.ParameterService<T>
-
- Type Parameters:
T- the actual parameter type.
- All Implemented Interfaces:
RawDataInfo
- Direct Known Subclasses:
TransformingGeometryOutputService,TransformingStationOutputService,TransformingTimeseriesService
public abstract class ParameterService<T extends ParameterOutput> extends Object implements RawDataInfo
A generic service to get arbitrary parameters from the underlying data access implementation. In general the access can result either in compact or detailed outputs. However, each query can be controlled in more detail by a parameter values hold by aIoParameters.
-
-
Constructor Summary
Constructors Constructor Description ParameterService()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract booleanexists(String id, IoParameters parameters)If a resource exists or not.abstract OutputCollection<T>getCondensedParameters(IoParameters query)abstract OutputCollection<T>getExpandedParameters(IoParameters query)abstract TgetParameter(String item, IoParameters query)Gets the requested item with respect to the given query parameters.abstract OutputCollection<T>getParameters(String[] items, IoParameters query)Gets the requested items with respect to the given query parameters.RawDataServicegetRawDataService()voidsetRawDataService(RawDataService rawDataService)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.n52.series.spi.srv.RawDataInfo
supportsRawData
-
-
-
-
Method Detail
-
getExpandedParameters
public abstract OutputCollection<T> getExpandedParameters(IoParameters query)
- Parameters:
query- query parameters to control the output.- Returns:
- an output collection of expanded items.
-
getCondensedParameters
public abstract OutputCollection<T> getCondensedParameters(IoParameters query)
- Parameters:
query- query parameters to control the output.- Returns:
- an output collection of compact items.
-
getParameters
public abstract OutputCollection<T> getParameters(String[] items, IoParameters query)
Gets the requested items with respect to the given query parameters. Note, that implementations may be aware of parameters not specified by the official timeseries API. However, at least all officially specified query parameters should be considered by all implementations.- Parameters:
items- a subset of item ids which are of interest.query- query parameters to control the output.- Returns:
- an output collection of expanded items which are of interest. Not known ids will be ignored.
-
getParameter
public abstract T getParameter(String item, IoParameters query)
Gets the requested item with respect to the given query parameters. Note, that implementations may be aware of parameters not specified by the official timeseries API. However, at least all officially specified query parameters should be considered by all implementations.- Parameters:
item- the item id of interest.query- query parameters to control the output.- Returns:
- an expanded items of interest.
-
exists
public abstract boolean exists(String id, IoParameters parameters)
If a resource exists or not.- Parameters:
id- the id of the resource.parameters- the query passed along.- Returns:
trueif the resource exists,falseotherwise.- Since:
- 2.0.0
-
getRawDataService
public RawDataService getRawDataService()
- Specified by:
getRawDataServicein interfaceRawDataInfo
-
setRawDataService
public void setRawDataService(RawDataService rawDataService)
-
-