Class MetadataDocumentHelper
- java.lang.Object
-
- fr.gouv.vitam.common.database.utils.MetadataDocumentHelper
-
public class MetadataDocumentHelper extends java.lang.Object
Helper class for metadata documents fields (units & object groups).
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
STORAGE_KEY
static java.lang.String
STRATEGY_KEY
-
Constructor Summary
Constructors Constructor Description MetadataDocumentHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<java.lang.String>
getComputedGraphObjectGroupFields()
static java.util.List<java.lang.String>
getComputedGraphUnitFields()
static java.util.Set<java.lang.String>
getComputedObjectGroupFields()
static java.util.Set<java.lang.String>
getComputedUnitFields()
static java.lang.String
getStrategyIdFromRawUnitOrGot(com.fasterxml.jackson.databind.JsonNode documentJson)
Retrieve the strategyId from a raw unit or got jsonstatic java.lang.String
getStrategyIdFromUnit(com.fasterxml.jackson.databind.JsonNode unitJson)
Retrieve the strategyId from a unit jsonstatic java.util.Set<java.lang.String>
getTemporaryUnitFields()
static void
removeComputedFieldsFromObjectGroup(com.fasterxml.jackson.databind.JsonNode objectGroupJson)
Removes computed graph fields from got jsonstatic void
removeComputedFieldsFromUnit(com.fasterxml.jackson.databind.JsonNode unitJson)
Removes computed fields (graph, elimination indexation...
-
-
-
Field Detail
-
STORAGE_KEY
public static final java.lang.String STORAGE_KEY
- See Also:
- Constant Field Values
-
STRATEGY_KEY
public static final java.lang.String STRATEGY_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getComputedGraphUnitFields
public static java.util.List<java.lang.String> getComputedGraphUnitFields()
- Returns:
- the list of computed graph unit fields
-
getComputedGraphObjectGroupFields
public static java.util.List<java.lang.String> getComputedGraphObjectGroupFields()
- Returns:
- the list of computed graph object group fields
-
getTemporaryUnitFields
public static java.util.Set<java.lang.String> getTemporaryUnitFields()
- Returns:
- the list of temporary unit fields
-
getComputedUnitFields
public static java.util.Set<java.lang.String> getComputedUnitFields()
- Returns:
- the list of all unit computed fields (computed graph fields + temporary fields)
-
getComputedObjectGroupFields
public static java.util.Set<java.lang.String> getComputedObjectGroupFields()
- Returns:
- the list of all object group computed fields (computed graph fields + temporary fields)
-
removeComputedFieldsFromUnit
public static void removeComputedFieldsFromUnit(com.fasterxml.jackson.databind.JsonNode unitJson)
Removes computed fields (graph, elimination indexation... ) from unit json- Parameters:
unitJson
-
-
removeComputedFieldsFromObjectGroup
public static void removeComputedFieldsFromObjectGroup(com.fasterxml.jackson.databind.JsonNode objectGroupJson)
Removes computed graph fields from got json- Parameters:
objectGroupJson
-
-
getStrategyIdFromRawUnitOrGot
public static java.lang.String getStrategyIdFromRawUnitOrGot(com.fasterxml.jackson.databind.JsonNode documentJson)
Retrieve the strategyId from a raw unit or got json- Parameters:
documentJson
- unit or got json- Returns:
- strategyId
-
getStrategyIdFromUnit
public static java.lang.String getStrategyIdFromUnit(com.fasterxml.jackson.databind.JsonNode unitJson)
Retrieve the strategyId from a unit json- Parameters:
unitJson
- unit json- Returns:
- strategyId
-
-