Package com.networknt.schema.output
Class HierarchicalOutputUnitFormatter
java.lang.Object
com.networknt.schema.output.HierarchicalOutputUnitFormatter
HierarchicalOutputUnitFormatter.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidbuildIndex(OutputUnitKey key, Map<NodePath, Map<NodePath, OutputUnit>> index, Map<NodePath, Set<NodePath>> keys, OutputUnit root) Builds in the index of evaluation path to output units to be populated later and modify the root to add the appropriate children.static OutputUnitformat(OutputUnit root, OutputUnitData data, NodePath rootPath) static OutputUnitformat(Schema jsonSchema, List<Error> errors, ExecutionContext executionContext, SchemaContext schemaContext, Function<Error, Object> errorMapper)
-
Constructor Details
-
HierarchicalOutputUnitFormatter
public HierarchicalOutputUnitFormatter()
-
-
Method Details
-
format
-
format
public static OutputUnit format(Schema jsonSchema, List<Error> errors, ExecutionContext executionContext, SchemaContext schemaContext, Function<Error, Object> errorMapper) -
buildIndex
protected static void buildIndex(OutputUnitKey key, Map<NodePath, Map<NodePath, OutputUnit>> index, Map<NodePath, Set<NodePath>> keys, OutputUnit root) Builds in the index of evaluation path to output units to be populated later and modify the root to add the appropriate children.- Parameters:
key- the current key to processindex- contains all the mappings from evaluation path to output unitskeys- that contain all the evaluation paths with instance dataroot- the root output unit
-