org.deri.iris.storage
Interface IIndexFactory

All Known Implementing Classes:
SimpleIndexFactory

public interface IIndexFactory

The interface of all index factories.

See Also:
IIndex

Method Summary
 IIndex createIndex(IRelation relation, IEquivalentTerms equivalentTerms, int... indices)
          Creates a new index on the given relation on the given terms positions (indices).
 IIndex createIndex(IRelation relation, int... indices)
          Creates a new index on the given relation on the given terms positions (indices).
 

Method Detail

createIndex

IIndex createIndex(IRelation relation,
                   int... indices)
Creates a new index on the given relation on the given terms positions (indices).

Parameters:
relation - The relation that the index will use.
indices - The ordered collection of indices. This collection must have a size 0 <= size <= arity of the relation. e.g. to create an index on terms c1 and c4 for a relation Q( c0, c1, c2, c3, c4 ), the indices will be { 1, 4 }
Returns:
The new index instance.

createIndex

IIndex createIndex(IRelation relation,
                   IEquivalentTerms equivalentTerms,
                   int... indices)
Creates a new index on the given relation on the given terms positions (indices). The index uses the specified equivalent terms to identify equivalent terms. When tuples of this index are matched against a specific key, this index also returns tuples, whose corresponding terms are equivalent to the terms of the key.

Parameters:
relation - The relation that the index will use.
indices - The ordered collection of indices. This collection must have a size 0 <= size <= arity of the relation. e.g. to create an index on terms c1 and c4 for a relation Q( c0, c1, c2, c3, c4 ), the indices will be { 1, 4 }
equivalentTerms - The equivalent terms.
Returns:
The new index instance.