Class ScopeIndex
- java.lang.Object
-
- net.ontopia.topicmaps.impl.utils.AbstractIndex
-
- net.ontopia.topicmaps.impl.utils.BasicIndex
-
- net.ontopia.topicmaps.impl.basic.index.ScopeIndex
-
- All Implemented Interfaces:
IndexIF
,ScopeIndexIF
,EventListenerIF
public class ScopeIndex extends BasicIndex implements ScopeIndexIF
INTERNAL: The basic dynamic scope index implementation.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.ontopia.topicmaps.impl.utils.BasicIndex
BasicIndex.EventHandler<K,V>, BasicIndex.TypedPredicate
-
-
Field Summary
Fields Modifier and Type Field Description protected CollectionMap<TopicIF,AssociationIF>
assocs
protected CollectionMap<TopicIF,TopicNameIF>
basenames
protected CollectionMap<TopicIF,OccurrenceIF>
occurs
protected CollectionMap<TopicIF,VariantNameIF>
variants
-
Fields inherited from class net.ontopia.topicmaps.impl.utils.BasicIndex
handlers
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<AssociationIF>
getAssociations(TopicIF theme)
PUBLIC: Gets all associations that have the given topic in their direct scope.Collection<TopicIF>
getAssociationThemes()
PUBLIC: Gets the set of all topics that are used in the direct scope of at least one association.Collection<OccurrenceIF>
getOccurrences(TopicIF theme)
PUBLIC: Gets all occurrences that have the given topic in their direct scope.Collection<TopicIF>
getOccurrenceThemes()
PUBLIC: Gets the set of all topics that are used in the direct scope of at least one occurrence.Collection<TopicNameIF>
getTopicNames(TopicIF theme)
PUBLIC: Gets all topic names that have the given topic in their direct scope.Collection<TopicIF>
getTopicNameThemes()
PUBLIC: Gets the set of all topics that are used in the direct scope of at least one topic name.Collection<VariantNameIF>
getVariants(TopicIF theme)
PUBLIC: Gets all variant names that have the given topic in their direct scope.Collection<TopicIF>
getVariantThemes()
PUBLIC: Gets the set of all topics that are used in the direct scope of at least one variant name.boolean
usedAsAssociationTheme(TopicIF topic)
PUBLIC: Returns true if the topic has been used in the direct scope of at least one association.boolean
usedAsOccurrenceTheme(TopicIF topic)
PUBLIC: Returns true if the topic has been used in the direct scope of at least one occurrence.boolean
usedAsTheme(TopicIF topic)
PUBLIC: Returns true if the topic has been used in a direct scope somewhere in the topic map.boolean
usedAsTopicNameTheme(TopicIF topic)
PUBLIC: Returns true if the topic has been used in the direct scope of at least one topic name.boolean
usedAsVariantTheme(TopicIF topic)
PUBLIC: Returns true if the topic has been used in the direct scope of at least one variant name.-
Methods inherited from class net.ontopia.topicmaps.impl.utils.BasicIndex
getIndex, processEvent
-
-
-
-
Field Detail
-
basenames
protected CollectionMap<TopicIF,TopicNameIF> basenames
-
variants
protected CollectionMap<TopicIF,VariantNameIF> variants
-
occurs
protected CollectionMap<TopicIF,OccurrenceIF> occurs
-
assocs
protected CollectionMap<TopicIF,AssociationIF> assocs
-
-
Method Detail
-
getTopicNames
public Collection<TopicNameIF> getTopicNames(TopicIF theme)
Description copied from interface:ScopeIndexIF
PUBLIC: Gets all topic names that have the given topic in their direct scope.- Specified by:
getTopicNames
in interfaceScopeIndexIF
- Parameters:
theme
- The given topic.- Returns:
- A collection of TopicNameIF objects; the topic names that have the given topic in their direct scope.
-
getVariants
public Collection<VariantNameIF> getVariants(TopicIF theme)
Description copied from interface:ScopeIndexIF
PUBLIC: Gets all variant names that have the given topic in their direct scope. Note that 'variant' does not have a 'scope' child element, but only a 'parameters' child element, which is considered by the engine to be the same as a scope in practice.- Specified by:
getVariants
in interfaceScopeIndexIF
- Parameters:
theme
- The given topic.- Returns:
- A collection of VariantNameIF objects; the variant names that have the given topic in their parameters.
-
getOccurrences
public Collection<OccurrenceIF> getOccurrences(TopicIF theme)
Description copied from interface:ScopeIndexIF
PUBLIC: Gets all occurrences that have the given topic in their direct scope.- Specified by:
getOccurrences
in interfaceScopeIndexIF
- Parameters:
theme
- The given topic.- Returns:
- A collection of OccurrenceIF objects; the occurrences that have the given topic in their direct scope.
-
getAssociations
public Collection<AssociationIF> getAssociations(TopicIF theme)
Description copied from interface:ScopeIndexIF
PUBLIC: Gets all associations that have the given topic in their direct scope.- Specified by:
getAssociations
in interfaceScopeIndexIF
- Parameters:
theme
- The given topic.- Returns:
- A collection of AssociationIF objects; the associations that have the given topic in their direct scope.
-
getTopicNameThemes
public Collection<TopicIF> getTopicNameThemes()
Description copied from interface:ScopeIndexIF
PUBLIC: Gets the set of all topics that are used in the direct scope of at least one topic name.- Specified by:
getTopicNameThemes
in interfaceScopeIndexIF
- Returns:
- A collection of TopicIF objects.
-
getVariantThemes
public Collection<TopicIF> getVariantThemes()
Description copied from interface:ScopeIndexIF
PUBLIC: Gets the set of all topics that are used in the direct scope of at least one variant name.- Specified by:
getVariantThemes
in interfaceScopeIndexIF
- Returns:
- A collection of TopicIF objects.
-
getOccurrenceThemes
public Collection<TopicIF> getOccurrenceThemes()
Description copied from interface:ScopeIndexIF
PUBLIC: Gets the set of all topics that are used in the direct scope of at least one occurrence.- Specified by:
getOccurrenceThemes
in interfaceScopeIndexIF
- Returns:
- A collection of TopicIF objects.
-
getAssociationThemes
public Collection<TopicIF> getAssociationThemes()
Description copied from interface:ScopeIndexIF
PUBLIC: Gets the set of all topics that are used in the direct scope of at least one association.- Specified by:
getAssociationThemes
in interfaceScopeIndexIF
- Returns:
- A collection of TopicIF objects.
-
usedAsTopicNameTheme
public boolean usedAsTopicNameTheme(TopicIF topic)
Description copied from interface:ScopeIndexIF
PUBLIC: Returns true if the topic has been used in the direct scope of at least one topic name.- Specified by:
usedAsTopicNameTheme
in interfaceScopeIndexIF
-
usedAsVariantTheme
public boolean usedAsVariantTheme(TopicIF topic)
Description copied from interface:ScopeIndexIF
PUBLIC: Returns true if the topic has been used in the direct scope of at least one variant name.- Specified by:
usedAsVariantTheme
in interfaceScopeIndexIF
-
usedAsOccurrenceTheme
public boolean usedAsOccurrenceTheme(TopicIF topic)
Description copied from interface:ScopeIndexIF
PUBLIC: Returns true if the topic has been used in the direct scope of at least one occurrence.- Specified by:
usedAsOccurrenceTheme
in interfaceScopeIndexIF
-
usedAsAssociationTheme
public boolean usedAsAssociationTheme(TopicIF topic)
Description copied from interface:ScopeIndexIF
PUBLIC: Returns true if the topic has been used in the direct scope of at least one association.- Specified by:
usedAsAssociationTheme
in interfaceScopeIndexIF
-
usedAsTheme
public boolean usedAsTheme(TopicIF topic)
Description copied from interface:ScopeIndexIF
PUBLIC: Returns true if the topic has been used in a direct scope somewhere in the topic map.- Specified by:
usedAsTheme
in interfaceScopeIndexIF
-
-