org.tmapi.index
Interface ScopedIndex

All Superinterfaces:
Index

public interface ScopedIndex
extends Index

Index for Scoped statements and their scope. This index provides access to Associations, Occurrences, Names, and Variants by their scope property and to Topics which are used as theme in a scope.

Version:
$Rev: 65 $ - $Date: 2008-08-19 13:14:19 +0200 (Di, 19 Aug 2008) $
Author:
The TMAPI Project

Method Summary
 java.util.Collection<Association> getAssociations(Topic theme)
          Returns the Associations in the topic map whose scope property contains the specified theme.
 java.util.Collection<Association> getAssociations(Topic[] themes, boolean matchAll)
          Returns the Associations in the topic map whose scope property equals one of those themes at least.
 java.util.Collection<Topic> getAssociationThemes()
          Returns the topics in the topic map used in the scope property of Associations.
 java.util.Collection<Name> getNames(Topic theme)
          Returns the Names in the topic map whose scope property contains the specified theme.
 java.util.Collection<Name> getNames(Topic[] themes, boolean matchAll)
          Returns the Names in the topic map whose scope property equals one of those themes at least.
 java.util.Collection<Topic> getNameThemes()
          Returns the topics in the topic map used in the scope property of Names.
 java.util.Collection<Occurrence> getOccurrences(Topic theme)
          Returns the Occurrences in the topic map whose scope property contains the specified theme.
 java.util.Collection<Occurrence> getOccurrences(Topic[] themes, boolean matchAll)
          Returns the Occurrences in the topic map whose scope property equals one of those themes at least.
 java.util.Collection<Topic> getOccurrenceThemes()
          Returns the topics in the topic map used in the scope property of Occurrences.
 java.util.Collection<Variant> getVariants(Topic theme)
          Returns the Variants in the topic map whose scope property contains the specified theme.
 java.util.Collection<Variant> getVariants(Topic[] themes, boolean matchAll)
          Returns the Variants in the topic map whose scope property equals one of those themes at least.
 java.util.Collection<Topic> getVariantThemes()
          Returns the topics in the topic map used in the scope property of Variants.
 
Methods inherited from interface org.tmapi.index.Index
close, isAutoUpdated, isOpen, open, reindex
 

Method Detail

getAssociations

java.util.Collection<Association> getAssociations(Topic theme)
Returns the Associations in the topic map whose scope property contains the specified theme. The return value may be empty but must never be null.

Parameters:
theme - The Topic which must be part of the scope. If it is null all Associations in the unconstrained scope are returned.
Returns:
An unmodifiable collection of Associations.

getAssociations

java.util.Collection<Association> getAssociations(Topic[] themes,
                                                  boolean matchAll)
Returns the Associations in the topic map whose scope property equals one of those themes at least. The return value may be empty but must never be null.

Parameters:
themes - Scope of the Associations to be returned.
matchAll - If true the scope property of an association must match all themes, if false one theme must be matched at least.
Returns:
An unmodifiable collection of Associations.
Throws:
java.lang.IllegalArgumentException - If themes is null.

getAssociationThemes

java.util.Collection<Topic> getAssociationThemes()
Returns the topics in the topic map used in the scope property of Associations. The return value may be empty but must never be null.

Returns:
An unmodifiable collection of Topics.

getOccurrences

java.util.Collection<Occurrence> getOccurrences(Topic theme)
Returns the Occurrences in the topic map whose scope property contains the specified theme. The return value may be empty but must never be null.

Parameters:
theme - The Topic which must be part of the scope. If it is null all Occurrences in the unconstrained scope are returned.
Returns:
An unmodifiable collection of Occurrences.

getOccurrences

java.util.Collection<Occurrence> getOccurrences(Topic[] themes,
                                                boolean matchAll)
Returns the Occurrences in the topic map whose scope property equals one of those themes at least. The return value may be empty but must never be null.

Parameters:
themes - Scope of the Occurrences to be returned.
matchAll - If true the scope property of an occurrence must match all themes, if false one theme must be matched at least.
Returns:
An unmodifiable collection of Occurrences.
Throws:
java.lang.IllegalArgumentException - If themes is null.

getOccurrenceThemes

java.util.Collection<Topic> getOccurrenceThemes()
Returns the topics in the topic map used in the scope property of Occurrences. The return value may be empty but must never be null.

Returns:
An unmodifiable collection of Topics.

getNames

java.util.Collection<Name> getNames(Topic theme)
Returns the Names in the topic map whose scope property contains the specified theme. The return value may be empty but must never be null.

Parameters:
theme - The Topic which must be part of the scope. If it is null all Names in the unconstrained scope are returned.
Returns:
An unmodifiable collection of Names.

getNames

java.util.Collection<Name> getNames(Topic[] themes,
                                    boolean matchAll)
Returns the Names in the topic map whose scope property equals one of those themes at least. The return value may be empty but must never be null.

Parameters:
themes - Scope of the Names to be returned.
matchAll - If true the scope property of a name must match all themes, if false one theme must be matched at least.
Returns:
An unmodifiable collection of Names.
Throws:
java.lang.IllegalArgumentException - If themes is null.

getNameThemes

java.util.Collection<Topic> getNameThemes()
Returns the topics in the topic map used in the scope property of Names. The return value may be empty but must never be null.

Returns:
An unmodifiable collection of Topics.

getVariants

java.util.Collection<Variant> getVariants(Topic theme)
Returns the Variants in the topic map whose scope property contains the specified theme. The return value may be empty but must never be null.

Parameters:
theme - The Topic which must be part of the scope. This must not be null.
Returns:
An unmodifiable collection of Variants.
Throws:
java.lang.IllegalArgumentException - If theme is null.

getVariants

java.util.Collection<Variant> getVariants(Topic[] themes,
                                          boolean matchAll)
Returns the Variants in the topic map whose scope property equals one of those themes at least. The return value may be empty but must never be null.

Parameters:
themes - Scope of the Variants to be returned.
matchAll - If true the scope property of a variant must match all themes, if false one theme must be matched at least.
Returns:
An unmodifiable collection of Variants.
Throws:
java.lang.IllegalArgumentException - If themes is null.

getVariantThemes

java.util.Collection<Topic> getVariantThemes()
Returns the topics in the topic map used in the scope property of Variants. The return value may be empty but must never be null.

Returns:
An unmodifiable collection of Topics.