|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.vfny.geoserver.zserver.XMLDocument
A utility for making lucene document from an XML source and a mapping of attributes consisting of a use number and the xpath of the name. Based on Document example from Lucene. Taken from the lucene mailing list: http://www.mail-archive.com/lucene-user@jakarta.apache.org/msg00346.html and modified to work with the Geo Profile. email details: From: carlson Subject: Re: Indexing other documents type than html and txt (XML) Date: Thu, 29 Nov 2001 09:03:53 -0800
Field Summary | |
static java.lang.String |
WHITE_SPACE
|
Method Summary | |
static org.apache.lucene.document.Document |
Document(java.io.File documentFile,
java.io.File attrMapFile)
Turns the File into a lucene. |
static org.apache.lucene.document.Document |
Document(java.io.File file,
java.util.Properties attrMap)
Converts an xml file to a lucene document, using the values of the attribute map as the xpaths. |
static org.apache.lucene.document.Document |
Document(java.lang.String path,
java.util.Properties attrMap)
Convenience method, turns the string into a file. |
static org.apache.lucene.document.Document |
Document(java.lang.String documentPath,
java.lang.String propertyPath)
Convenience method, turns the documentPath into a file, and the propertyPath into a Property object. |
static void |
main(java.lang.String[] args)
main used to create an index from a directory full of xml files. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String WHITE_SPACE
Method Detail |
public static org.apache.lucene.document.Document Document(java.io.File file, java.util.Properties attrMap) throws java.io.FileNotFoundException, java.lang.Exception
file
- Document that to be converted to a lucene documentattrMap
- mappings of attribute numbers to xpaths.
java.io.FileNotFoundException
java.lang.Exception
public static org.apache.lucene.document.Document Document(java.lang.String path, java.util.Properties attrMap) throws java.lang.Exception
path
- path of document you want to convert to a lucene documentattrMap
- properties where the key is the field name and the value
is the XML xpath.
java.lang.Exception
public static org.apache.lucene.document.Document Document(java.lang.String documentPath, java.lang.String propertyPath) throws java.lang.Exception
documentPath
- path of the Document that to be converted to a
lucene documentpropertyPath
- path of file containing mapping of attribute use
numbers to xpaths. XML xpath.
java.lang.Exception
public static org.apache.lucene.document.Document Document(java.io.File documentFile, java.io.File attrMapFile) throws java.lang.Exception
documentFile
- Document that to be converted to a lucene document.attrMapFile
- file containing mappings with xpath values. XML
xpath.
java.lang.Exception
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |