Skip to content

Method: configure(Configuration)

1: package cz.cvut.kbss.jsonld.deserialization;
2:
3: import cz.cvut.kbss.jsonld.Configuration;
4: import cz.cvut.kbss.jsonld.common.Configurable;
5:
6: import java.util.Map;
7:
8: /**
9: * Deserializes JSON-LD nodes to Java objects.
10: *
11: * @param <T> Target type
12: */
13: public interface ValueDeserializer<T> extends Configurable {
14:
15: /**
16: * Deserializes the specified JSON-LD node.
17: *
18: * @param jsonNode JSON-LD node to deserialize
19: * @param ctx Deserialization context
20: * @return Deserialized object
21: */
22: T deserialize(Map<?, ?> jsonNode, DeserializationContext<T> ctx);
23:
24: /**
25: * Applies the specified configuration to this deserializer.
26: * <p>
27: * Should be called at the beginning of deserialization of JSON-LD content so that potential runtime changes in configuration
28: * can be reflected by the deserialization process.
29: * <p>
30: * Implementations are free to apply configuration on initialization and rely on the default implementation of this
31: * method which does nothing.
32: *
33: * @param config Configuration to apply
34: */
35: @Override
36: default void configure(Configuration config) {
37: }
38: }