modnlp.idx.database
public class SubcorpusTable extends java.lang.Object
KEY | DATA ---------------|------------------- section_name | [start_pos, end_pos]
Modifier and Type | Field and Description |
---|---|
protected com.sleepycat.je.Database |
database |
protected java.lang.String |
dbname |
protected com.sleepycat.je.Environment |
environment |
protected LogStream |
logf |
Constructor and Description |
---|
SubcorpusTable(com.sleepycat.je.Environment env,
java.lang.String fn,
boolean write) |
SubcorpusTable(com.sleepycat.je.Environment env,
java.lang.String fn,
boolean write,
boolean opensecond) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
dump() |
static boolean |
exists(com.sleepycat.je.Environment env,
int fno) |
static boolean |
exists(com.sleepycat.je.Environment env,
java.lang.String fn) |
SubcorpusDelimPair |
fetch(java.lang.String sik) |
void |
finalize() |
void |
get(com.sleepycat.je.DatabaseEntry key,
com.sleepycat.je.DatabaseEntry data) |
int |
getFileIDNumber() |
com.sleepycat.je.SecondaryCursor |
getSecondaryCursor() |
java.lang.String |
getSectionID(int pos)
given a file offset position, retrieve a section enclosing that
position or null if none such section exists
CAVEAT: This assumes no nested sections are indexed.
|
SubcorpusDelimPair[] |
getSubcorpusDelimPairs(java.util.Set ids) |
static void |
main(java.lang.String[] argv) |
static java.lang.String |
makeDBName(int fn) |
static java.lang.String |
makeDBName(java.lang.String fn) |
static java.lang.String |
makeSecondaryDBName(int fn) |
static java.lang.String |
makeSecondaryDBName(java.lang.String fn) |
void |
put(com.sleepycat.je.DatabaseEntry key,
com.sleepycat.je.DatabaseEntry val) |
void |
put(java.lang.String sik,
SubcorpusDelimPair tuple) |
void |
remove(com.sleepycat.je.DatabaseEntry key) |
SubcorpusMap |
removeFile()
Remove all entries whose file ids match founo and return a
SubcorpusMap of the entries removed
|
void |
setup(com.sleepycat.je.Environment env,
java.lang.String fn,
boolean write,
LogStream l) |
java.lang.String |
toString() |
protected com.sleepycat.je.Environment environment
protected com.sleepycat.je.Database database
protected java.lang.String dbname
protected LogStream logf
public SubcorpusTable(com.sleepycat.je.Environment env, java.lang.String fn, boolean write, boolean opensecond) throws com.sleepycat.je.DatabaseNotFoundException
com.sleepycat.je.DatabaseNotFoundException
public SubcorpusTable(com.sleepycat.je.Environment env, java.lang.String fn, boolean write) throws com.sleepycat.je.DatabaseNotFoundException
com.sleepycat.je.DatabaseNotFoundException
public int getFileIDNumber()
public void put(java.lang.String sik, SubcorpusDelimPair tuple)
public SubcorpusMap removeFile()
founo
- an int
valuepublic SubcorpusDelimPair fetch(java.lang.String sik)
public final SubcorpusDelimPair[] getSubcorpusDelimPairs(java.util.Set ids)
public void dump()
public static boolean exists(com.sleepycat.je.Environment env, int fno)
public static boolean exists(com.sleepycat.je.Environment env, java.lang.String fn)
public java.lang.String getSectionID(int pos)
os
- an int
an offset position for this fileString
id of a section enclosing pos or
null if none such section existspublic com.sleepycat.je.SecondaryCursor getSecondaryCursor() throws com.sleepycat.je.DatabaseException
com.sleepycat.je.DatabaseException
public static final java.lang.String makeDBName(java.lang.String fn)
public static final java.lang.String makeDBName(int fn)
public static final java.lang.String makeSecondaryDBName(int fn)
public static final java.lang.String makeSecondaryDBName(java.lang.String fn)
public void close()
public void finalize()
public static void main(java.lang.String[] argv)
public void setup(com.sleepycat.je.Environment env, java.lang.String fn, boolean write, LogStream l) throws com.sleepycat.je.DatabaseNotFoundException
com.sleepycat.je.DatabaseNotFoundException
public java.lang.String toString()
toString
in class java.lang.Object
public void put(com.sleepycat.je.DatabaseEntry key, com.sleepycat.je.DatabaseEntry val)
public void remove(com.sleepycat.je.DatabaseEntry key)
public void get(com.sleepycat.je.DatabaseEntry key, com.sleepycat.je.DatabaseEntry data)