org.tmapi.index
Interface LiteralIndex

All Superinterfaces:
Index

public interface LiteralIndex
extends Index

Index for literal values stored in a topic map.

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

Method Summary
 java.util.Collection<Name> getNames(java.lang.String value)
          Retrieves the topic names in the topic map which have a value equal to value.
 java.util.Collection<Occurrence> getOccurrences(Locator value)
          Returns the Occurrences in the topic map whose value property matches the IRI represented by value.
 java.util.Collection<Occurrence> getOccurrences(java.lang.String value)
          Returns the Occurrences in the topic map whose value property matches value and whose datatype property is xsd:string.
 java.util.Collection<Occurrence> getOccurrences(java.lang.String value, Locator datatype)
          Returns the Occurrences in the topic map whose value property matches value and whose datatye is datatype.
 java.util.Collection<Variant> getVariants(Locator value)
          Returns the Variants in the topic map whose value property matches the IRI represented by value.
 java.util.Collection<Variant> getVariants(java.lang.String value)
          Returns the Variants in the topic map whose value property matches value and whose datatype property is xsd:string.
 java.util.Collection<Variant> getVariants(java.lang.String value, Locator datatype)
          Returns the Variants in the topic map whose value property matches value and whose datatye is datatype.
 
Methods inherited from interface org.tmapi.index.Index
close, isAutoUpdated, isOpen, open, reindex
 

Method Detail

getOccurrences

java.util.Collection<Occurrence> getOccurrences(java.lang.String value)
Returns the Occurrences in the topic map whose value property matches value and whose datatype property is xsd:string. The return value may be empty but must never be null.

Parameters:
value - The value of the Occurrences to be returned.
Returns:
An unmodifiable collection of Occurrences.
Throws:
java.lang.IllegalArgumentException - If the value is null.

getOccurrences

java.util.Collection<Occurrence> getOccurrences(Locator value)
Returns the Occurrences in the topic map whose value property matches the IRI represented by value.

Those Occurrences which have a datatype equal to xsd:anyURI and their value property is equal to Locator.getReference() are returned.

The return value may be empty but must never be null.

Parameters:
value - The value of the Occurrences to be returned.
Returns:
An unmodifiable collection of Occurrences.
Throws:
java.lang.IllegalArgumentException - If the value is null.

getOccurrences

java.util.Collection<Occurrence> getOccurrences(java.lang.String value,
                                                Locator datatype)
Returns the Occurrences in the topic map whose value property matches value and whose datatye is datatype. The return value may be empty but must never be null.

Parameters:
value - The value of the Occurrences to be returned.
datatype - The datatype of the Occurrences to be returned.
Returns:
An unmodifiable collection of Occurrences.
Throws:
java.lang.IllegalArgumentException - If the value or datatype is null.

getVariants

java.util.Collection<Variant> getVariants(java.lang.String value)
Returns the Variants in the topic map whose value property matches value and whose datatype property is xsd:string. The return value may be empty but must never be null.

Parameters:
value - The value of the Variants to be returned.
Returns:
An unmodifiable collection of Variants.
Throws:
java.lang.IllegalArgumentException - If the value is null.

getVariants

java.util.Collection<Variant> getVariants(Locator value)
Returns the Variants in the topic map whose value property matches the IRI represented by value.

Those Variants which have a datatype equal to xsd:anyURI and their value property is equal to Locator.getReference() are returned.

The return value may be empty but must never be null.

Parameters:
value - The value of the Variants to be returned.
Returns:
An unmodifiable collection of Variants.
Throws:
java.lang.IllegalArgumentException - If the value is null.

getVariants

java.util.Collection<Variant> getVariants(java.lang.String value,
                                          Locator datatype)
Returns the Variants in the topic map whose value property matches value and whose datatye is datatype. The return value may be empty but must never be null.

Parameters:
value - The value of the Variants to be returned.
datatype - The datatype of the Variants to be returned.
Returns:
An unmodifiable collection of Variants.
Throws:
java.lang.IllegalArgumentException - If the value or datatype is null.

getNames

java.util.Collection<Name> getNames(java.lang.String value)
Retrieves the topic names in the topic map which have a value equal to value. The return value may be empty but must never be null.

Parameters:
value - The value of the Names to be returned.
Returns:
An unmodifiable collection of Names.
Throws:
java.lang.IllegalArgumentException - If the value is null.