public class IngestDocument extends Object implements Iterable<IngestField>, Serializable, Cloneable, LocaleAware
Modifier and Type | Field and Description |
---|---|
static DocumentMode |
DEFAULT_DOCUMENT_MODE |
Constructor and Description |
---|
IngestDocument(String id)
Construct a new IngestDocument.
|
IngestDocument(String id,
DocumentMode mode)
Construct a new IngestDocument.
|
Modifier and Type | Method and Description |
---|---|
void |
addValue(String name,
Boolean value)
Add a
Boolean value to field . |
void |
addValue(String name,
ContentPointer value)
Add a
ContentPointer value to field . |
void |
addValue(String name,
Date value)
Add a
Date value to field . |
void |
addValue(String name,
Document value)
Add a
Document value to field . |
void |
addValue(String field,
IngestFieldValue value)
Add a
value to field . |
void |
addValue(String name,
Number value)
Add a
numeric value to field . |
void |
addValue(String name,
Point value)
Add a
Point value to field . |
void |
addValue(String name,
Shape value)
Add a
Shape value to field . |
void |
addValue(String name,
String value)
Add a
String value to field . |
void |
addValues(String field,
Boolean... values)
|
void |
addValues(String field,
ContentPointer... values)
|
void |
addValues(String field,
Date... values)
|
void |
addValues(String field,
Document... values)
|
void |
addValues(String field,
Number... values)
|
void |
addValues(String field,
Point... values)
|
void |
addValues(String field,
Shape... values)
|
void |
addValues(String field,
String... values)
|
void |
clear()
Remove all fields and attributes.
|
IngestDocument |
clone() |
boolean |
containsField(String name)
Get if this document contains
field . |
void |
ensureCapacity() |
boolean |
equals(Object other) |
AttivioAcl |
getAcl()
Get the
AttivioAcl for this document. |
UUID |
getCorrelationId()
Get the correlation ID for this document.
|
long |
getEstimatedSize()
Get the estimated size of the document in bytes.
|
IngestField |
getField(String field)
Get a
field or null if field does not exist. |
Iterable<String> |
getFieldNames()
Return an
Iterable for iterating over all unique field names. |
IngestFieldValue |
getFirstValue(String field)
Get the first
IngestFieldValue for field or null if the field does not exist. |
AttivioGroupMembership |
getGroupMembership()
Get the
AttivioGroupMembership for this document. |
String |
getId()
Get the unique document id.
|
Locale |
getLocale()
Get the
Locale for this field. |
DocumentMode |
getMode()
Gets the mode for ingesting this document.
|
AttivioPrincipal |
getPrincipal()
Get the
AttivioPrincipal for this document. |
String |
getZone()
Get the zone for this document.
|
int |
hashCode() |
void |
importFields(IngestDocument doc)
Import all fields into this document.
|
Iterator<IngestField> |
iterator()
Get an iterator for iterating over all
fields . |
void |
removeField(String name)
Remove a field by
name . |
void |
renameField(String oldName,
String newName)
Rename a field.
|
void |
setAcl(AttivioAcl value)
Set the
AttivioAcl for this document. |
void |
setCorrelationId(UUID value)
Set the correlation ID for this document.
|
void |
setField(IngestField field)
Set a
field for this document. |
void |
setField(String field,
Boolean... values)
Set the
values for a field . |
void |
setField(String field,
ContentPointer... values)
Set the
values for a field . |
void |
setField(String field,
Date... values)
Set the
values for a field . |
void |
setField(String field,
Document... values)
Set the
values for a field . |
void |
setField(String field,
Number... values)
Set the
values for a field . |
void |
setField(String field,
Point... values)
Set the
values for a field . |
void |
setField(String field,
Shape... values)
Set the
values for a field . |
void |
setField(String field,
String... values)
Set the
values for a field . |
void |
setGroupMembership(AttivioGroupMembership value)
Set the
AttivioGroupMembership for this document. |
void |
setId(String value)
Set the unique document id.
|
void |
setLocale(Locale value)
Set the
Locale for this field. |
void |
setMode(DocumentMode value)
Gets the mode for ingesting this document.
|
void |
setPrincipal(AttivioPrincipal value)
Set the
AttivioPrincipal for this document. |
void |
setZone(String value)
Set the zone for this document.
|
int |
size()
Get the number of fields in this document.
|
String |
toString() |
finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public static final DocumentMode DEFAULT_DOCUMENT_MODE
public IngestDocument(String id)
public IngestDocument(String id, DocumentMode mode)
public String getId()
public void setId(String value)
public UUID getCorrelationId()
The correlation ID is used to tie different instances of the same document sent in back to their original source.
public void setCorrelationId(UUID value)
WARNING: internal use only. The correlation ID is set by the system and should not be modified by client code.
public Locale getLocale()
Locale
for this field.getLocale
in interface LocaleAware
public void setLocale(Locale value)
Locale
for this field.setLocale
in interface LocaleAware
public DocumentMode getMode()
public void setMode(DocumentMode value)
public AttivioAcl getAcl()
AttivioAcl
for this document.public void setAcl(AttivioAcl value)
AttivioAcl
for this document.public AttivioPrincipal getPrincipal()
AttivioPrincipal
for this document.public void setPrincipal(AttivioPrincipal value)
AttivioPrincipal
for this document.public AttivioGroupMembership getGroupMembership()
AttivioGroupMembership
for this document.public void setGroupMembership(AttivioGroupMembership value)
AttivioGroupMembership
for this document.public String getZone()
If set the zone acts as a composite key with the value of getId()
.
public void setZone(String value)
public int size()
public boolean containsField(String name)
field
.public Iterable<String> getFieldNames()
Iterable
for iterating over all unique field names.public Iterator<IngestField> iterator()
fields
.iterator
in interface Iterable<IngestField>
public void clear()
public IngestField getField(String field)
field
or null if field
does not exist.
NOTE: if the field exists, but contains no field values, null
will be returned.
public void renameField(String oldName, String newName)
If the field does not exist no action is taken.
public void removeField(String name)
name
.
Will have no effect if field does not exist.
public void importFields(IngestDocument doc)
Fields and FieldValues will be deep cloned.
public IngestFieldValue getFirstValue(String field)
IngestFieldValue
for field
or null if the field does not exist.public void setField(IngestField field)
field
for this document.
If a field already exists with the same name, it will be replaced.
public void setField(String field, String... values)
values
for a field
.
If a field already exists with the same name, it will be replaced.
public void setField(String field, Number... values)
values
for a field
.
If a field already exists with the same name, it will be replaced.
public void setField(String field, Boolean... values)
values
for a field
.
If a field already exists with the same name, it will be replaced.
public void setField(String field, Date... values)
values
for a field
.
If a field already exists with the same name, it will be replaced.
public void setField(String field, Point... values)
values
for a field
.
If a field already exists with the same name, it will be replaced.
public void setField(String field, Shape... values)
values
for a field
.
If a field already exists with the same name, it will be replaced.
public void setField(String field, ContentPointer... values)
values
for a field
.
If a field already exists with the same name, it will be replaced.
public void setField(String field, Document... values)
values
for a field
.
If a field already exists with the same name, it will be replaced.
public void addValues(String field, ContentPointer... values)
public void addValue(String field, IngestFieldValue value)
value
to field
.public void addValue(String name, ContentPointer value)
ContentPointer
value to field
.public IngestDocument clone()
public final void ensureCapacity()
public long getEstimatedSize()
NOTE: Includes size of remote content pointers.
Copyright © 2018 Attivio, Inc. All Rights Reserved.
PATENT NOTICE: Attivio, Inc. Software Related Patents. With respect to the Attivio software product(s) being used, the following patents apply: Querying Joined Data Within A Search Engine Index: United States Patent No.(s): 8,073,840. Ordered Processing of Groups of Messages: U.S. Patent No.(s) 8,495,656. Signal processing approach to sentiment analysis for entities in documents: U.S. Patent No.(s) 8,725,494. Other U.S. and International Patents Pending.