MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

ch.ethz.mxquery.opt.index
Class IndexImpl

java.lang.Object
  extended by ch.ethz.mxquery.opt.index.IndexImpl
All Implemented Interfaces:
Index, java.lang.Cloneable

public class IndexImpl
extends java.lang.Object
implements Index, java.lang.Cloneable


Constructor Summary
IndexImpl()
           
 
Method Summary
 void clear()
           
 void compileIndex()
           
 void eqIndex(IndexSchema index, Token[] values, int windowId)
           
 IntegerList eqIndexRetreiveAndRemove(IndexSchema index, Token[] values)
           
 IntegerList eqIndexRetrieve(IndexSchema index, Token[] values)
           
 int get()
          Returns the min value
 int get(int i)
          Returns the value at position
 int[] getAll()
           
 int getAndRemove()
          Returns the min value and removes it
 int getAndRemove(int i)
           
 int[] getAndRemoveAll()
           
 java.util.Vector getGroups(IndexSchema schema)
           
 java.util.Vector getValues(IndexSchema schema)
           
 void index(IndexSchema index, Token[][] indexValues, int value)
          Like a simple value index but for general comparisons
 void index(IndexSchema index, Token[] values, int windowId)
           
 void index(int value)
          Indexes the value without indexValues :-)
 void neqIndex(IndexSchema index, Token[] values, int windowId)
           
 IntegerList neqIndexRetreiveAndRemove(IndexSchema index, Token[] values)
           
 IntegerList neqIndexRetrieve(IndexSchema index, Token[] values)
           
 boolean registerIndex(IndexSchema index)
          Registered a new Index.
 void remove()
           
 void remove(int value)
          Returns the first value
 IntegerList retreive(IndexSchema index, Token[] values)
           
 IntegerList retreive(IndexSchema index, Token[][] indexValues)
          Like a simple value index but for general comparisons
 IntegerList retreiveAndRemove(IndexSchema index, Token[] values)
           
 IntegerList retreiveAndRemove(IndexSchema index, Token[][] indexValues)
           
 int size()
          Gets the number of elements in the index
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexImpl

public IndexImpl()
Method Detail

registerIndex

public boolean registerIndex(IndexSchema index)
Description copied from interface: Index
Registered a new Index.

Specified by:
registerIndex in interface Index
Parameters:
index - the index schema
Returns:
If the Regestration was successfull

index

public void index(int value)
Description copied from interface: Index
Indexes the value without indexValues :-)

Specified by:
index in interface Index
Parameters:
value - >= 0

remove

public void remove()

getAndRemove

public int getAndRemove()
Description copied from interface: Index
Returns the min value and removes it

Specified by:
getAndRemove in interface Index
Returns:
the value

get

public int get()
Description copied from interface: Index
Returns the min value

Specified by:
get in interface Index
Returns:
the minimal value

remove

public void remove(int value)
Description copied from interface: Index
Returns the first value

Specified by:
remove in interface Index

index

public void index(IndexSchema index,
                  Token[][] indexValues,
                  int value)
Description copied from interface: Index
Like a simple value index but for general comparisons

Specified by:
index in interface Index
value - >= 0

index

public void index(IndexSchema index,
                  Token[] values,
                  int windowId)
Specified by:
index in interface Index
windowId - >= 0

eqIndex

public void eqIndex(IndexSchema index,
                    Token[] values,
                    int windowId)

neqIndex

public void neqIndex(IndexSchema index,
                     Token[] values,
                     int windowId)

eqIndexRetrieve

public IntegerList eqIndexRetrieve(IndexSchema index,
                                   Token[] values)

neqIndexRetrieve

public IntegerList neqIndexRetrieve(IndexSchema index,
                                    Token[] values)

retreive

public IntegerList retreive(IndexSchema index,
                            Token[] values)
Specified by:
retreive in interface Index
Returns:
Returns -1 if no window is found

eqIndexRetreiveAndRemove

public IntegerList eqIndexRetreiveAndRemove(IndexSchema index,
                                            Token[] values)

neqIndexRetreiveAndRemove

public IntegerList neqIndexRetreiveAndRemove(IndexSchema index,
                                             Token[] values)

retreiveAndRemove

public IntegerList retreiveAndRemove(IndexSchema index,
                                     Token[][] indexValues)
                              throws MXQueryException
Specified by:
retreiveAndRemove in interface Index
Throws:
MXQueryException

retreiveAndRemove

public IntegerList retreiveAndRemove(IndexSchema index,
                                     Token[] values)
Specified by:
retreiveAndRemove in interface Index

size

public int size()
Description copied from interface: Index
Gets the number of elements in the index

Specified by:
size in interface Index
Returns:
the number of elements

retreive

public IntegerList retreive(IndexSchema index,
                            Token[][] indexValues)
                     throws MXQueryException
Description copied from interface: Index
Like a simple value index but for general comparisons

Specified by:
retreive in interface Index
Returns:
the list of matches, -1 if not found
Throws:
MXQueryException

get

public int get(int i)
Description copied from interface: Index
Returns the value at position

Specified by:
get in interface Index
Returns:
the value at i

compileIndex

public void compileIndex()
Specified by:
compileIndex in interface Index

getAll

public int[] getAll()
Specified by:
getAll in interface Index

getAndRemove

public int getAndRemove(int i)
Specified by:
getAndRemove in interface Index

getAndRemoveAll

public int[] getAndRemoveAll()
Specified by:
getAndRemoveAll in interface Index

clear

public void clear()
Specified by:
clear in interface Index

getGroups

public java.util.Vector getGroups(IndexSchema schema)
Specified by:
getGroups in interface Index

getValues

public java.util.Vector getValues(IndexSchema schema)
Specified by:
getValues in interface Index

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich

MXQuery 0.6.0 API Documentation - Copyright 2006-2009 ETH Zurich