|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lenya.lucene.index.IndexIterator
public class IndexIterator
Constructor Summary | |
---|---|
IndexIterator(java.lang.String index,
java.io.FileFilter filter)
Creates a new instance of IndexItertor |
Method Summary | |
---|---|
void |
addHandler(IndexIteratorHandler handler)
DOCUMENT ME! |
protected void |
collectFiles(java.io.File file,
java.util.List files)
Collect files |
static java.lang.String |
createID(java.io.File file,
java.io.File dumpDir)
Create a unique id |
static java.lang.String |
createUID(java.io.File file,
java.io.File htdocsDumpDir)
Append path and date into a string in such a way that lexicographic sorting gives the same results as a walk of the file hierarchy. |
protected org.apache.lucene.index.TermEnum |
enumerateUIDs(org.apache.lucene.index.IndexReader reader)
Returns an term enumerator beginning with the first term that represents a UID field. |
java.io.File[] |
getFiles(java.io.File dumpDirectory)
Get Files and sorts by alphabet? |
protected java.io.FileFilter |
getFilter()
|
protected java.lang.String |
getIndex()
|
protected org.apache.lucene.index.IndexReader |
getReader()
|
protected void |
handleFile(java.io.File file)
|
protected void |
handleNewDocument(org.apache.lucene.index.Term term,
java.io.File file)
|
protected void |
handleStaleDocument(org.apache.lucene.index.Term term)
|
protected void |
handleUnmodifiedDocument(org.apache.lucene.index.Term term,
java.io.File file)
|
protected static boolean |
hasEqualUID(org.apache.lucene.index.Term term,
java.lang.String uid)
Returns true if the file described by uid has the same UID as the
file described by the existing UID term. |
protected static boolean |
isStale(org.apache.lucene.index.Term term,
java.lang.String uid)
Returns true if the file described by uid has a bigger UID than the
file described by the existing UID term. |
protected static boolean |
isUIDTerm(org.apache.lucene.index.Term term)
Returns if the term is not null and decribes a UID field. |
void |
iterate(java.io.File dumpDirectory)
Iterate over all files within directory |
protected void |
iterateFiles(org.apache.lucene.index.TermEnum iterator,
java.io.File file,
java.io.File dumpDirectory)
|
protected void |
traverse(org.apache.lucene.index.TermEnum iterator,
java.io.File file,
java.io.File dumpDirectory)
Traverse directory |
static java.lang.String |
uid2url(java.lang.String uid)
Converts a UID to a URL string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IndexIterator(java.lang.String index, java.io.FileFilter filter)
Method Detail |
---|
protected java.lang.String getIndex()
protected java.io.FileFilter getFilter()
public void addHandler(IndexIteratorHandler handler)
handler
- DOCUMENT ME!protected void handleFile(java.io.File file)
protected void handleStaleDocument(org.apache.lucene.index.Term term)
protected void handleUnmodifiedDocument(org.apache.lucene.index.Term term, java.io.File file)
protected void handleNewDocument(org.apache.lucene.index.Term term, java.io.File file)
protected org.apache.lucene.index.IndexReader getReader()
public void iterate(java.io.File dumpDirectory)
dumpDirectory
- Directory over which shall be iteratedprotected void iterateFiles(org.apache.lucene.index.TermEnum iterator, java.io.File file, java.io.File dumpDirectory) throws java.io.IOException
java.io.IOException
protected org.apache.lucene.index.TermEnum enumerateUIDs(org.apache.lucene.index.IndexReader reader)
protected static boolean isUIDTerm(org.apache.lucene.index.Term term)
protected static boolean isStale(org.apache.lucene.index.Term term, java.lang.String uid)
true
if the file described by uid has a bigger UID than the
file described by the existing UID term.
protected static boolean hasEqualUID(org.apache.lucene.index.Term term, java.lang.String uid)
true
if the file described by uid has the same UID as the
file described by the existing UID term.
public static java.lang.String createID(java.io.File file, java.io.File dumpDir)
file
- file to indexdumpDir
- dump directory
public static java.lang.String createUID(java.io.File file, java.io.File htdocsDumpDir)
file
- DOCUMENT ME!htdocsDumpDir
- DOCUMENT ME!
public static java.lang.String uid2url(java.lang.String uid)
public java.io.File[] getFiles(java.io.File dumpDirectory)
protected void collectFiles(java.io.File file, java.util.List files)
protected void traverse(org.apache.lucene.index.TermEnum iterator, java.io.File file, java.io.File dumpDirectory) throws java.io.IOException
java.io.IOException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |