static Map web_copyUsingPartialMap(Web web, Web w, Map map) { map = new HashMap(map); for (WebNode node : web.nodes) if (!(node instanceof WebRelation)) { if (!map.containsKey(node)) map.put(node, cloneNodeToWeb(node, w)); } for (Pair p : keys(web.relations)) w.getRelation(assertNotNull(map.get(p.a)), assertNotNull(map.get(p.b))).addLabels(web.getRelation(p).labels); ret map; }