|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.weborganic.flint.index.IndexParser
public final class IndexParser
This handler makes a Lucene 2 Document out of a properly formatted XML document.
The XML document must validate the Lucene Index Document DTD.
For example:
<document>
<field name="modified" store="yes" index="yes" parse-date-as="MMM dd, yy" resolution="day">Jan 12, 02</field>
<field name="path" store="yes" index="no" >C:\documents\00023.xml</field>
<field name="webpath" store="yes" index="no" >/documents/doc-23.xml</field>
<field name="text" store="compress" index="tokenised" >
Truly to speak, and with no addition,
We go to gain a little patch of ground
That hath in it no profit but the name.
To pay five ducats, five, I would not farm it;
Nor will it yield to Norway or the Pole
A ranker rate, should it be sold in fee.
</field>
</document>
Method Summary | |
---|---|
List<Document> |
process(File f)
Returns a list of Lucene documents to be indexed from the XML file given. |
List<Document> |
process(InputSource source)
Make a collection Lucene documents to be indexed from the XML file given. |
static Field.Index |
toFieldIndex(String index)
Returns the Lucene2 Field Index from the attribute value. |
static Field.Store |
toFieldStore(String store)
Returns the Lucene2 Field Store from the attribute value. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Field.Store toFieldStore(String store)
store
- The store flag as a string.
public static Field.Index toFieldIndex(String index)
index
- The index flag as a string.
public List<Document> process(InputSource source) throws IndexException
The XML file must conform to the DTD defined in this class.
Ensure that the reader uses the correct encoding.
source
- The source to read.
IndexException
- Should an error occur while parsing the file.public List<Document> process(File f) throws IndexException
The XML file must conform to the DTD defined in this class.
f
- the file to be read
IndexException
- Should an error occur while parsing the file.#make(java.io.Reader)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |