|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.egothor.apps.Directory
public class Directory
Use this program to process HTML files saved locally.
Constructor Summary | |
---|---|
Directory(java.lang.String location)
Constructor for the Directory object. |
Method Summary | |
---|---|
void |
close()
Save the Tanker's configuration and Barrels to a file. |
java.lang.String |
getCharset()
|
long |
getUID(java.lang.String location)
|
java.lang.String |
guessContentType(java.lang.String fname)
|
void |
indexIt(File location,
java.lang.String as)
Index the given file. |
static void |
main(java.lang.String[] argv)
Entry point to the Directory application. |
void |
parse(File file,
java.lang.String location,
java.lang.String contentType,
java.lang.String fileCharset)
Parse the given file. |
void |
printL(File a)
Print the given String to stdout. |
void |
printL(java.lang.String a)
|
void |
setCharset(java.lang.String charset)
|
void |
setLowercase(boolean lowercase)
Set lowercase to the given value. |
void |
setPhonetics(boolean phonetics)
Sets the phonetics attribute of the Directory object |
void |
setUpdateable(boolean updateable)
|
void |
swLowercase()
If using the lowercase don't, otherwise do. |
void |
swPhonetics()
Description of the Method |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Directory(java.lang.String location)
location
- the directory where the index is/will be createdMethod Detail |
---|
public void setLowercase(boolean lowercase)
lowercase
- The new lowercase valuepublic void setPhonetics(boolean phonetics)
phonetics
- The new phonetics valuepublic long getUID(java.lang.String location)
public static void main(java.lang.String[] argv)
UIDs of the documents are assigned sequentially by default. If you want to update the index later, you would rather assign the ids by a hash function which generates id according to the location of a document. This can be achived with "-update".
Finally, a new directory for the index can be specified by an optional parameter "as", followed by the desired path.
argv
- the command line argumentspublic void swLowercase()
public void swPhonetics()
public final void indexIt(File location, java.lang.String as)
location
- the file pathas
- the directory to index inpublic java.lang.String guessContentType(java.lang.String fname)
public void close()
public void parse(File file, java.lang.String location, java.lang.String contentType, java.lang.String fileCharset)
file
- the file to parselocation
- the path to the filepublic void printL(File a)
a
- the String to printpublic void printL(java.lang.String a)
public java.lang.String getCharset()
public void setCharset(java.lang.String charset)
public void setUpdateable(boolean updateable)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |