|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kit.furia.FuriaChanEngine
public class FuriaChanEngine
FuriaChanEngine holds the logic necessary to open fragmented programs insert them, and search them in the database.
Field Summary | |
---|---|
protected org.ajmm.obsearch.index.IndexShort<OBFragment> |
index
OBsearch index of our database. |
protected static java.lang.String |
IRINDEX_FOLDER
|
protected IRIndexShort<OBFragment> |
mIndex
Multi-set index. |
protected static java.lang.String |
OBSEARCH_FOLDER
Folder name where OB will reside. |
Constructor Summary | |
---|---|
FuriaChanEngine(java.io.File directory)
Creates a FuriaChan object. |
Method Summary | |
---|---|
void |
close()
|
protected org.ajmm.obsearch.index.IndexShort<OBFragment> |
createIndex(java.io.File folder)
A convenience method that creates an OBSearch index optimized for our distance function. |
void |
freeze()
Freeze the index. |
byte |
getK()
|
float |
getMSetScoreThreshold()
|
short |
getN()
|
short |
getR()
|
float |
getSetScoreThreshold()
|
void |
insert(java.io.File dir)
Insert the given directory into Furia-chan We will ignore applications that have less than |
boolean |
isValidationMode()
|
static java.lang.String |
readString(java.io.File file)
Reads a String from the given file. |
float |
search(java.io.File dir)
Performs a search in the database and prints the result to the user. |
void |
setK(byte k)
|
void |
setMSetScoreThreshold(float setScoreThreshold)
|
void |
setN(short n)
|
void |
setR(short r)
|
void |
setSetScoreThreshold(float setScoreThreshold)
|
void |
setValidate(boolean validationMode)
|
void |
setValidationMode(boolean validationMode)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static java.lang.String OBSEARCH_FOLDER
protected static java.lang.String IRINDEX_FOLDER
protected org.ajmm.obsearch.index.IndexShort<OBFragment> index
protected IRIndexShort<OBFragment> mIndex
Constructor Detail |
---|
public FuriaChanEngine(java.io.File directory) throws java.io.IOException, com.sleepycat.je.DatabaseException, org.ajmm.obsearch.exception.NotFrozenException, java.lang.IllegalAccessException, java.lang.InstantiationException, org.ajmm.obsearch.exception.OBException
directory
- the database directory that will be used.
java.io.IOException
- If directory does not exist and it cannot be created.
org.ajmm.obsearch.exception.OBException
java.lang.InstantiationException
java.lang.IllegalAccessException
org.ajmm.obsearch.exception.NotFrozenException
com.sleepycat.je.DatabaseException
Method Detail |
---|
public boolean isValidationMode()
public void setValidate(boolean validationMode)
public void close() throws IRException
IRException
public void freeze() throws IRException
IRException
- If there is an error in the freezing process.public void insert(java.io.File dir) throws java.io.IOException, IRException
dir
- The dir of an application or a directory of applications.
java.io.IOException
IRException
public float search(java.io.File dir) throws java.io.IOException, IRException
dir
-
java.io.IOException
IRException
public static java.lang.String readString(java.io.File file) throws java.io.IOException
file
- File to Read
java.io.IOException
- If there is an IO errorprotected org.ajmm.obsearch.index.IndexShort<OBFragment> createIndex(java.io.File folder) throws java.io.IOException, com.sleepycat.je.DatabaseException
folder
-
java.io.IOException
com.sleepycat.je.DatabaseException
public void setR(short r)
public void setN(short n) throws org.ajmm.obsearch.exception.OBException
org.ajmm.obsearch.exception.OBException
public void setK(byte k)
public byte getK()
public short getR()
public short getN()
public void setValidationMode(boolean validationMode)
public float getMSetScoreThreshold()
public float getSetScoreThreshold()
public void setMSetScoreThreshold(float setScoreThreshold)
public void setSetScoreThreshold(float setScoreThreshold)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |