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
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
consumeAllFields
(com.fasterxml.jackson.databind.JsonNode node, Consumer<String> fieldReport) abstract String
Return a short partial description of the type, useful of DSL usersgetHint()
int
getMax()
int
getMin()
getName()
boolean
protected abstract void
Second phase of initialization, when the Format is associated to the Schemavoid
void
setMax
(int max) void
void
void
setOptional
(boolean optional) protected void
setReportingType
(Format format) toString()
abstract void
validate
(com.fasterxml.jackson.databind.JsonNode node, Consumer<String> fieldReport, ValidatorEngine validator) abstract void
Execute 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
-