public abstract class Document extends Object implements Serializable
fields
. Each
field has a name and a textual value. Thus each document should typically
contain one or more fields which uniquely identify it. Constructor and Description |
---|
Document() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addField(Field field)
Adds a field to a document.
|
abstract String |
getContent()
Gets the content of the document, appending the content of the different
fields belonging to it.
|
abstract Field |
getField(String name)
Returns the field with the given name if exists in this document, or
null.
|
abstract Iterator<Field> |
getFields()
Returns an iterator over the fields being part of this document.
|
abstract void |
removeField(String name)
Removes field with the specified name from the document.
|
public abstract Field getField(String name)
name
- The name of the field to retrievepublic abstract Iterator<Field> getFields()
public abstract void addField(Field field)
field
- The field to add to the documentpublic abstract void removeField(String name)
name
- The name of the field to remove from the document's fieldspublic abstract String getContent()
Copyright © 2013. All rights reserved.