|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.derquinse.common.reflect.This<B>
net.conquiris.lucene.document.BaseDocumentBuilder<B>
public abstract class BaseDocumentBuilder<B extends BaseDocumentBuilder<B>>
Base class for document builders. Document builders can only be used once and are NOT THREAD SAFE.
| Nested Class Summary | |
|---|---|
class |
BaseDocumentBuilder.DocFieldBuilder
Numeric field builder that adds to the current document builder. |
class |
BaseDocumentBuilder.DocNumericFieldBuilder
Numeric field builder that adds to the current document builder. |
| Constructor Summary | |
|---|---|
protected |
BaseDocumentBuilder()
Constructor. |
| Method Summary | |
|---|---|
B |
add(org.apache.lucene.document.Fieldable fieldable)
Adds a fieldable to the document. |
B |
add(Iterable<? extends org.apache.lucene.document.Fieldable> fieldables)
Adds several fieldables to the document. |
org.apache.lucene.document.Document |
build()
Builds the document. |
protected void |
complete(com.google.common.collect.Multiset<String> fields)
Completes the document before building. |
BaseDocumentBuilder.DocFieldBuilder |
field(String name)
Creates a new field builder that adds to the current document. |
BaseDocumentBuilder.DocNumericFieldBuilder |
numeric(String name)
Creates a new numeric field builder that adds to the current document. |
| Methods inherited from class net.derquinse.common.reflect.This |
|---|
thisValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected BaseDocumentBuilder()
| Method Detail |
|---|
protected void complete(com.google.common.collect.Multiset<String> fields)
fields - A live but unmodifiable view of the fields added to the document.
IllegalStateException - if the document must not be built.public final org.apache.lucene.document.Document build()
build in interface net.derquinse.common.base.Builder<org.apache.lucene.document.Document>IllegalStateException - if the document can't be built or was already built.public final B add(org.apache.lucene.document.Fieldable fieldable)
fieldable - Fieldable to add.
IllegalStateException - if the document was already built.public final B add(Iterable<? extends org.apache.lucene.document.Fieldable> fieldables)
fieldables - Fieldables to add.
IllegalStateException - if the document was already built.public final BaseDocumentBuilder.DocNumericFieldBuilder numeric(String name)
name - Field name.public final BaseDocumentBuilder.DocFieldBuilder field(String name)
name - Field name.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||