Class ContextBuildingObjectPropertyValueSerializer

java.lang.Object
cz.cvut.kbss.jsonld.serialization.serializer.compact.ObjectPropertyValueSerializer
cz.cvut.kbss.jsonld.serialization.serializer.context.ContextBuildingObjectPropertyValueSerializer
All Implemented Interfaces:
Configurable, ValueSerializer

public class ContextBuildingObjectPropertyValueSerializer extends ObjectPropertyValueSerializer
  • Constructor Details

    • ContextBuildingObjectPropertyValueSerializer

      public ContextBuildingObjectPropertyValueSerializer(ObjectGraphTraverser graphTraverser)
  • Method Details

    • serialize

      public JsonNode serialize(Object value, SerializationContext ctx)
      Description copied from interface: ValueSerializer
      Serializes the specified value, returning a JSON-LD node representing it.

      Note that if the value is a singular, the returned node should also contain the identifier of the serialized attribute (available through the provided serialization context).

      Specified by:
      serialize in interface ValueSerializer
      Overrides:
      serialize in class ObjectPropertyValueSerializer
      Parameters:
      value - Value to serialize
      ctx - Serialization context
      Returns:
      Serialization result
    • configure

      public void configure(Configuration config)
      Description copied from interface: ValueSerializer
      Applies the specified configuration to this serializer.

      Should be called at the beginning of serialization of an object graph so that potential runtime changes in configuration can be reflected by the serialization process.

      Implementations are free to apply configuration on initialization and rely on the default implementation of this method which does nothing.

      Parameters:
      config - Configuration to apply