Class Format
java.lang.Object
fr.gouv.vitam.common.dsl.schema.meta.Format
- Direct Known Subclasses:
AnyKeyFormat,ArrayFormat,EnumFormat,KeyChoiceFormat,ObjectFormat,ReferenceFormat,TypeChoiceArrayFormat,TypeChoiceFormat,UnionFormat
Definition of a type of the schema.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconsumeAllFields(com.fasterxml.jackson.databind.JsonNode node, Consumer<String> fieldReport) abstract StringReturn a short partial description of the type, useful of DSL usersgetHint()intgetMax()intgetMin()getName()booleanprotected abstract voidSecond phase of initialization, when the Format is associated to the SchemavoidvoidsetMax(int max) voidvoidvoidsetOptional(boolean optional) protected voidsetReportingType(Format format) toString()abstract voidvalidate(com.fasterxml.jackson.databind.JsonNode node, Consumer<String> fieldReport, ValidatorEngine validator) abstract voidExecute an action on each node of the TypeDef tree.
-
Constructor Details
-
Format
public Format()
-
-
Method Details
-
resolve
Second phase of initialization, when the Format is associated to the Schema- Parameters:
schema- the schema it belongs to.
-
consumeAllFields
-
validate
public abstract void validate(com.fasterxml.jackson.databind.JsonNode node, Consumer<String> fieldReport, ValidatorEngine validator) -
walk
Execute an action on each node of the TypeDef tree. E.g. to resolve type name of KindReference- Parameters:
consumer- the action to do on the node
-
getName
-
setName
-
isOptional
public boolean isOptional() -
setOptional
public void setOptional(boolean optional) -
getHint
-
setHint
-
getMin
public int getMin() -
setMin
-
getMax
public int getMax() -
setMax
public void setMax(int max) -
debugInfo
Return a short partial description of the type, useful of DSL users- Returns:
- a description of the type (e.g. {"$foo":..., "$bar":... })
-
toString
-
setReportingType
-
getReportingType
-