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