E - Class used to implement the Documentpublic abstract class VitamDocument<E>
extends org.bson.Document
| Modifier and Type | Field and Description |
|---|---|
static String[] |
ES_FILTER_OUT
Filter ES out
|
static String |
ID
ID of each line: different for each sub type
|
static String |
SCORE
Score
|
static String |
TENANT_ID
TenantId
|
static String |
VERSION
Version of the document: Incresed for each update
|
| Constructor and Description |
|---|
VitamDocument()
Empty constructor
|
VitamDocument(org.bson.Document content)
Constructor from Document
|
VitamDocument(com.fasterxml.jackson.databind.JsonNode content)
Constructor from Json
|
VitamDocument(String content)
Constructor from Json
|
| Modifier and Type | Method and Description |
|---|---|
protected VitamDocument<E> |
checkId()
check if Id is valid
|
static List<String> |
getConcernedDiffLines(List<String> diff)
Retrieve only + and - lines on diff (for logbook lifecycle) regexp = line started by + or - with at least one
space after and any character
|
String |
getId() |
Integer |
getTenantId() |
static List<String> |
getUnifiedDiff(String original,
String revised)
Get unified diff
|
Integer |
getVersion() |
abstract VitamDocument<E> |
newInstance(com.fasterxml.jackson.databind.JsonNode content)
Make a new instance of the document with the given json
|
String |
toString() |
String |
toStringDirect() |
append, clear, containsKey, containsValue, entrySet, equals, get, get, getBoolean, getBoolean, getDate, getDouble, getInteger, getInteger, getLong, getObjectId, getString, hashCode, isEmpty, keySet, parse, parse, put, putAll, remove, size, toBsonDocument, toJson, toJson, toJson, toJson, valuesclone, finalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic static final String ID
public static final String VERSION
public static final String TENANT_ID
public static final String SCORE
public static final String[] ES_FILTER_OUT
public VitamDocument()
public VitamDocument(String content)
content - StringIllegalArgumentException - if Id is not a GUIDpublic VitamDocument(com.fasterxml.jackson.databind.JsonNode content)
content - as JsonNodeIllegalArgumentException - if Id is not a GUIDpublic VitamDocument(org.bson.Document content)
content - DocumentIllegalArgumentException - if Id is not a GUIDpublic abstract VitamDocument<E> newInstance(com.fasterxml.jackson.databind.JsonNode content)
content - document structure as jsonprotected VitamDocument<E> checkId()
IllegalArgumentException - if Id is not a GUIDpublic String getId()
public final Integer getTenantId()
public final Integer getVersion()
public String toStringDirect()
public String toString()
toString in class org.bson.Documentpublic static List<String> getUnifiedDiff(String original, String revised)
original - the original valuerevised - the revisited valuepublic static List<String> getConcernedDiffLines(List<String> diff)
diff - the unified diffCopyright © 2018 Vitam. All rights reserved.