private void initSetterMap() { Method setter = null; setter = getSetter("setKeyword", String.class); setMethodMap.put("keyword", setter); setter = getSetter("setParents", DefaultPersistibleList.class); setMethodMap.put("parentKeyword", setter); setter = getSetter("setDescribedInstances", DefaultPersistibleList.class); setMethodMap.put("describedInstances", setter); // setter = getSetter("getSubordinateKeywords"); // getMethodMap.put("subordinateKeywords", setter); }
private void initGetterMap() { Method getter = null; getter = getGetter("getKeyword"); getMethodMap.put("keyword", getter); getter = getGetter("getParents"); getMethodMap.put("parentKeyword", getter); getter = getGetter("getDescribedInstances"); getMethodMap.put("describedInstances", getter); // getter = getGetter("getSubordinateKeywords"); // getMethodMap.put("subordinateKeywords", getter); }
private void addKeyword(Hashtable table, Keyword word, Keyword parent) { boolean recurse = true; if (table.containsKey(word)) recurse = false; if (parent == null) table.put(word, String.valueOf(-1)); else table.put(word, parent); if (recurse) { Iterator it = word.getChildren().iterator(); while (it.hasNext()) { addKeyword(table, (Keyword) it.next(), word); } } }