public class FlatDocument extends MultifieldDocument
Modifier and Type | Field and Description |
---|---|
protected String |
fieldName |
fields
Constructor and Description |
---|
FlatDocument() |
FlatDocument(File file)
FlatDocument build with the content taken from a file
|
FlatDocument(String text)
FlatDocument build with the "text" value as unique field
|
Modifier and Type | Method and Description |
---|---|
void |
addField(Field field)
Adds a field to a document.
|
void |
removeField(String name)
Removes field with the specified name from the document.
|
void |
setContent(String content)
Set the content of the flat document (the body field)
|
getContent, getField, getFields
protected final String fieldName
public FlatDocument()
public FlatDocument(String text)
text
- The content of the unique "body" field of the documentpublic FlatDocument(File file)
file
- The file where the content has to be takenpublic void setContent(String content)
content
- The content of the documentpublic void addField(Field field)
MultifieldDocument
addField
in class MultifieldDocument
field
- The field to add to the documentpublic void removeField(String name)
MultifieldDocument
removeField
in class MultifieldDocument
name
- The name of the field to remove from the document's fieldsCopyright © 2013. All rights reserved.