de.uni_leipzig.asv.coocc
Class BinFileStrCol

java.lang.Object
  extended byde.uni_leipzig.asv.coocc.BinFileStrCol

public class BinFileStrCol
extends Object

Reads the stored files for wordstrings.


Field Summary
protected  RandomAccessFile dataFileReader
           
protected  String fileName
           
protected  byte[] indexFile
           
 
Constructor Summary
BinFileStrCol(String fileName)
           
 
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
 int getMaxWordNr()
          Look up in file2 what's at position n-1 and n and returns the wort_bin from n-1 to n from file1 as Object[2] with Object[0]=String and Object[1]=Integer
 Integer getNumber(String word)
          Lineare Suche zum auffinden von Wortnummern
 String getWord(Integer wordNr)
          Look up in file2 what's at position n-1 and n and returns the wort_bin from n-1 to n from file1 as Object[2] with Object[0]=String and Object[1]=Integer
 List getWordsForNumbersSameOrder(List numbers)
           
static void main(String[] args)
           
 void testFiles(String fileName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

indexFile

protected byte[] indexFile

dataFileReader

protected RandomAccessFile dataFileReader

fileName

protected String fileName
Constructor Detail

BinFileStrCol

public BinFileStrCol(String fileName)
Method Detail

getMaxWordNr

public int getMaxWordNr()
Look up in file2 what's at position n-1 and n and returns the wort_bin from n-1 to n from file1 as Object[2] with Object[0]=String and Object[1]=Integer

Returns:

getNumber

public Integer getNumber(String word)
Lineare Suche zum auffinden von Wortnummern

Parameters:
word -
Returns:

getWord

public String getWord(Integer wordNr)
Look up in file2 what's at position n-1 and n and returns the wort_bin from n-1 to n from file1 as Object[2] with Object[0]=String and Object[1]=Integer

Parameters:
wordNr -
Returns:

getWordsForNumbersSameOrder

public List getWordsForNumbersSameOrder(List numbers)

existsFileDump

public 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

Parameters:
fileName - relative or absolute filename without index or data extensions
Returns:

testFiles

public void testFiles(String fileName)

main

public static void main(String[] args)