View Javadoc

    1   /*
    2    * Licensed to the Apache Software Foundation (ASF) under one
    3    * or more contributor license agreements. See the NOTICE file
    4    * distributed with this work for additional information
    5    * regarding copyright ownership. The ASF licenses this file
    6    * to you under the Apache License, Version 2.0 (the
    7    * "License"); you may not use this file except in compliance
    8    * with the License. You may obtain a copy of the License at
    9    *
    10   * http://www.apache.org/licenses/LICENSE-2.0
    11   *
    12   * Unless required by applicable law or agreed to in writing,
    13   * software distributed under the License is distributed on an
    14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    15   * KIND, either express or implied. See the License for the
    16   * specific language governing permissions and limitations
    17   * under the License.
    18   */
    19  package org.apache.ws.commons.schema.extensions;
    20
    21  import org.apache.ws.commons.schema.XmlSchemaObject;
    22  import org.w3c.dom.Node;
    23
    24
    25  /**
    26   *  Interface for the extension serializer. The purpose of an instance
    27   * of this is to serialize the relevant custom object
    28   * and  generate   attribute/elementa desired . This custom object
    29   * may be stored in the metadata map
    30   * of the parent schema object. When to invoke a given serializer is a decision
    31   * taken by the extension registry
    32   */
    33  public interface ExtensionSerializer {
    34
    35       /**
    36       * serialize the given element
    37       * @param schemaObject  - Parent schema object.contains the extension
    38        * to be serialized
    39       * @param classOfType - The class of type to be serialized
    40       * @param domNode - the parent DOM Node that will ultimately be serialized. The XMLSchema
    41       * serialization mechanism is to create a DOM tree first and serialize it
    42       */
    43       public void serialize(XmlSchemaObject schemaObject,
    44                               Class classOfType,
    45                               Node domNode);
    46  }