Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.ws.commons.schema.extensions
Class ExtensionRegistry

    java.lang.Object
      org.apache.ws.commons.schema.extensions.ExtensionRegistry

    public class ExtensionRegistry

extends java.lang.Object

The task of the extension serializer is to delegate the serilization of the extensions. The extension serializers/deserializers are retained in seperate maps and there are also two seperate references to default serializers and deserializers which would jump into action when there are no specifically attached serializers/deserializers

Constructor Summary
`ExtensionRegistry()`

Method Summary
`void` | `deserializeExtension(XmlSchemaObject parentSchemaObject, javax.xml.namespace.QName name, org.w3c.dom.Node rawNode)` Deserialize a given extension element
`ExtensionDeserializer` | `getDefaultExtensionDeserializer()`
`ExtensionSerializer` | `getDefaultExtensionSerializer()`
`void` | `registerDeserializer(javax.xml.namespace.QName name, ExtensionDeserializer deserializer)` Register a deserializer with a QName
`void` | `registerSerializer(java.lang.Class classOfType, ExtensionSerializer serializer)` Register a serializer with a Class
`void` | `serializeExtension(XmlSchemaObject parentSchemaObject, java.lang.Class classOfType, org.w3c.dom.Node node)` Serialize a given extension element
`void` | `setDefaultExtensionDeserializer(ExtensionDeserializer defaultExtensionDeserializer)`
`void` | `setDefaultExtensionSerializer(ExtensionSerializer defaultExtensionSerializer)`
`void` | `unregisterDeserializer(java.lang.Class classOfType)` remove the registration for a deserializer with a QName
`void` | `unregisterSerializer(javax.xml.namespace.QName name)` remove the registration for a serializer with a QName

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ExtensionRegistry

    public ExtensionRegistry()

Method Detail

### getDefaultExtensionSerializer

    public ExtensionSerializer getDefaultExtensionSerializer()

### setDefaultExtensionSerializer

    public void setDefaultExtensionSerializer(ExtensionSerializer defaultExtensionSerializer)

### getDefaultExtensionDeserializer

    public ExtensionDeserializer getDefaultExtensionDeserializer()

### setDefaultExtensionDeserializer

    public void setDefaultExtensionDeserializer(ExtensionDeserializer defaultExtensionDeserializer)

### registerDeserializer

    public void registerDeserializer(javax.xml.namespace.QName name,
                                     ExtensionDeserializer deserializer)

  Register a deserializer with a QName

  Parameters:
    `name` - - the QName of the element/attribute
    `deserializer` - - an instance of the deserializer

### registerSerializer

    public void registerSerializer(java.lang.Class classOfType,
                                   ExtensionSerializer serializer)

  Register a serializer with a Class

  Parameters:
    `classOfType` - - the class of the object that would be serialized
    `serializer` - - an instance of the deserializer

### unregisterSerializer

    public void unregisterSerializer(javax.xml.namespace.QName name)

  remove the registration for a serializer with a QName

  Parameters:
    `name` - - the QName of the element/attribute the serializer is associated with

### unregisterDeserializer

    public void unregisterDeserializer(java.lang.Class classOfType)

  remove the registration for a deserializer with a QName

  Parameters:
    `classOfType` - - the the deserializer is associated with

### serializeExtension

    public void serializeExtension(XmlSchemaObject parentSchemaObject,
                                   java.lang.Class classOfType,
                                   org.w3c.dom.Node node)

  Serialize a given extension element

  Parameters:
    `parentSchemaObject` - - the parent schema object. This is what would contain the extension object, probably in side its meta information map
    `classOfType` - - The class of type to be serialized
    `node` - - the parent DOM Node that will ultimately be serialized. The XMLSchema serialization mechanism is to create a DOM tree first and serialize it

### deserializeExtension

    public void deserializeExtension(XmlSchemaObject parentSchemaObject,
                                     javax.xml.namespace.QName name,
                                     org.w3c.dom.Node rawNode)

  Deserialize a given extension element

  Parameters:
    `parentSchemaObject` - - the parent schema object. This is anticipated to be created already and the relevant object would contain the extension object, probably in side its meta information map
    `name` - - The qname of the element/attribute to be deserialized. This will be used to search for the extension as well as by the deserializer if a single deserializer is registered against a number of qnames
    `rawNode` - - the raw DOM Node read from the source. This will be the extension element itself if for an element or extension attribute itself in case of an attribute

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.