try {
JAXBContext jc = JAXBContext.newInstance(ArchitectureMapping.class);
Unmarshaller um = jc.createUnmarshaller();
// Set the parent to all objects with a setParent-Method
um.setListener(new ParentSettingXMLUnmarshallerListener());
if (filename != null) {
mapping = (ArchitectureMapping) um.unmarshal(new File(filename));
} else {
mapping = (ArchitectureMapping) um.unmarshal(stream);