} else { myLogger .error("Activity not of expected type even though it was explicitly declared! (can only be EVA type right now)"); myLogger.error("type was: " + activityTypeNode.getNodeValue() + ", should be: EVAActivityType"); return null;
    private Activity createActivity(Node node, CrewGroupImpl crew) {        int length = 0;        int intensity = 0;        try {            length = Integer.parseInt(node.getAttributes().getNamedItem(                    "length").getNodeValue());            intensity = Integer.parseInt(node.getAttributes().getNamedItem(                    "intensity").getNodeValue());        } catch (NumberFormatException e) {            e.printStackTrace();        }        String name = node.getAttributes().getNamedItem("name").getNodeValue();        Node activityTypeNode = node.getAttributes().getNamedItem("xsi:type");        if (activityTypeNode != null) {            if (activityTypeNode.getNodeValue().equals("EVAActivityType")) {                myLogger.debug("Type is " + activityTypeNode.getNodeValue());                String evaCrewGroupName = node.getAttributes().getNamedItem(                        "evaCrewGroup").getNodeValue();                EVAActivityImpl newEVAActivityImpl = new EVAActivityImpl(name,                        length, intensity, crew.getModuleName(),                        evaCrewGroupName);                return EVAActivityHelper.narrow(ActivityHelper.narrow(OrbUtils                        .poaToCorbaObj(newEVAActivityImpl)));            } else {                myLogger                        .error("Activity not of expected type even though it was explicitly declared! (can only be EVA type right now)");                myLogger.error("type was: " + activityTypeNode.getNodeValue()                        + ", should be: EVAActivityType");                return null;            }        } else {            ActivityImpl newActivityImpl = new ActivityImpl(name, length,                    intensity);            return ActivityHelper.narrow(OrbUtils                    .poaToCorbaObj(newActivityImpl));        }    }