|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.uni_leipzig.asv.coocc.BinFileMultColRam
This class gives access to collocations which is slower but less memory-intense. It loads up only the index file and operates on the file per random accesses.
| Field Summary | |
protected int |
columns
The number of columns to assume |
protected byte[] |
dataFile
This is the datafile which is loaded into memory |
protected byte[] |
indexFile
This is the indexfile which is loaded into memory |
| Constructor Summary | |
BinFileMultColRam(String fileName,
int columns)
Sole constructor. |
|
| Method Summary | |
static boolean |
existsFileDump(String fileName)
Tests, whether the required files for this class, given with the fileName exist and are not of null-length (like after a failed start of FilePreparer |
List |
getData(Integer wordNr)
For a given number returns the row |
List |
getData(Integer number,
int maxItems)
Returns the data for the given number up to the given maximum. |
List |
getData(Integer number,
int myColumns,
int maxItems)
Returns the data for the given number up to the given maximum. |
List |
getData(Integer number,
int maxItems,
int[] minCols,
int[] maxCols)
Returns the data for the given number up to the given maximum in a list. |
List |
getData(Integer number,
int myColumns,
int maxItems,
int[] minCols,
int[] maxCols)
Returns the data for the given number up to the given maximum. |
Map |
getDataAsMap(Integer wordNr)
Returns the data for the given number up to the given maximum in a map. |
Map |
getDataAsMap(Integer number,
int maxItems)
Returns the data for the given number up to the given maximum in a map. |
Map |
getDataAsMap(Integer number,
int myColumns,
int maxItems)
Returns the data for the given number up to the given maximum. |
Map |
getDataAsMap(Integer number,
int maxItems,
int[] minCols,
int[] maxCols)
Returns the data for the given number up to the given maximum in a map. |
Map |
getDataAsMap(Integer number,
int myColumns,
int maxItems,
int[] minCols,
int[] maxCols)
Returns the data for the given number up to the given maximum in a map. |
List |
getSingleColumn(Integer number,
int col)
Column here is the column in the initial datafile, count begins with 1. |
List |
getSingleColumn(Integer number,
int maxItems,
int col)
|
static void |
main(String[] args)
With this main method it's possible to test a prepared file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected byte[] indexFile
protected byte[] dataFile
protected int columns
| Constructor Detail |
public BinFileMultColRam(String fileName,
int columns)
fileName - columns - How many columns the original file had (must match exactly!)| Method Detail |
public static boolean existsFileDump(String fileName)
fileName - relative or absolute filename without index or data extensions
public List getData(Integer wordNr)
getData in interface BinFileMultColwordNr - Integer
public List getData(Integer number,
int maxItems)
getData in interface BinFileMultColmaxItems -
public List getData(Integer number,
int myColumns,
int maxItems)
getData in interface BinFileMultColnumber - = the first columnmyColumns - = how many columns to returnmaxItems - = at max this count of items
public List getData(Integer number,
int myColumns,
int maxItems,
int[] minCols,
int[] maxCols)
getData in interface BinFileMultColnumber - = the first columnmyColumns - = how many columns to returnmaxItems - = at max this count of itemsminCols - = for each column each value minimum is specified heremaxCols - = for each column each value maximum is specified here
public List getData(Integer number,
int maxItems,
int[] minCols,
int[] maxCols)
getData in interface BinFileMultColmaxItems - How many items to return at maxminCols - for each column the minimum allowed value (the whoe row will
otherwise be omitted)maxCols - for each column the maximum allowed value (the whoe row will
otherwise be omitted)
public Map getDataAsMap(Integer wordNr)
getDataAsMap in interface BinFileMultColwordNr - The number of the item of which to return the columns
public Map getDataAsMap(Integer number,
int myColumns,
int maxItems)
getDataAsMap in interface BinFileMultColmyColumns - How many columns to returnmaxItems - How many items to return at max
public Map getDataAsMap(Integer number,
int maxItems)
getDataAsMap in interface BinFileMultColmaxItems - How many items to return at max
public Map getDataAsMap(Integer number,
int myColumns,
int maxItems,
int[] minCols,
int[] maxCols)
getDataAsMap in interface BinFileMultColmyColumns - How many columns to returnmaxItems - How many items to return at maxminCols - for each column the minimum allowed value (the whoe row will
otherwise be omitted)maxCols - for each column the maximum allowed value (the whoe row will
otherwise be omitted)
public Map getDataAsMap(Integer number,
int maxItems,
int[] minCols,
int[] maxCols)
getDataAsMap in interface BinFileMultColmaxItems - How many items to return at max
otherwise be omitted)maxCols - for each column the maximum allowed value (the whoe row will
otherwise be omitted)
public List getSingleColumn(Integer number,
int col)
getSingleColumn in interface BinFileMultColnumber - col -
public List getSingleColumn(Integer number,
int maxItems,
int col)
getSingleColumn in interface BinFileMultColpublic static void main(String[] args)
args - String[]
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||