Package net.ontopia.topicmaps.viz
Class BasenameUserThemeFilter
- java.lang.Object
-
- net.ontopia.topicmaps.viz.AbstractUserThemeFilter
-
- net.ontopia.topicmaps.viz.BasenameUserThemeFilter
-
public class BasenameUserThemeFilter extends AbstractUserThemeFilter
INTERNAL: Abstract class which provides access to filtering themes out which are not relevant to the user context.
-
-
Field Summary
Fields Modifier and Type Field Description protected ClassInstanceIndexIF
instanceIndex
protected ScopeIndexIF
scopeIndex
-
Fields inherited from class net.ontopia.topicmaps.viz.AbstractUserThemeFilter
topicMap
-
-
Constructor Summary
Constructors Constructor Description BasenameUserThemeFilter(TopicMapIF topicMap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setTopicMap(TopicMapIF topicMap)
boolean
shouldNotBeUsed(TopicIF actTheme)
Process theme and find out if it belongs to the user context and should therefore be displayed when selecting them.-
Methods inherited from class net.ontopia.topicmaps.viz.AbstractUserThemeFilter
filterThemes, getTopicMap
-
-
-
-
Field Detail
-
scopeIndex
protected ScopeIndexIF scopeIndex
-
instanceIndex
protected ClassInstanceIndexIF instanceIndex
-
-
Constructor Detail
-
BasenameUserThemeFilter
public BasenameUserThemeFilter(TopicMapIF topicMap)
-
-
Method Detail
-
setTopicMap
public void setTopicMap(TopicMapIF topicMap)
- Overrides:
setTopicMap
in classAbstractUserThemeFilter
-
shouldNotBeUsed
public boolean shouldNotBeUsed(TopicIF actTheme)
Process theme and find out if it belongs to the user context and should therefore be displayed when selecting them. If any of the following rules apply the theme should be not displayed. [Assumption: Topic "A" is a theme that scopes a base name of topic "B"] Rule 1: if there exists an association between topic belonging to this theme and one or more topics which are related to the scoped base names OR if one or more topics belonging to scoped basename(s) is/are of type of the theme ( "B" is associated with "A" OR "B" is an instance of "A" ) Role 2: topic belonging to this theme is used to type association roles AND one or more topics belonging to with this theme scoped basenames are used to type associations in which the topic belonging to the theme is playing an association role ( "A" is the role type in at least one association of type "B" AND "B" is an association type ) Role 3: one or more of the topics belonging to the scoped basenames is/are used as a scope theme itself/themselves ( "B" is a theme )- Specified by:
shouldNotBeUsed
in classAbstractUserThemeFilter
- Returns:
- boolean: true if this theme should not be displayed for user context configuration
-
-