Package lumis.portal.bigdata
Class Document
- java.lang.Object
-
- lumis.portal.bigdata.Document
-
- All Implemented Interfaces:
java.io.Serializable
,java.util.Map<java.lang.String,java.io.Serializable>
- Direct Known Subclasses:
ActivityDocument
,MonitorUserDocument
,StandardDocument
@StableMinor(version="15.0", sinceVersion="8.1") public class Document extends java.lang.Object implements java.util.Map<java.lang.String,java.io.Serializable>, java.io.Serializable
Unit of searchable information. The searchable data is organized in form of aMap
. This object is used to be indexed by aindexer
and searched by asearcher
.- Since:
- 8.1.0
- Version:
- $Revision: 25303 $ $Date: 2022-10-22 22:48:02 -0300 (Sat, 22 Oct 2022) $
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Document(DocumentType documentType)
Constructs an empty instance ofDocument
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
boolean
containsKey(java.lang.Object key)
boolean
containsValue(java.lang.Object value)
java.util.Set<java.util.Map.Entry<java.lang.String,java.io.Serializable>>
entrySet()
java.io.Serializable
get(java.lang.Object key)
java.io.Serializable
get(DocumentTypeField field)
Returns the value stored in this document using the given field identifier as key.DocumentType
getDocumentType()
Returns thedocument type
of this document.java.lang.String
getId()
Returns the identifier of this document.boolean
isEmpty()
java.util.Set<java.lang.String>
keySet()
protected <T> T
newFieldValueProxy(DocumentTypeField field, java.lang.Class<T> proxyInterface)
Creates a new proxy for a document root field value.java.io.Serializable
put(java.lang.String key, java.io.Serializable value)
java.io.Serializable
put(DocumentTypeField field, java.io.Serializable... values)
Stores the given value in this document using the given field identifier as key.void
putAll(java.util.Map<? extends java.lang.String,? extends java.io.Serializable> m)
java.io.Serializable
remove(java.lang.Object key)
void
setId(java.lang.String id)
Sets the identifier of this document.int
size()
java.util.Collection<java.io.Serializable>
values()
-
-
-
Constructor Detail
-
Document
protected Document(DocumentType documentType)
Constructs an empty instance ofDocument
.- Parameters:
id
- the identifier of this document.documentType
- the document type of this document.- Throws:
java.lang.IllegalArgumentException
- if the given identifier isnull
.java.lang.IllegalArgumentException
- if the givenDocumentType
isnull
.- Since:
- 8.1.0
-
-
Method Detail
-
newFieldValueProxy
protected <T> T newFieldValueProxy(DocumentTypeField field, java.lang.Class<T> proxyInterface)
Creates a new proxy for a document root field value.- Parameters:
field
- the field.proxyInterface
- the interface the proxy must implement.- Returns:
- the proxy.
- Since:
- 8.1.0
-
getDocumentType
public DocumentType getDocumentType()
Returns thedocument type
of this document.- Returns:
- the
document type
of this document. - Since:
- 8.1.0
-
getId
public java.lang.String getId()
Returns the identifier of this document.- Returns:
- the identifier.
- Since:
- 11.0.0
-
setId
public void setId(java.lang.String id)
Sets the identifier of this document.- Parameters:
id
- the identifier.- Since:
- 11.0.0
-
size
public int size()
- Specified by:
size
in interfacejava.util.Map<java.lang.String,java.io.Serializable>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacejava.util.Map<java.lang.String,java.io.Serializable>
-
get
public java.io.Serializable get(java.lang.Object key)
- Specified by:
get
in interfacejava.util.Map<java.lang.String,java.io.Serializable>
-
get
public java.io.Serializable get(DocumentTypeField field)
Returns the value stored in this document using the given field identifier as key.- Parameters:
field
- the field.- Returns:
- the value stored in this document using the given field identifier as key.
- Since:
- 8.1.0
- See Also:
get(Object)
-
containsKey
public boolean containsKey(java.lang.Object key)
- Specified by:
containsKey
in interfacejava.util.Map<java.lang.String,java.io.Serializable>
-
put
public java.io.Serializable put(java.lang.String key, java.io.Serializable value)
- Specified by:
put
in interfacejava.util.Map<java.lang.String,java.io.Serializable>
-
put
public java.io.Serializable put(DocumentTypeField field, java.io.Serializable... values)
Stores the given value in this document using the given field identifier as key.- Parameters:
field
- the field.value
- the value.- Returns:
- the previously stored value.
- Since:
- 8.1.0
- See Also:
put(String, Serializable)
-
putAll
public void putAll(java.util.Map<? extends java.lang.String,? extends java.io.Serializable> m)
- Specified by:
putAll
in interfacejava.util.Map<java.lang.String,java.io.Serializable>
-
remove
public java.io.Serializable remove(java.lang.Object key)
- Specified by:
remove
in interfacejava.util.Map<java.lang.String,java.io.Serializable>
-
clear
public void clear()
- Specified by:
clear
in interfacejava.util.Map<java.lang.String,java.io.Serializable>
-
containsValue
public boolean containsValue(java.lang.Object value)
- Specified by:
containsValue
in interfacejava.util.Map<java.lang.String,java.io.Serializable>
-
keySet
public java.util.Set<java.lang.String> keySet()
- Specified by:
keySet
in interfacejava.util.Map<java.lang.String,java.io.Serializable>
-
values
public java.util.Collection<java.io.Serializable> values()
- Specified by:
values
in interfacejava.util.Map<java.lang.String,java.io.Serializable>
-
entrySet
public java.util.Set<java.util.Map.Entry<java.lang.String,java.io.Serializable>> entrySet()
- Specified by:
entrySet
in interfacejava.util.Map<java.lang.String,java.io.Serializable>
-
-