in src/main/java/org/apache/ws/commons/schema/extensions/DefaultExtensionDeserializer.java [48:92]
public void deserialize(XmlSchemaObject schemaObject, QName name, Node node) {
// we just attach the raw node either to the meta map of
// elements or the attributes
Map<Object, Object> metaInfoMap = schemaObject.getMetaInfoMap();
if (metaInfoMap == null) {
metaInfoMap = new HashMap<Object, Object>();
}
if (node.getNodeType() == Node.ATTRIBUTE_NODE) {
Map<QName, Node> attribMap;
if (metaInfoMap.containsKey(Constants.MetaDataConstants.EXTERNAL_ATTRIBUTES)) {
attribMap = (Map<QName, Node>)
metaInfoMap.get(Constants.MetaDataConstants.EXTERNAL_ATTRIBUTES);
} else {
attribMap = new HashMap<QName, Node>();
metaInfoMap.put(Constants.MetaDataConstants.EXTERNAL_ATTRIBUTES, attribMap);
}
attribMap.put(name, node);
} else if (node.getNodeType() == Node.ELEMENT_NODE) {
Map<QName, Node> elementMap;
if (metaInfoMap.containsKey(Constants.MetaDataConstants.EXTERNAL_ELEMENTS)) {
elementMap = (Map<QName, Node>)metaInfoMap.get(Constants.MetaDataConstants.EXTERNAL_ELEMENTS);
} else {
elementMap = new HashMap<QName, Node>();
metaInfoMap.put(Constants.MetaDataConstants.EXTERNAL_ELEMENTS, elementMap);
}
elementMap.put(name, node);
}
// subsequent processing takes place only if this map is not empty
if (!metaInfoMap.isEmpty()) {
Map<Object, Object> metaInfoMapFromSchemaElement = schemaObject.getMetaInfoMap();
if (metaInfoMapFromSchemaElement == null) {
schemaObject.setMetaInfoMap(metaInfoMap);
} else {
metaInfoMapFromSchemaElement.putAll(metaInfoMap);
}
}
}