use of org.eclipse.smarthome.core.thing.xml.internal.ThingDescriptionList in project smarthome by eclipse.
the class Example method test.
@SuppressWarnings("unchecked")
@Test
public void test() throws Exception {
File file = new File("./example/example.xml");
URL channelsURL = file.toURI().toURL();
ThingDescriptionReader reader = new ThingDescriptionReader();
ThingDescriptionList thingList = (ThingDescriptionList) reader.readFromXML(channelsURL);
thingList.stream().forEach(it -> {
if (it instanceof ChannelTypeXmlResult) {
ChannelType channelType = ((ChannelTypeXmlResult) it).toChannelType();
}
});
}
Aggregations