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