1 8 9 package org.uddi4j.response; 10 11 import org.uddi4j.UDDIElement; 12 import org.uddi4j.UDDIException; 13 import org.uddi4j.datatype.business.BusinessEntity; 14 import org.w3c.dom.Element ; 15 import org.w3c.dom.NodeList ; 16 17 43 public class BusinessEntityExt extends UDDIElement { 44 public static final String UDDI_TAG = "businessEntityExt"; 45 46 protected Element base = null; 47 48 BusinessEntity businessEntity = null; 49 50 56 57 public BusinessEntityExt() { 58 } 59 60 65 public BusinessEntityExt(BusinessEntity businessEntity) { 66 this.businessEntity = businessEntity; 67 } 68 69 79 80 public BusinessEntityExt(Element base) throws UDDIException { 81 super(base); 83 NodeList nl = null; 84 nl = getChildElementsByTagName(base, BusinessEntity.UDDI_TAG); 85 if (nl.getLength() > 0) { 86 businessEntity = new BusinessEntity((Element)nl.item(0)); 87 } 88 } 89 90 public void setBusinessEntity(BusinessEntity s) { 91 businessEntity = s; 92 } 93 94 public BusinessEntity getBusinessEntity() { 95 return businessEntity; 96 } 97 98 99 108 109 public void saveToXML(Element parent) { 110 base = parent.getOwnerDocument().createElement(UDDI_TAG); 111 if (businessEntity!=null) { 113 businessEntity.saveToXML(base); 114 } 115 parent.appendChild(base); 116 } 117 } 118 | Popular Tags |