Search in sources :

Example 1 with StyleMetadata

use of org.n52.io.IoStyleContext.StyleMetadata in project series-rest-api by 52North.

the class ChartIoHandler method getDatasetStyleFor.

protected StyleProperties getDatasetStyleFor(String datasetId) {
    Optional<StyleMetadata> optional = context.getStyleMetadataFor(datasetId);
    StyleMetadata styleMetadata = optional.get();
    return styleMetadata.getStyleProperties();
}
Also used : StyleMetadata(org.n52.io.IoStyleContext.StyleMetadata)

Example 2 with StyleMetadata

use of org.n52.io.IoStyleContext.StyleMetadata in project series-rest-api by 52North.

the class IoStyleContext method getReferenceDatasetStyleOptions.

private StyleProperties getReferenceDatasetStyleOptions(StyleMetadata styleMetadata, String referenceDatasetId) {
    StyleProperties styleProperties = styleMetadata.getStyleProperties();
    Map<String, StyleProperties> properties = styleProperties.getReferenceValueStyleProperties();
    return properties.containsKey(referenceDatasetId) ? properties.get(referenceDatasetId) : null;
}
Also used : StyleProperties(org.n52.io.request.StyleProperties)

Aggregations

StyleMetadata (org.n52.io.IoStyleContext.StyleMetadata)1 StyleProperties (org.n52.io.request.StyleProperties)1