Node dev = new Node(Device.ELEM_NAME);
DeviceData dd = new DeviceData();
dd.setDescriptionURI(id+"/gen-desc.xml");
dev.setUserData(dd);
Device devUPnP = new Device(dev);
devUPnP.setDeviceType(extractDeviceType(sr));
devUPnP.setFriendlyName((String) sr.getProperty(UPnPDevice.FRIENDLY_NAME));
devUPnP.setManufacture((String) sr.getProperty(UPnPDevice.MANUFACTURER));
devUPnP.setManufactureURL((String) sr.getProperty(UPnPDevice.MANUFACTURER_URL));
devUPnP.setModelDescription((String) sr.getProperty(UPnPDevice.MODEL_DESCRIPTION));
devUPnP.setModelName((String) sr.getProperty(UPnPDevice.MODEL_NAME));
devUPnP.setModelNumber((String) sr.getProperty(UPnPDevice.MODEL_NUMBER));
devUPnP.setModelURL((String) sr.getProperty(UPnPDevice.MODEL_URL));
devUPnP.setSerialNumber((String) sr.getProperty(UPnPDevice.SERIAL_NUMBER));
devUPnP.setUDN((String) sr.getProperty(UPnPDevice.UDN));
devUPnP.setUPC((String) sr.getProperty(UPnPDevice.UPC));
devUPnP.setLocation(id+"/gen-desc.xml");
addServices(id,devUPnP,sr);
addDevices(id,devUPnP,sr);
parent.addDevice(devUPnP); // twa: essential!!!!!!!
devUPnP.setPresentationURL((String) sr.getProperty(UPnPDevice.PRESENTATION_URL));
}