1 57 58 package org.apache.wsif.schema; 59 60 import java.io.Serializable ; 61 62 import org.w3c.dom.Element ; 63 import org.w3c.dom.Node ; 64 import org.w3c.dom.NodeList ; 65 66 71 public class ComplexContent implements Serializable { 72 73 static final long serialVersionUID = 1L; 74 75 private Restriction restriction = null; 76 private Extension extention = null; 77 78 82 ComplexContent(Element el, String tns) { 83 NodeList children = el.getChildNodes(); 84 for (int i=0; i<children.getLength(); i++) { 85 Node child = children.item(i); 86 if (child.getNodeType() == Node.ELEMENT_NODE) { 87 Element subEl = (Element ) child; 88 String elType = subEl.getLocalName(); 89 if (elType.equals("restriction")) { 90 restriction = new Restriction(subEl, tns); 91 break; 92 } else if (elType.equals("extension")) { 93 extention = new Extension(subEl); 94 break; 95 } 96 } 97 } 98 } 99 100 104 public Restriction getRestriction() { 105 return restriction; 106 } 107 108 112 public Extension getExtension() { 113 return extention; 114 } 115 } 116 | Popular Tags |