software/browser-util/src/gov/nih/nci/evs/browser/utils/ValueSetHierarchy.java
//hmap HashMap for quick access to parent codes
hmap HashMap for quick access to parent codes
hmap HashMap for quick access to parent codes
public void populateSuperconceptHashMap(HashMap hmap, TreeItem ti) {
        for (String association : ti._assocToChildMap.keySet()) {
            List<TreeItem> children = ti._assocToChildMap.get(association);
            String superconcept_key = ti._code;
            for (TreeItem childItem : children) {
                String subconcept_key = childItem._code;
				if(hmap.containsKey(subconcept_key)) {
					Vector v = (Vector) hmap.get(subconcept_key);
					if (v == null) return;
					if (!v.contains(superconcept_key)) {
						v.add(superconcept_key);
						hmap.put(subconcept_key, v);
					}
				} else {
					Vector v = new Vector();
					v.add(superconcept_key);
					hmap.put(subconcept_key, v);
				}
				populateSuperconceptHashMap(hmap, childItem);
		    }
		}
	}
public void populateSuperconceptHashMap ( HashMap hmap , TreeItem ti ) { for ( String association : ti . _assocToChildMap . keySet ( ) ) { List < TreeItem > children = ti . _assocToChildMap . get ( association ) ; String superconcept_key = ti . _code ; for ( TreeItem childItem : children ) { String subconcept_key = childItem . _code ; if ( hmap . containsKey ( subconcept_key ) ) { Vector v = ( Vector ) hmap . get ( subconcept_key ) ; if ( v == null ) return ; if ( ! v . contains ( superconcept_key ) ) { v . add ( superconcept_key ) ; hmap . put ( subconcept_key , v ) ; } } else { Vector v = new Vector ( ) ; v . add ( superconcept_key ) ; hmap . put ( subconcept_key , v ) ; } populateSuperconceptHashMap ( hmap , childItem ) ; } } }
hmap HashMap for quick access to parent codes
hmap HashMap for quick access to parent codes