/** * Copyright (c) 2014-2017 by the respective copyright holders. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html */ package org.eclipse.smarthome.io.rest.core.item; import org.eclipse.smarthome.core.items.dto.ItemDTO; import org.eclipse.smarthome.core.types.StateDescription; /** * This is an enriched data transfer object that is used to serialize items with dynamic data like the state, the state * description and the link. * * @author Dennis Nobel - Initial contribution * */ public class EnrichedItemDTO extends ItemDTO { public String link; public String state; public String transformedState; public StateDescription stateDescription; public EnrichedItemDTO(ItemDTO itemDTO, String link, String state, String transformedState, StateDescription stateDescription) { this.type = itemDTO.type; this.name = itemDTO.name; this.label = itemDTO.label; this.category = itemDTO.category; this.tags = itemDTO.tags; this.groupNames = itemDTO.groupNames; this.link = link; this.state = state; this.transformedState = transformedState; this.stateDescription = stateDescription; } }