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 import javax.xml.namespace.QName; 23 24 /** 25 * Interface for the extension deserializer. The purpose of an instance 26 * of this is to deserialize the relevant attribute/element and perhaps generate 27 * a desired custom object. This custom object can be stored in the metadata map 28 * of the parent schema object. When to invoke a given deserializer is a decision 29 * taken by the extension registry 30 */ 31 public interface ExtensionDeserializer { 32 33 /** 34 * deserialize the given element 35 * @param schemaObject - Parent schema element 36 * @param name - the QName of the element/attribute to be deserialized. 37 * in the case where a deserializer is used to handle multiple elements/attributes 38 * this may be useful to determine the correct deserialization 39 * @param domNode - the raw DOM Node read from the source. This will be the 40 * extension element itself if for an element or the extension attribute object if 41 * it is an attribute 42 * 43 */ 44 public void deserialize(XmlSchemaObject schemaObject, 45 QName name, 46 Node domNode); 47 48 }