1 8 9 package org.uddi4j.request; 10 11 import org.uddi4j.UDDIElement; 12 import org.uddi4j.UDDIException; 13 import org.uddi4j.util.AuthInfo; 14 import org.w3c.dom.Element ; 15 import org.w3c.dom.NodeList ; 16 17 41 public class GetPublisherAssertions extends UDDIElement { 42 public static final String UDDI_TAG = "get_publisherAssertions"; 43 44 protected Element base = null; 45 46 AuthInfo authInfo = null; 47 48 49 55 public GetPublisherAssertions() { 56 } 57 58 68 public GetPublisherAssertions(Element base) throws UDDIException { 69 super(base); 71 NodeList nl = null; 72 nl = getChildElementsByTagName(base, AuthInfo.UDDI_TAG); 73 if (nl.getLength() > 0) { 74 authInfo = new AuthInfo((Element)nl.item(0)); 75 } 76 } 77 78 83 public GetPublisherAssertions(String authInfo) { 84 this.authInfo = new AuthInfo(authInfo); 85 } 86 87 public AuthInfo getAuthInfo() { 88 return authInfo; 89 } 90 91 public void setAuthInfo(AuthInfo s) { 92 authInfo = s; 93 } 94 95 public String getAuthInfoString() { 96 if(authInfo!=null) 97 return authInfo.getText(); 98 else 99 return null; 100 } 101 102 public void setAuthInfo(String s) { 103 authInfo = new AuthInfo(); 104 authInfo.setText(s); 105 } 106 107 116 public void saveToXML(Element parent) { 117 base = parent.getOwnerDocument().createElement(UDDI_TAG); 118 base.setAttribute("generic", UDDIElement.GENERIC); 120 base.setAttribute("xmlns", UDDIElement.XMLNS); 121 if (authInfo!=null) { 122 authInfo.saveToXML(base); 123 } 124 125 parent.appendChild(base); 126 } 127 } 128 | Popular Tags |