Class MetadataDocument<E>
java.lang.Object
org.bson.Document
fr.gouv.vitam.common.database.server.mongodb.VitamDocument<E>
fr.gouv.vitam.metadata.core.database.collections.MetadataDocument<E>
- Type Parameters:
E- Class associated with this Document
- All Implemented Interfaces:
Serializable,Map<String,,Object> org.bson.conversions.Bson
- Direct Known Subclasses:
ObjectGroup,Unit
The default Vitam Type object to be stored in the database (MongoDb/ElasticSearch mode)
- See Also:
-
Nested Class Summary
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringApproximate creation date of Unit / Object Groupstatic final StringApproximate update date of Unit / Object Groupstatic final StringInternal version of the document: Incremented for each update (including computed fields)static final Stringstatic final StringLast persisted date of Unit / Object Groupstatic final StringManagement contract Idstatic final StringNumber of copies or
Number of Immediate child (Unit)static final StringObjectGroup link (Unit to ObjectGroup)static final StringInitial Operation (both Unit and ObjectGroup)static final StringArray of operations (both Unit and ObjectGroup)static final StringORIGINATING_AGENCIES : list of all originating agencies for unitstatic final StringORIGINATING_AGENCy : Principal originating agency for unitstatic final StringObject Type (text, audio, video, document, image, ...) Unit Type (facture, paye, ...)static final StringObject Type (text, audio, video, document, image, ...) Unit Type (facture, paye, ...)static final StringAll unit parentsstatic final StringParents link (Units or ObjectGroup to parent Units)static final StringFields inherited from class fr.gouv.vitam.common.database.server.mongodb.VitamDocument
ES_FILTER_OUT, ID, IMPLEMENTATIONVERSION, SCORE, SEDAVERSION, TENANT_ID, VERSIONFields inherited from interface org.bson.conversions.Bson
DEFAULT_CODEC_REGISTRY -
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructorMetadataDocument(com.fasterxml.jackson.databind.JsonNode content) Constructor from JsonMetadataDocument(String content) Constructor from Json as textMetadataDocument(org.bson.Document content) Constructor from Document -
Method Summary
Modifier and TypeMethodDescriptioncheckId()Create a new IDprotected abstract com.mongodb.client.MongoCollection<E><T> Collection<T>getCollectionOrEmpty(String name) final StringgetId()getMapOrEmpty(String name) protected abstract MetadataCollectionsgetSp()getUp()voidsetApproximateCreationDate(LocalDateTime creationDate) voidsetApproximateUpdateDate(LocalDateTime lastUpdate) Methods inherited from class fr.gouv.vitam.common.database.server.mongodb.VitamDocument
getConcernedDiffLines, getOriginalDiffLines, getTenantId, getUnifiedDiff, getVersion, newInstance, toStringMethods inherited from class org.bson.Document
append, clear, containsKey, containsValue, entrySet, equals, get, get, get, getBoolean, getBoolean, getDate, getDouble, getEmbedded, getEmbedded, getInteger, getInteger, getList, getList, getLong, getObjectId, getString, hashCode, isEmpty, keySet, parse, parse, put, putAll, remove, size, toBsonDocument, toJson, toJson, toJson, toJson, valuesMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bson.conversions.Bson
toBsonDocumentMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
ATOMIC_VERSION
Internal version of the document: Incremented for each update (including computed fields)- See Also:
-
QUALIFIERS
Object Type (text, audio, video, document, image, ...) Unit Type (facture, paye, ...)- See Also:
-
NBCHILD
Number of copies or
Number of Immediate child (Unit)- See Also:
-
MANAGEMENT_CONTRACT_ID
Management contract Id- See Also:
-
TYPE
Object Type (text, audio, video, document, image, ...) Unit Type (facture, paye, ...)- See Also:
-
UP
Parents link (Units or ObjectGroup to parent Units)- See Also:
-
OG
ObjectGroup link (Unit to ObjectGroup)- See Also:
-
OPS
Array of operations (both Unit and ObjectGroup)- See Also:
-
OPI
Initial Operation (both Unit and ObjectGroup)- See Also:
-
ORIGINATING_AGENCY
ORIGINATING_AGENCy : Principal originating agency for unit- See Also:
-
ORIGINATING_AGENCIES
ORIGINATING_AGENCIES : list of all originating agencies for unit- See Also:
-
UNITUPS
All unit parents- See Also:
-
GRAPH_LAST_PERSISTED_DATE
Last persisted date of Unit / Object Group- See Also:
-
APPROXIMATE_CREATION_DATE
Approximate creation date of Unit / Object Group- See Also:
-
APPROXIMATE_UPDATE_DATE
Approximate update date of Unit / Object Group- See Also:
-
BATCH_ID
- See Also:
-
UPLOAD_PATH
- See Also:
-
-
Constructor Details
-
MetadataDocument
public MetadataDocument()Empty constructor -
MetadataDocument
public MetadataDocument(com.fasterxml.jackson.databind.JsonNode content) Constructor from Json- Parameters:
content- in JsonNode format for building MetadataDocument
-
MetadataDocument
public MetadataDocument(org.bson.Document content) Constructor from Document- Parameters:
content- in Document format for building MetadataDocument
-
MetadataDocument
Constructor from Json as text- Parameters:
content- in String format for building MetadataDocument
-
-
Method Details
-
checkId
Create a new ID- Overrides:
checkIdin classVitamDocument<E>- Returns:
- this MetadataDocument
-
getId
- Overrides:
getIdin classVitamDocument<E>- Returns:
- the ID
-
getCollection
- Returns:
- the associated collection
-
getMetadataCollections
- Returns:
- the associated VitamCollection
-
toStringDirect
- Overrides:
toStringDirectin classVitamDocument<E>- Returns:
- the bypass toString
-
toStringDebug
- Returns:
- the toString for Debug mode
-
getCollectionOrEmpty
-
getMapOrEmpty
-
getSp
-
getUp
-
getAtomicVersion
-
setApproximateCreationDate
-
setApproximateUpdateDate
-