/** * Handles inserting a specific type of model object into our object graph. * @param LSID LSID of the model object. * @param sourceObject Model object itself. * @param indexes Any indexes that should be used to reference the model * object. */ private void handle(String LSID, OTF sourceObject, Map<String, Integer> indexes) { Instrument i = instrumentList.get(indexes.get("instrumentIndex")); i.addOTF(sourceObject); Map<Integer, OTF> map = otfList.get(i); if (map == null) { map = new HashMap<Integer, OTF>(); otfList.put(i, map); } map.put(indexes.get("otfIndex"), sourceObject); }