Search in sources :

Example 6 with NodeIterator

use of org.eclipse.smarthome.config.xml.util.NodeIterator in project smarthome by eclipse.

the class ChannelConverter method unmarshal.

@Override
public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) {
    // read attributes
    Map<String, String> attributes = this.attributeMapValidator.readValidatedAttributes(reader);
    // read values
    List<?> nodes = (List<?>) context.convertAnother(context, List.class);
    NodeIterator nodeIterator = new NodeIterator(nodes);
    // create object
    Object object = unmarshalType(reader, context, attributes, nodeIterator);
    nodeIterator.assertEndOfType();
    return object;
}
Also used : NodeIterator(org.eclipse.smarthome.config.xml.util.NodeIterator) List(java.util.List)

Aggregations

NodeIterator (org.eclipse.smarthome.config.xml.util.NodeIterator)6 List (java.util.List)4 URI (java.net.URI)2 ConfigDescription (org.eclipse.smarthome.config.core.ConfigDescription)2 NodeList (org.eclipse.smarthome.config.xml.util.NodeList)2 ConversionException (com.thoughtworks.xstream.converters.ConversionException)1 BigDecimal (java.math.BigDecimal)1 URISyntaxException (java.net.URISyntaxException)1 ArrayList (java.util.ArrayList)1 ConfigDescriptionParameter (org.eclipse.smarthome.config.core.ConfigDescriptionParameter)1 ConfigDescriptionParameterGroup (org.eclipse.smarthome.config.core.ConfigDescriptionParameterGroup)1 BindingInfo (org.eclipse.smarthome.core.binding.BindingInfo)1 EventDescription (org.eclipse.smarthome.core.types.EventDescription)1 EventOption (org.eclipse.smarthome.core.types.EventOption)1 StateDescription (org.eclipse.smarthome.core.types.StateDescription)1 StateOption (org.eclipse.smarthome.core.types.StateOption)1