|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.indexer.lucene.LuceneIndexerBase
org.openanzo.common.rdb.layout.indexer.LiteralIndexer
public class LiteralIndexer
Indexer for Anzo Literals based on Lucene.
| Constructor Summary | |
|---|---|
LiteralIndexer()
Create new LiteralIndexer |
|
| Method Summary | |
|---|---|
void |
clear()
Clears the contents of the index. |
void |
close()
Closes the resources used by the indexer. |
static org.apache.lucene.document.Document |
createDocument(long id,
org.openrdf.model.Literal literal)
Create a new document which indexes a Literal and its ID |
boolean |
index(int id,
java.lang.Object obj)
Adds the object to the index. |
void |
initialize(java.util.Properties properties)
Initializes the indexer. |
java.util.List<java.lang.Long> |
query(java.lang.String queryStr)
Search the indexer for literals that match the query pattern |
int |
rebuild(java.lang.Object seedObject)
Rebuilds the index given the seed object. |
void |
remove(int id,
java.lang.Object obj)
Removes the object from the index. |
| Methods inherited from class org.openanzo.indexer.lucene.LuceneIndexerBase |
|---|
initialize, postIndex, postRemove, preIndex, preRemove |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LiteralIndexer()
| Method Detail |
|---|
public void initialize(java.util.Properties properties)
throws IndexerException
LuceneIndexerBase
initialize in interface IIndexerinitialize in class LuceneIndexerBaseproperties - configuration for the indexer, usually comes from a .properties file
IndexerException - if there were errors initializing the indexer
public java.util.List<java.lang.Long> query(java.lang.String queryStr)
throws IndexerException
queryStr - query string to run
IndexerException
public void clear()
throws IndexerException
IIndexer
clear in interface IIndexerclear in class LuceneIndexerBaseIndexerException
public void close()
throws IndexerException
LuceneIndexerBase
close in interface IIndexerclose in class LuceneIndexerBaseIndexerException
public boolean index(int id,
java.lang.Object obj)
throws IndexerException
IIndexer
index in interface IIndexerindex in class LuceneIndexerBaseid - id of the indexer, generated by preIndex()obj - object to add to the index.
IndexerException
public void remove(int id,
java.lang.Object obj)
throws IndexerException
IIndexer
remove in interface IIndexerremove in class LuceneIndexerBaseid - id of the indexer, generated by preIndex()obj - object to remove from the index.
IndexerException
public static org.apache.lucene.document.Document createDocument(long id,
org.openrdf.model.Literal literal)
id - of literalliteral - literal value
public int rebuild(java.lang.Object seedObject)
throws IndexerException
IIndexer
seedObject - object used to rebuild the entire index
IndexerException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||