protected Collection getSupertypes(TopicIF type) { Collection supers = (Collection) superTypeCache.get(type); if (supers == null) { supers = new ArrayList(typeutils.getSuperclasses(type)); supers.add(type); superTypeCache.put(type, supers); } return supers; }
protected Collection getTypes() { Set types = new CompactHashSet(); Iterator it = index.getTopicTypes().iterator(); while (it.hasNext()) { TopicIF type = (TopicIF) it.next(); types.addAll(getSupertypes(type)); types.addAll(typeutils.getSubclasses(type)); } return types; }
protected Collection getSubtypes(TopicIF type) { Collection subs = new ArrayList(typeutils.getSubclasses(type)); subs.add(type); return subs; }