Class DefaultYamlDeserializer<CLASS extends dev.metaschema.core.model.IBoundObject>

java.lang.Object
dev.metaschema.databind.io.AbstractDeserializer<CLASS>
dev.metaschema.databind.io.json.DefaultJsonDeserializer<CLASS>
dev.metaschema.databind.io.yaml.DefaultYamlDeserializer<CLASS>
Type Parameters:
CLASS - the Java type of the bound object to deserialize
All Implemented Interfaces:
dev.metaschema.core.configuration.IConfiguration<DeserializationFeature<?>>, dev.metaschema.core.configuration.IMutableConfiguration<DeserializationFeature<?>>, IDeserializer<CLASS>

public class DefaultYamlDeserializer<CLASS extends dev.metaschema.core.model.IBoundObject> extends DefaultJsonDeserializer<CLASS>
Deserializes YAML content into bound Java objects.
  • Constructor Details

    • DefaultYamlDeserializer

      Construct a new YAML deserializer that will parse the bound class identified by the classBinding.
      Parameters:
      definition - the bound class information for the Java type this deserializer is operating on
  • Method Details

    • newFactoryInstance

      protected com.fasterxml.jackson.dataformat.yaml.YAMLFactory newFactoryInstance()
      Get a JSON factory instance.

      This method can be used by sub-classes to create a customized factory instance.

      This method provides a YAML version of the JSON factory.

      Overrides:
      newFactoryInstance in class DefaultJsonDeserializer<CLASS extends dev.metaschema.core.model.IBoundObject>
      Returns:
      the factory
    • getBindingContext

      @NonNull protected IBindingContext getBindingContext()
      Retrieve the binding context associated with the serializer.
      Returns:
      the binding context
    • getDefinition

      @NonNull protected IBoundDefinitionModelAssembly getDefinition()
      Retrieve the bound class information associated with the assembly that the serializer/deserializer will write/read data from.
      Returns:
      the class binding for the Module assembly
    • getConfiguration

      @NonNull protected dev.metaschema.core.configuration.IMutableConfiguration<DeserializationFeature<?>> getConfiguration()
      Get the current configuration of the serializer/deserializer.
      Returns:
      the configuration
    • isFeatureEnabled

      public boolean isFeatureEnabled(DeserializationFeature<?> feature)
      Specified by:
      isFeatureEnabled in interface dev.metaschema.core.configuration.IConfiguration<T extends dev.metaschema.core.configuration.IConfigurationFeature<?>>
    • getFeatureValues

      public Map<DeserializationFeature<?>,Object> getFeatureValues()
      Specified by:
      getFeatureValues in interface dev.metaschema.core.configuration.IConfiguration<T extends dev.metaschema.core.configuration.IConfigurationFeature<?>>
    • get

      public <V> V get(DeserializationFeature<?> feature)
      Specified by:
      get in interface dev.metaschema.core.configuration.IConfiguration<T extends dev.metaschema.core.configuration.IConfigurationFeature<?>>