public class BPELUnknownExtensionDeserializer extends UnknownExtensionDeserializer implements BPELExtensionDeserializer {
public ExtensibilityElement unmarshall(Class parentType, QName elementType, Node node, Process process, Map nsMap, ExtensionRegistry extReg, URI uri) throws WSDLException {
if (node instanceof Element) {
if (elementType.getLocalPart().equals("extensibilityAttributes")) {
UnknownExtensibilityAttribute unknownExt = BPELFactory.eINSTANCE.createUnknownExtensibilityAttribute();
String requiredStr = DOMUtils.getAttributeNS((Element)node, Constants.NS_URI_WSDL, Constants.ATTR_REQUIRED);
unknownExt.setElementType(elementType);
if (requiredStr != null) {
unknownExt.setRequired(new Boolean(requiredStr));
}
unknownExt.setElement((Element)node);
return unknownExt;
} else {
UnknownExtensibilityElement unknownExt = WSDLFactory.eINSTANCE.createUnknownExtensibilityElement();
String requiredStr = DOMUtils.getAttributeNS((Element)node, Constants.NS_URI_WSDL, Constants.ATTR_REQUIRED);
unknownExt.setElementType(elementType);
if (requiredStr != null) {
unknownExt.setRequired(new Boolean(requiredStr));
}
unknownExt.setElement((Element)node);
return unknownExt;
}
}
return null;