Class OccurrenceIndex
- java.lang.Object
-
- net.ontopia.topicmaps.impl.utils.AbstractIndex
-
- net.ontopia.topicmaps.impl.utils.BasicIndex
-
- net.ontopia.topicmaps.impl.basic.index.OccurrenceIndex
-
- All Implemented Interfaces:
IndexIF
,OccurrenceIndexIF
,EventListenerIF
public class OccurrenceIndex extends BasicIndex implements OccurrenceIndexIF
INTERNAL: The basic dynamic locator 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 CollectionSortedMap<String,OccurrenceIF>
occurs
protected static Comparator<String>
STRING_PREFIX_COMPARATOR
-
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<OccurrenceIF>
getOccurrences(String value)
INTERNAL: Gets all occurrences that have the specified value independent of datatype.Collection<OccurrenceIF>
getOccurrences(String value, LocatorIF datatype)
INTERNAL: Gets all occurrences that have the specified value and datatype.Collection<OccurrenceIF>
getOccurrences(String value, LocatorIF datatype, TopicIF occurrenceType)
INTERNAL: Gets all occurrences that have the specified value, datatype and occurrenceType.Collection<OccurrenceIF>
getOccurrences(String value, TopicIF occurrenceType)
INTERNAL: Gets all occurrences that have the specified value and occurrenceType independent of datatype.Collection<OccurrenceIF>
getOccurrencesByPrefix(String prefix)
INTERNAL: Gets all occurrences of any datatype that have a value starting with the specified prefix.Collection<OccurrenceIF>
getOccurrencesByPrefix(String prefix, LocatorIF datatype)
INTERNAL: Gets all occurrences that have the specifed datatype and a value starting with the specified prefix.Iterator<String>
getValuesGreaterThanOrEqual(String value)
INTERNAL: Gets all occurrence values that are greather than or equal to the given value.Iterator<String>
getValuesSmallerThanOrEqual(String value)
INTERNAL: Gets all occurrence values that are smaller than or equal to the given value.-
Methods inherited from class net.ontopia.topicmaps.impl.utils.BasicIndex
getIndex, processEvent
-
-
-
-
Field Detail
-
occurs
protected CollectionSortedMap<String,OccurrenceIF> occurs
-
STRING_PREFIX_COMPARATOR
protected static final Comparator<String> STRING_PREFIX_COMPARATOR
-
-
Method Detail
-
getOccurrences
public Collection<OccurrenceIF> getOccurrences(String value)
Description copied from interface:OccurrenceIndexIF
INTERNAL: Gets all occurrences that have the specified value independent of datatype.- Specified by:
getOccurrences
in interfaceOccurrenceIndexIF
- Returns:
- A collection of OccurrenceIF objects.
-
getOccurrences
public Collection<OccurrenceIF> getOccurrences(String value, TopicIF occurrenceType)
Description copied from interface:OccurrenceIndexIF
INTERNAL: Gets all occurrences that have the specified value and occurrenceType independent of datatype.- Specified by:
getOccurrences
in interfaceOccurrenceIndexIF
- Returns:
- A collection of OccurrenceIF objects.
-
getOccurrences
public Collection<OccurrenceIF> getOccurrences(String value, LocatorIF datatype)
Description copied from interface:OccurrenceIndexIF
INTERNAL: Gets all occurrences that have the specified value and datatype.- Specified by:
getOccurrences
in interfaceOccurrenceIndexIF
- Returns:
- A collection of OccurrenceIF objects.
-
getOccurrences
public Collection<OccurrenceIF> getOccurrences(String value, LocatorIF datatype, TopicIF occurrenceType)
Description copied from interface:OccurrenceIndexIF
INTERNAL: Gets all occurrences that have the specified value, datatype and occurrenceType.- Specified by:
getOccurrences
in interfaceOccurrenceIndexIF
- Returns:
- A collection of OccurrenceIF objects.
-
getOccurrencesByPrefix
public Collection<OccurrenceIF> getOccurrencesByPrefix(String prefix)
Description copied from interface:OccurrenceIndexIF
INTERNAL: Gets all occurrences of any datatype that have a value starting with the specified prefix.- Specified by:
getOccurrencesByPrefix
in interfaceOccurrenceIndexIF
- Returns:
- A collection of OccurrenceIF objects.
-
getOccurrencesByPrefix
public Collection<OccurrenceIF> getOccurrencesByPrefix(String prefix, LocatorIF datatype)
Description copied from interface:OccurrenceIndexIF
INTERNAL: Gets all occurrences that have the specifed datatype and a value starting with the specified prefix.- Specified by:
getOccurrencesByPrefix
in interfaceOccurrenceIndexIF
- Returns:
- A collection of OccurrenceIF objects.
-
getValuesGreaterThanOrEqual
public Iterator<String> getValuesGreaterThanOrEqual(String value)
Description copied from interface:OccurrenceIndexIF
INTERNAL: Gets all occurrence values that are greather than or equal to the given value.- Specified by:
getValuesGreaterThanOrEqual
in interfaceOccurrenceIndexIF
-
getValuesSmallerThanOrEqual
public Iterator<String> getValuesSmallerThanOrEqual(String value)
Description copied from interface:OccurrenceIndexIF
INTERNAL: Gets all occurrence values that are smaller than or equal to the given value.- Specified by:
getValuesSmallerThanOrEqual
in interfaceOccurrenceIndexIF
-
-