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

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

public final class IdentityDigester
extends AbstractDigester

A "no-op" digester

This is the most simple of digesters, which will return its input as the digested forms. If you choose to use it, you will therefore only have to provide the list of types supported by your keyword.


Field Summary
 
Fields inherited from class com.github.fge.jsonschema.keyword.digest.AbstractDigester
FACTORY, keyword
 
Constructor Summary
IdentityDigester(String keyword, NodeType first, NodeType... other)
          Constructor
 
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

IdentityDigester

public IdentityDigester(String keyword,
                        NodeType first,
                        NodeType... other)
Constructor

Parameters:
keyword - the name for this keyword
first - the first supported type
other - other supported types, if any
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