Search in sources :

Example 21 with ObjectValue

use of org.openremote.model.value.ObjectValue in project openremote by openremote.

the class GeoJSONFeature method setProperty.

protected GeoJSONFeature setProperty(String name, Value value) {
    ObjectValue properties = objectValue.getObject("properties").orElse(Values.createObject());
    properties.put(name, value);
    if (!objectValue.hasKey("properties"))
        objectValue.put("properties", properties);
    return this;
}
Also used : ObjectValue(org.openremote.model.value.ObjectValue)

Aggregations

ObjectValue (org.openremote.model.value.ObjectValue)21 java.util (java.util)3 Logger (java.util.logging.Logger)3 Collectors (java.util.stream.Collectors)3 Stream (java.util.stream.Stream)3 EntityManager (javax.persistence.EntityManager)3 RouteBuilder (org.apache.camel.builder.RouteBuilder)3 Container (org.openremote.container.Container)3 ContainerService (org.openremote.container.ContainerService)3 GlobalLock.withLock (org.openremote.container.concurrent.GlobalLock.withLock)3 GlobalLock.withLockReturning (org.openremote.container.concurrent.GlobalLock.withLockReturning)3 MessageBrokerSetupService (org.openremote.container.message.MessageBrokerSetupService)3 PersistenceEvent (org.openremote.container.persistence.PersistenceEvent)3 TimerService (org.openremote.container.timer.TimerService)3 org.openremote.manager.asset (org.openremote.manager.asset)3 ManagerIdentityService (org.openremote.manager.security.ManagerIdentityService)3 VALUE_TIMESTAMP_FIELD_NAME (org.openremote.model.AbstractValueTimestampHolder.VALUE_TIMESTAMP_FIELD_NAME)3 AssetAttribute.attributesFromJson (org.openremote.model.asset.AssetAttribute.attributesFromJson)3 AssetAttribute.getAddedOrModifiedAttributes (org.openremote.model.asset.AssetAttribute.getAddedOrModifiedAttributes)3 Source (org.openremote.model.attribute.AttributeEvent.Source)3