|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.activemath.omdocjdom.lucene.LuceneBuilder
public class LuceneBuilder
This class provides the functionality to build a lucene base MBase database. It loads all the omdoc element one time in the memory then resolve the references. If the database is updated then it also resolve references from database.
| Constructor Summary | |
|---|---|
LuceneBuilder(Subconfiguration config)
Properties that can be set are the following (note that the ActiveMath manager uses the prefix OmdocJdomMbase
dbpath = path The path where lucene database exist. |
|
| Method Summary | |
|---|---|
org.apache.lucene.document.Document |
buildIndexDocuments(OJElement elt)
|
void |
createDatabase()
This method create indexes in the lucene database. |
Collection |
generateImportIDs(String col,
String fileName)
This method makes omdoc documents compatible with the databse It resolve all references and add necessary imports statements |
String |
generateImports(String col,
String fileName)
This method makes omdoc documents compatible with the databse It resolve all references and add necessary imports statements |
static void |
main(String[] args)
Main launcher, see LuceneMBaseXmlRpcServer.main(String[]). |
static Properties |
makeDefaultProperties()
Description of the Method |
void |
reload(List errorAccumulator,
String fileName)
This method update only those documents which are modified by user. |
void |
setSearchIndex(AMIndex index)
|
void |
updateDatabase(String col)
This method load omdoc documents from file system then add imports statement in source documents for each target element. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LuceneBuilder(Subconfiguration config)
throws Exception
Properties that can be set are the following (note that the ActiveMath
manager uses the prefix OmdocJdomMbase
dbpath = path The path where lucene database exist.
This path must exist in your directory with valid lucence data files. By
default path is ACTIVEMATH_HOME/data/lucenedb. collections.metric.publicIdentifier = colName
The collection name under which documents are inserted in the database.
It can have multiple entries.
collections.metric.paths.1 = path The path where
documents are stored. There can be multple paths. collections.metric.mbaseoperation = update This
tells what operation will be done on source documents. if the value is
update then the builder will update the documents. If value is none then
LuceneBuilder will not take any action.
config - a Subconfiguration value
MBaseException - if an error occurs
Exception| Method Detail |
|---|
public void setSearchIndex(AMIndex index)
public static Properties makeDefaultProperties()
public void createDatabase()
throws Exception
Exception - Description of the Exception
MBaseException - if it can not succesfully add doucments in the
database
public String generateImports(String col,
String fileName)
throws Exception
col - a String value. The name of the
collection.fileName - It is a absoulte path of the omdoc fileName
Exception - Description of the Exception
public Collection generateImportIDs(String col,
String fileName)
throws Exception
col - a String value. The name of the
collection.fileName - It is a absoulte path of the omdoc fileName
Exception - Description of the Exception
public void updateDatabase(String col)
throws Exception
col - Description of the Parameter
Exception - Description of the Exception
public void reload(List errorAccumulator,
String fileName)
throws Exception
errorAccumulator - a java.util.List value
Exception - Description of the Exception
public static void main(String[] args)
throws Exception
LuceneMBaseXmlRpcServer.main(String[]).
args -
Exception - Description of the Exception
public org.apache.lucene.document.Document buildIndexDocuments(OJElement elt)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||