com.github.fge.jsonschema.keyword.digest.helpers
Class NullDigester

java.lang.Object
  extended by com.github.fge.jsonschema.keyword.digest.AbstractDigester
      extended by com.github.fge.jsonschema.keyword.digest.helpers.NullDigester
All Implemented Interfaces:
Digester

public final class NullDigester
extends AbstractDigester

A digester returning a NullNode for any input

This is actually useful for keywords like anyOf, allOf and oneOf, which only roles are to validate subschemas: they do not need a digested form at all, they just have to peek at the schema.

A net result of all keywords using this digester is that only one instance will ever be built.


Field Summary
 
Fields inherited from class com.github.fge.jsonschema.keyword.digest.AbstractDigester
FACTORY, keyword
 
Constructor Summary
NullDigester(String keyword, NodeType first, NodeType... other)
           
 
Method Summary
 JsonNode digest(JsonNode schema)
          Digest a schema into a simplified form
 
Methods inherited from class com.github.fge.jsonschema.keyword.digest.AbstractDigester
supportedTypes, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NullDigester

public NullDigester(String keyword,
                    NodeType first,
                    NodeType... other)
Method Detail

digest

public JsonNode digest(JsonNode schema)
Description copied from interface: Digester
Digest a schema into a simplified form

Parameters:
schema - the schema to digest
Returns:
the digested form