|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.indexmanagement.bdbwrapper.BDBWrapper
public class BDBWrapper
Class to store key and value pairs in the berkeley database
| Field Summary | |
|---|---|
static String |
EXACT
|
static String[] |
SupportedRelations
|
static String |
WITHIN
|
| Constructor Summary | |
|---|---|
BDBWrapper(String baseDir,
String dbName,
String resourceId,
String[] keyNames,
ForwardIndexType[] dbT)
Provides the ability to store simple key-value pairs. |
|
| Method Summary | |
|---|---|
void |
close()
Closes this BDBWrapper by deleting the whole index |
protected void |
finalize()
|
String |
getAllDec(String keyName,
ResultType resType)
Gets all. |
String |
getAllInc(String keyName,
ResultType resType)
Gets all. |
String |
getEQ(String keyName,
Object key,
ResultType resType)
Gets the values where the key equals the input key. |
String |
getGE(String keyName,
Object keyGE,
ResultType resType)
Gets values >= keyGE. |
String |
getGEandLE(String keyName,
Object keyGE,
Object keyLE,
ResultType resType)
Gets keyGE <= values <= keyLE |
String |
getGEandLT(String keyName,
Object keyGE,
Object keyLT,
ResultType resType)
Gets keyGE <= values < keyLT |
String |
getGT(String keyName,
Object keyGT,
ResultType resType)
Gets keyGT < values |
String |
getGTandLE(String keyName,
Object keyGT,
Object keyLE,
ResultType resType)
Gets keyGT < values <= keyLE |
String |
getGTandLT(String keyName,
Object keyGT,
Object keyLT,
ResultType resType)
Gets keyGT < values < keyLT |
String |
getLE(String keyName,
Object keyLE,
ResultType resType)
Gets values <= keyLE |
String |
getLT(String keyName,
Object keyLT,
ResultType resType)
Gets values < keyLT |
int |
getNumDocs()
Returns the number of stored documents(values) |
int[] |
getNumKeys()
Returns the number of entries for each indexed field |
long |
getPackageSize()
Returns the package size that determines how keys and values are multiplexed. |
static ArrayList<String> |
getPresentableFromXML(String fieldsString,
String colID,
String colLang)
Parses the XML containing the presentable information for a document (FORMAT: |
static HashMap<String,String> |
getPresentationFieldsFromXML(String fieldsString)
Parses the XML containing the presentable information for a document (FORMAT: |
void |
mergeAddition(File inputIndex)
Receives the file with rowsets that is to be merged into the index. |
int |
mergeDeletion(File deletionFile)
THIS METHOD IS NEVER CALLED IN FORWARD INDEX. |
URI |
processQuery(String cqlQuery,
ArrayList<String> presentable,
ArrayList<String> searchable,
RRadaptor adaptor)
|
void |
setPackageSize(long packageSize)
Sets the package size that determines how keys and values are multiplexed. |
void |
updateIndex()
Updates the index. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String EXACT
public static final String WITHIN
public static String[] SupportedRelations
| Constructor Detail |
|---|
public BDBWrapper(String baseDir,
String dbName,
String resourceId,
String[] keyNames,
ForwardIndexType[] dbT)
throws IndexException
baseDir - The base directory - it must exist before the call to the constructordbName - The name of the database to be usedresourceId - The ID of the collection to be indexedkeyNames - The names of the keys. One index is created for each keyNamedbT - The corresponding type of each keyName(int,string or float,string or string,string
date,string).
IndexException - - in case of failure.| Method Detail |
|---|
public int getNumDocs()
public int[] getNumKeys()
public long getPackageSize()
public void setPackageSize(long packageSize)
packageSize - - package size
public void close()
throws Exception
Exception
protected void finalize()
throws Throwable
finalize in class ObjectThrowable
public String getEQ(String keyName,
Object key,
ResultType resType)
throws IndexException
getEQ in interface ForwardIndexkey - - The equality key for the searchbKeysOnly - return only keys, or full tuples?
IndexException - - when IOException is received.
public String getGE(String keyName,
Object keyGE,
ResultType resType)
throws IndexException
getGE in interface ForwardIndexkeyGE - - the keybKeysOnly - return only keys, or full tuples?
IndexException - - when IOException is received.
public String getGT(String keyName,
Object keyGT,
ResultType resType)
throws IndexException
getGT in interface ForwardIndexkeyGT - - The lower exclusive bound keybKeysOnly - return only keys, or full tuples?
IndexException - - when IOException is received.
public String getLE(String keyName,
Object keyLE,
ResultType resType)
throws IndexException
getLE in interface ForwardIndexkeyLE - - The upper inclusive bound keybKeysOnly - return only keys, or full tuples?
IndexException - - when IOException is received.
public String getLT(String keyName,
Object keyLT,
ResultType resType)
throws IndexException
getLT in interface ForwardIndexkeyLT - - The upper exclusive bound keybKeysOnly - return only keys, or full tuples?
IndexException - - when IOException is received.
public String getGEandLE(String keyName,
Object keyGE,
Object keyLE,
ResultType resType)
throws IndexException
getGEandLE in interface ForwardIndexkeyGE - - The lower inclusive boundkeyLE - - The upper inclusive boundbKeysOnly - return only keys, or full tuples?
IndexException - - when IOException is received.
public String getGEandLT(String keyName,
Object keyGE,
Object keyLT,
ResultType resType)
throws IndexException
getGEandLT in interface ForwardIndexkeyGE - - The lower inclusive bound keykeyLT - - The upper exclusive bound keybKeysOnly - return only keys, or full tuples?
IndexException - - when IOException is received.
public String getGTandLE(String keyName,
Object keyGT,
Object keyLE,
ResultType resType)
throws IndexException
getGTandLE in interface ForwardIndexkeyGT - - The lower exclusive boundkeyLE - - The upper inclusive boundbKeysOnly - return only keys, or full tuples?
IndexException - - when IOException is received.
public String getGTandLT(String keyName,
Object keyGT,
Object keyLT,
ResultType resType)
throws IndexException
getGTandLT in interface ForwardIndexkeyGT - - The lower exclusive bound keykeyLT - - The upper exclusive bound keybKeysOnly - return only keys, or full tuples?
IndexException - - when IOException is received.
public String getAllDec(String keyName,
ResultType resType)
throws IndexException
bKeysOnly - return only keys, or full tuples?
IndexException - - when IOException is received.
public String getAllInc(String keyName,
ResultType resType)
throws IndexException
bKeysOnly - return only keys, or full tuples?
IndexException - - when IOException is received.
public URI processQuery(String cqlQuery,
ArrayList<String> presentable,
ArrayList<String> searchable,
RRadaptor adaptor)
throws gr.uoa.di.madgik.grs.writer.GRS2WriterException
gr.uoa.di.madgik.grs.writer.GRS2WriterException
public int mergeDeletion(File deletionFile)
throws IndexException
deletionFile - - the file with the content to delete .
IndexException - - in case of failure.
public void mergeAddition(File inputIndex)
throws IndexException
inputIndex - - The file with rowsets that is merged into the index.
IndexException - - in case of error.public static HashMap<String,String> getPresentationFieldsFromXML(String fieldsString)
fieldsString - - XML containing the presentable information for a document
HashMap containing the field pairs
public static ArrayList<String> getPresentableFromXML(String fieldsString,
String colID,
String colLang)
fieldsString - - XML containing the presentable information for a document
ArrayList containing the unique field names
public void updateIndex()
throws IndexException
IndexException - - in case of error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||