Пример #1
0
 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;
 }
Пример #2
0
 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;
 }
Пример #3
0
 protected Collection getSubtypes(TopicIF type) {
   Collection subs = new ArrayList(typeutils.getSubclasses(type));
   subs.add(type);
   return subs;
 }