|
||||||||||
| 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.DocBinaryFieldBuilder
Binary field builder that adds to the current document builder. |
class |
BaseDocumentBuilder.DocNumericFieldBuilder
Numeric field builder that adds to the current document builder. |
class |
BaseDocumentBuilder.DocTextFieldBuilder
Text field builder that adds to the current document builder. |
| Constructor Summary | |
|---|---|
protected |
BaseDocumentBuilder()
Constructor. |
| Method Summary | |
|---|---|
B |
add(BinarySchemaItem item,
byte[] value)
Adds a binary field based on a schema item. |
B |
add(BinarySchemaItem item,
ByteString value)
Adds a binary field based on a schema item. |
B |
add(BooleanSchemaItem item,
boolean value)
Adds a boolean field based on a schema item. |
B |
add(DoubleSchemaItem item,
double value)
Adds a double field based on a schema item. |
B |
add(Fieldable fieldable)
Adds a fieldable to the document. |
B |
add(FloatSchemaItem item,
float value)
Adds a float field based on a schema item. |
B |
add(InstantSchemaItem item,
ReadableInstant value)
Adds an instant field based on a schema item. |
B |
add(IntegerSchemaItem item,
int value)
Adds an integer field based on a schema item. |
B |
add(Iterable<? extends Fieldable> fieldables)
Adds several fieldables to the document. |
B |
add(LongSchemaItem item,
long value)
Adds a long field based on a schema item. |
B |
add(StreamSchemaItem item,
Reader reader)
Adds a streamed textual field based on a schema item. |
B |
add(StreamSchemaItem item,
TokenStream tokenStream)
Adds a streamed textual field based on a schema item. |
B |
add(TextSchemaItem item,
String value)
Adds a textual field based on a schema item. |
B |
add(UUIDSchemaItem item,
UUID value)
Adds an UUID field based on a schema item. |
BaseDocumentBuilder.DocBinaryFieldBuilder |
binary(String name)
Creates a new binary field builder that adds to the current document. |
Document |
build()
Builds the document. |
protected void |
complete(Multiset<String> fields)
Completes the document before building. |
BaseDocumentBuilder.DocNumericFieldBuilder |
numeric(String name)
Creates a new numeric field builder that adds to the current document. |
BaseDocumentBuilder.DocTextFieldBuilder |
text(String name)
Creates a new text 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(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 Document build()
build in interface Builder<Document>IllegalStateException - if the document can't be built or was already built.public final B add(Fieldable fieldable)
fieldable - Fieldable to add.
IllegalStateException - if the document was already built.public final B add(Iterable<? extends 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.DocTextFieldBuilder text(String name)
name - Field name.public final BaseDocumentBuilder.DocBinaryFieldBuilder binary(String name)
name - Field name.
public final B add(IntegerSchemaItem item,
int value)
item - Schema item.value - Field value.
IllegalStateException - if the maximum number of occurrences for this field has been
reached.
public final B add(LongSchemaItem item,
long value)
item - Schema item.value - Field value.
IllegalStateException - if the maximum number of occurrences for this field has been
reached.
public final B add(FloatSchemaItem item,
float value)
item - Schema item.value - Field value.
IllegalStateException - if the maximum number of occurrences for this field has been
reached.
public final B add(DoubleSchemaItem item,
double value)
item - Schema item.value - Field value.
IllegalStateException - if the maximum number of occurrences for this field has been
reached.
public final B add(TextSchemaItem item,
String value)
item - Schema item.value - Field value.
IllegalStateException - if the maximum number of occurrences for this field has been
reached.
public final B add(StreamSchemaItem item,
Reader reader)
item - Schema item.reader - Field value reader.
IllegalStateException - if the maximum number of occurrences for this field has been
reached.
public final B add(StreamSchemaItem item,
TokenStream tokenStream)
item - Schema item.tokenStream - Field value token stream.
IllegalStateException - if the maximum number of occurrences for this field has been
reached.
public final B add(UUIDSchemaItem item,
UUID value)
item - Schema item.value - Field value.
IllegalStateException - if the maximum number of occurrences for this field has been
reached.
public final B add(BinarySchemaItem item,
byte[] value)
item - Schema item.value - Field value.
IllegalStateException - if the maximum number of occurrences for this field has been
reached.
public final B add(BinarySchemaItem item,
ByteString value)
item - Schema item.value - Field value.
IllegalStateException - if the maximum number of occurrences for this field has been
reached.
public final B add(InstantSchemaItem item,
ReadableInstant value)
item - Schema item.value - Field value.
IllegalStateException - if the maximum number of occurrences for this field has been
reached.
public final B add(BooleanSchemaItem item,
boolean value)
item - Schema item.value - Field value.
IllegalStateException - if the maximum number of occurrences for this field has been
reached.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||