org.idoox.wasp.serialization
Interface DeserializationContext

All Superinterfaces:
DeserializedObjectsStack, ReferenceDeserializationContext, SchemaContext, TypeMappingContext

public interface DeserializationContext
extends ReferenceDeserializationContext, DeserializedObjectsStack, SchemaContext, TypeMappingContext

This class is used during deserialization to find appropriate (custom) deserializers. It walks over the map of deserializers (each deserializer is connected to a simplified XPath expression) and is able to get the most appropriate deserializer at any time.

Since:
4.0
Component:
Core

Nested Class Summary
 
Nested classes inherited from class org.idoox.wasp.serialization.SchemaContext
SchemaContext.State
 
Method Summary
 void enter(java.lang.String namespaceURI, java.lang.String name, java.lang.String typeNamespaceURI, java.lang.String typeName)
          Deprecated. Use the operations from SchemaContext instead
 java.lang.ClassLoader getClassLoader()
          Returns a class loader for this context.
 DeserializationChain getDeserializationChain(java.lang.Class serializedClass)
          Returns a deserialization chain for serializing serializedClass into the current XMLSchema construct.
 java.util.Iterator getPostDeserializationHandlers()
          Deprecated. The feature is no longer supported
 java.lang.String getSerializationID()
          Returns an id of the group of serializers.
 void leave()
          Deprecated. Use the operations from SchemaContext instead
 void registerPostDeserializationHandler(PostDeserializationHandler handler)
          Deprecated. The feature is no longer supported
 void releaseDeserializationChain(DeserializationChain chain)
          Releases serialization chain obtained from getSerializationChain call.
 void replaceTopSchemaConstruct(SchemaConstruct referencedConstruct)
          Replaces a top schema construct.
 void setClassLoader(java.lang.ClassLoader classLoader)
          Sets a class loader of this context to the given class loader.
 void unregisterPostDeserializationHandler(PostDeserializationHandler handler)
          Deprecated. The feature is no longer supported
 
Methods inherited from interface org.idoox.wasp.serialization.ReferenceDeserializationContext
addReference, getReferencedClass, getReferencedSchemaType, getRemoteReferences, resolveLocalReferences, setReferencedValue
 
Methods inherited from interface org.idoox.wasp.serialization.DeserializedObjectsStack
getDeserializedObjects, getDeserializedObjectsCount, popDeserializedObject, pushDeserializedObject
 
Methods inherited from interface org.idoox.wasp.serialization.SchemaContext
enterCurrentMember, getCurrentConstructName, getCurrentConstructSchemaType, getCurrentConstructType, getCurrentMember, getCurrentSchemaConstruct, getOriginalType, getSchema, isCurrentConstructArray, leave, nextMember, nextSchemaConstruct, nextSchemaConstruct, putMember, putSchemaConstruct, replaceTopMember, replaceTopMemberType, typeOfCurrentConstructReplaced
 
Methods inherited from interface org.idoox.wasp.serialization.TypeMappingContext
enter, getAttachmentClassName, getAttachmentMimeType, getSchema, getSchemaType, getSchemaType, getSchemaType, getType, getType, setSchema
 

Method Detail

enter

public void enter(java.lang.String namespaceURI,
                  java.lang.String name,
                  java.lang.String typeNamespaceURI,
                  java.lang.String typeName)
Deprecated. Use the operations from SchemaContext instead

Enters a structure/array.

Parameters:
namespaceURI - the namespace of the structure/array
name - the name of the structure/array
typeName - the type of the structure/array
typeNamespaceURI - the uri of the type of the structure/array

leave

public void leave()
Deprecated. Use the operations from SchemaContext instead

Leaves the structure/array.

Specified by:
leave in interface TypeMappingContext

getDeserializationChain

public DeserializationChain getDeserializationChain(java.lang.Class serializedClass)
Returns a deserialization chain for serializing serializedClass into the current XMLSchema construct.

Parameters:
serializedClass - the class being serialized
Returns:
the deserialization chain for the current xml schema construct.

releaseDeserializationChain

public void releaseDeserializationChain(DeserializationChain chain)
Releases serialization chain obtained from getSerializationChain call.

Parameters:
chain - the chain to be released

getClassLoader

public java.lang.ClassLoader getClassLoader()
Returns a class loader for this context.

Returns:
the class loader for this context.

setClassLoader

public void setClassLoader(java.lang.ClassLoader classLoader)
Sets a class loader of this context to the given class loader.

Parameters:
classLoader - the given classLoader to set.

getSerializationID

public java.lang.String getSerializationID()
Description copied from interface: TypeMappingContext
Returns an id of the group of serializers.

Specified by:
getSerializationID in interface TypeMappingContext
Returns:
the id of the group of serializers

registerPostDeserializationHandler

public void registerPostDeserializationHandler(PostDeserializationHandler handler)
Deprecated. The feature is no longer supported

Registers a handler that will be called after the end of deserialization ends. This method can be used for example for registering some cleanup handlers, if the serialization process requires allocating some resources, or reference handlers if the java representation requires some advanced reference handling.

Parameters:
handler - the handler to be registered.

unregisterPostDeserializationHandler

public void unregisterPostDeserializationHandler(PostDeserializationHandler handler)
Deprecated. The feature is no longer supported

Unregisters registered handler.


getPostDeserializationHandlers

public java.util.Iterator getPostDeserializationHandlers()
Deprecated. The feature is no longer supported

Returns iterator of registered post-deserialization handlers.


replaceTopSchemaConstruct

public void replaceTopSchemaConstruct(SchemaConstruct referencedConstruct)
Replaces a top schema construct.

Parameters:
referencedConstruct - the construct which should replace the construct on the top of schema