Package org.n52.io.response
Class ParameterOutput
- java.lang.Object
-
- org.n52.io.response.SelfSerializedOutput
-
- org.n52.io.response.ParameterOutput
-
- All Implemented Interfaces:
Comparable<ParameterOutput>,RawFormats
- Direct Known Subclasses:
AbstractOutput,DetectionLimitOutput,ProducerOutput,SamplerOutput,ServiceOutput
public abstract class ParameterOutput extends SelfSerializedOutput implements RawFormats, Comparable<ParameterOutput>
-
-
Constructor Summary
Constructors Constructor Description ParameterOutput()
-
Method Summary
-
Methods inherited from class org.n52.io.response.SelfSerializedOutput
getIfSerialized, getIfSerializedCollection, getIfSerializedMap, getIfSet, getIfSetCollection, getIfSetMap, isSet, resolvesToNonNullValue
-
-
-
-
Field Detail
-
ID
public static final String ID
- See Also:
- Constant Field Values
-
HREF
public static final String HREF
- See Also:
- Constant Field Values
-
HREF_BASE
public static final String HREF_BASE
- See Also:
- Constant Field Values
-
DOMAIN_ID
public static final String DOMAIN_ID
- See Also:
- Constant Field Values
-
LABEL
public static final String LABEL
- See Also:
- Constant Field Values
-
EXTRAS
public static final String EXTRAS
- See Also:
- Constant Field Values
-
RAWFORMATS
public static final String RAWFORMATS
- See Also:
- Constant Field Values
-
-
Method Detail
-
setValue
public <T> void setValue(String parameter, T value, IoParameters parameters, Consumer<OptionalOutput<T>> consumer)
-
getId
public String getId()
-
setId
public ParameterOutput setId(String id)
-
getHref
public String getHref()
-
getCollectionName
public String getCollectionName()
-
setHref
public ParameterOutput setHref(OptionalOutput<String> href)
-
getHrefBase
public String getHrefBase()
-
setHrefBase
public ParameterOutput setHrefBase(OptionalOutput<String> hrefBase)
-
getDomainId
public String getDomainId()
Returns the domain id of the parameter, e.g. a natural id (not arbitrarily generated) or the original id actually being used by proxied data sources.- Returns:
- the domain id
-
setDomainId
public ParameterOutput setDomainId(OptionalOutput<String> domainId)
Sets the domain id of the parameter, e.g. a natural (not arbitrarily generated) id or the original id actually being used by proxied data sources.- Parameters:
domainId- the domain id of the parameter- Returns:
- the instance to enable chaining
-
getLabel
public String getLabel()
- Returns:
- the label. Returns null if label is not set.
-
setLabel
public ParameterOutput setLabel(OptionalOutput<String> label)
-
getLicense
@Deprecated public String getLicense()
Deprecated.
-
setLicense
@Deprecated public ParameterOutput setLicense(OptionalOutput<String> license)
Deprecated.
-
getExtras
public Collection<String> getExtras()
- Returns:
- a list of extra identifiers available via
/{resource}/extras
-
setExtras
public ParameterOutput setExtras(OptionalOutput<Collection<String>> extras)
-
getRawFormats
public Set<String> getRawFormats()
- Specified by:
getRawFormatsin interfaceRawFormats- Returns:
- the rawFormats
-
setRawFormats
public ParameterOutput setRawFormats(OptionalOutput<Set<String>> formats)
- Specified by:
setRawFormatsin interfaceRawFormats- Parameters:
formats- the rawFormats to set- Returns:
- the instance to enable chaining
-
compareTo
public int compareTo(ParameterOutput o)
- Specified by:
compareToin interfaceComparable<ParameterOutput>
-
defaultComparator
public static <T extends ParameterOutput> Comparator<T> defaultComparator()
Takes the default comparator to compare.- Type Parameters:
T- the actual type.- Returns:
- a label or id comparing
Comparator
-
labelComparator
public static <T extends ParameterOutput> Comparator<T> labelComparator()
Takes the labels to compare.- Type Parameters:
T- the actual type.- Returns:
- a label comparing
Comparator
-
idComparator
public static <T extends ParameterOutput> Comparator<T> idComparator()
Takes the ids to compare.- Type Parameters:
T- the actual type.- Returns:
- a id comparing
Comparator
-
-