Class JsonLdDeserializer
java.lang.Object
cz.cvut.kbss.jsonld.deserialization.JsonLdDeserializer
- All Implemented Interfaces:
Configured
- Direct Known Subclasses:
ExpandedJsonLdDeserializer
Takes a pre-processed JSON-LD structure and deserializes it.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final TargetClassResolverprotected ValueDeserializers -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedJsonLdDeserializer(Configuration configuration) -
Method Summary
Modifier and TypeMethodDescriptionabstract voidcleanup()Cleans up after deserialization.Gets the configuration holder for this JSON-LD processor.static JsonLdDeserializerCreates deserializer for expanded JSON-LD.static JsonLdDeserializercreateExpandedDeserializer(Configuration configuration) Creates deserializer for expanded JSON-LD, initialized with the specified configuration.abstract <T> Tdeserialize(jakarta.json.JsonValue jsonLd, Class<T> resultClass) Deserializes the specified JSON-LD data.<T> voidregisterDeserializer(Class<T> type, ValueDeserializer<T> deserializer) Registers a custom deserializer for the specified type.voidupdateConfiguration(Configuration configuration) Updates the configuration for this JSON-LD processor.
-
Field Details
-
classResolver
-
deserializers
-
-
Constructor Details
-
JsonLdDeserializer
protected JsonLdDeserializer() -
JsonLdDeserializer
-
-
Method Details
-
configuration
Description copied from interface:ConfiguredGets the configuration holder for this JSON-LD processor.- Specified by:
configurationin interfaceConfigured- Returns:
- Configuration
-
updateConfiguration
Description copied from interface:ConfiguredUpdates the configuration for this JSON-LD processor.- Specified by:
updateConfigurationin interfaceConfigured- Parameters:
configuration- TheConfiguration.
-
registerDeserializer
Registers a custom deserializer for the specified type.If a deserializer already existed for the type, it is replaced by the new one.
- Type Parameters:
T- Target type- Parameters:
type- Target type to register the deserializer fordeserializer- Deserializer to register
-
deserialize
Deserializes the specified JSON-LD data.- Type Parameters:
T- The type of the target object- Parameters:
jsonLd- JSON-LD structureresultClass- Type of the result instance- Returns:
- Deserialized Java instance
-
cleanup
public abstract void cleanup()Cleans up after deserialization. Should be called after the entire list is deserialized using a customDeserializationContext. -
createExpandedDeserializer
Creates deserializer for expanded JSON-LD, initialized with the specified configuration.- Parameters:
configuration- Configuration of the deserializer- Returns:
- New deserializer
-
createExpandedDeserializer
Creates deserializer for expanded JSON-LD.- Returns:
- New deserializer
-