org.tmapi.index.core
Interface OccurrencesIndex

All Superinterfaces:
Index, TopicMapSystem.ConfigurableHelperObject

public interface OccurrencesIndex
extends Index

An index of all Occurrence instances in the TopicMap by their type and resource reference or resource data.

Since:
1.0

Method Summary
 java.util.Collection getOccurrencesByResource(Locator loc)
          Returns the Occurrences in the topic map whose resource locator matches loc.
 java.util.Collection getOccurrencesByType(Topic type)
          Returns the Occurrences typed by the topic type.
 java.util.Collection getOccurrencesByValue(java.lang.String value)
          Returns the Occurrences in the topic map whose value property matches value The return value may be an empty Collection but must never be null.
 java.util.Collection getOccurrenceTypes()
          Returns the Topics which are used to type Occurrences in the indexed TopicMap.
 
Methods inherited from interface org.tmapi.index.Index
close, getFlags, isOpen, open, reindex
 
Methods inherited from interface org.tmapi.core.TopicMapSystem.ConfigurableHelperObject
configure
 

Method Detail

getOccurrenceTypes

public java.util.Collection getOccurrenceTypes()
Returns the Topics which are used to type Occurrences in the indexed TopicMap. The return value may be an empty Collection but must never be null.

Returns:
a Collection of Topic instances

getOccurrencesByType

public java.util.Collection getOccurrencesByType(Topic type)
Returns the Occurrences typed by the topic type. The return value may be an empty Collection but must never be null.

Parameters:
type - the type of Occurrences to be returned If type is null a collection containing all untyped Occurrences will be returned
Returns:
a Collection of Occurrence instances.

getOccurrencesByResource

public java.util.Collection getOccurrencesByResource(Locator loc)
Returns the Occurrences in the topic map whose resource locator matches loc. The return value may be an empty Collection but must never be null.

Parameters:
loc - the Locator used to query the index (MUST NOT be null)
Returns:
a Collection of Occurrence instances.

getOccurrencesByValue

public java.util.Collection getOccurrencesByValue(java.lang.String value)
Returns the Occurrences in the topic map whose value property matches value The return value may be an empty Collection but must never be null.

Parameters:
value - the data string used to query the index (MUST NOT be null)
Returns:
a Collection of Occurrence instances.