net.ontopia.topicmaps.nav.context
Class ThemeCategorizer

java.lang.Object
  extended by net.ontopia.topicmaps.nav.context.ThemeCategorizer

public class ThemeCategorizer
extends java.lang.Object

INTERNAL: Class for categorizing a collection of themes according to their theme class. The theme classes as well as the themes in each theme class could be sorted.


Field Summary
protected  java.util.Comparator lexicalComparator
          for sorting the theme class strings
protected static java.lang.String STRING_NO_CLASS
          representation of theme class for themes which belong to no type
protected  StringifierIF stringifier
          Stringifier for theme class topics
protected  java.util.Comparator topicComparator
          for sorting the theme topics
 
Constructor Summary
ThemeCategorizer(TopicMapIF tm, java.util.Collection context)
          empty constructor.
 
Method Summary
 java.lang.String generateThemeList(java.util.HashMap themeClassMap, java.util.Collection selectedThemes, StringifierIF stringifierThemeClass, StringifierIF stringifierTheme, StringifierIF stringifierSelectedTheme)
          Generate a ordered list of theme classes.
 java.lang.String generateThemeList(java.util.HashMap themeClassMap, java.util.Collection selectedThemes, java.lang.String templThemeClass, java.lang.String templTheme, java.lang.String templSelectedTheme)
          Generate a ordered list of theme classes.
 java.lang.String generateThemeList(java.util.HashMap themeClassMap, StringifierIF stringifierThemeClass, StringifierIF stringifierTheme)
          Generate a ordered list of theme classes.
 java.util.HashMap getThemeClasses(java.util.Collection themes)
          process themes and generate HashMap which reflects theme categories.
 StringifierIF getTopicStringifier()
          INTERNAL: Returns the internal stringifier used to stringify topics correctly in the current context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STRING_NO_CLASS

protected static final java.lang.String STRING_NO_CLASS
representation of theme class for themes which belong to no type

See Also:
Constant Field Values

stringifier

protected StringifierIF stringifier
Stringifier for theme class topics


lexicalComparator

protected java.util.Comparator lexicalComparator
for sorting the theme class strings


topicComparator

protected java.util.Comparator topicComparator
for sorting the theme topics

Constructor Detail

ThemeCategorizer

public ThemeCategorizer(TopicMapIF tm,
                        java.util.Collection context)
empty constructor.

Method Detail

getTopicStringifier

public StringifierIF getTopicStringifier()
INTERNAL: Returns the internal stringifier used to stringify topics correctly in the current context.


getThemeClasses

public java.util.HashMap getThemeClasses(java.util.Collection themes)
process themes and generate HashMap which reflects theme categories.

Returns:
HashMap which contains as keys Strings of the theme type that lead to HasSet objects. These store TopicIF objects for the themes.

generateThemeList

public java.lang.String generateThemeList(java.util.HashMap themeClassMap,
                                          StringifierIF stringifierThemeClass,
                                          StringifierIF stringifierTheme)
Generate a ordered list of theme classes. Note: In every theme class there are at least one theme.


generateThemeList

public java.lang.String generateThemeList(java.util.HashMap themeClassMap,
                                          java.util.Collection selectedThemes,
                                          StringifierIF stringifierThemeClass,
                                          StringifierIF stringifierTheme,
                                          StringifierIF stringifierSelectedTheme)
Generate a ordered list of theme classes. The themes which are found in the collection of selectedThemes use their own stringifier stringifierSelectedTheme. Note: In every theme class there are at least one theme.


generateThemeList

public java.lang.String generateThemeList(java.util.HashMap themeClassMap,
                                          java.util.Collection selectedThemes,
                                          java.lang.String templThemeClass,
                                          java.lang.String templTheme,
                                          java.lang.String templSelectedTheme)
Generate a ordered list of theme classes. Use template strings to render result string, this approach is used by the navigator framework 2nd generation. Note: In every theme class there are at least one theme.



Copyright © 2000-2012 Ontopia.