protected ChannelDefinition toChannelDefinition(String bindingId) throws ConversionException { String id = getId(); String typeId = getTypeId(); String typeUID = getTypeUID(bindingId, typeId); // Convert the channel properties into a map Map<String, String> propertiesMap = new HashMap<>(); for (NodeValue property : getProperties()) { propertiesMap.put(property.getAttributes().get("name"), (String) property.getValue()); } return new ChannelDefinitionBuilder(id, new ChannelTypeUID(typeUID)).withProperties(propertiesMap) .withLabel(getLabel()).withDescription(getDescription()).withAutoUpdatePolicy(getAutoUpdatePolicy()) .build(); }