Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 8 9 package org.uddi4j.util; 10 11 import java.util.Vector ; 12 13 import org.uddi4j.UDDIElement; 14 import org.uddi4j.UDDIException; 15 import org.w3c.dom.Element ; 16 import org.w3c.dom.NodeList ; 17 18 41 public class DiscoveryURLs extends UDDIElement 42 { 43 public static final String UDDI_TAG = "discoveryURLs"; 44 45 protected Element base = null; 46 47 Vector discoveryURL = new Vector (); 49 50 56 public DiscoveryURLs() 57 { 58 } 59 60 65 public DiscoveryURLs(Vector discoveryURL) 66 { 67 this.discoveryURL = discoveryURL; 68 } 69 70 80 public DiscoveryURLs(Element base) throws UDDIException 81 { 82 super(base); 84 NodeList nl = null; 85 nl = getChildElementsByTagName(base, DiscoveryURL.UDDI_TAG); 86 for (int i = 0; i < nl.getLength(); i++) 87 { 88 discoveryURL.addElement(new DiscoveryURL((Element)nl.item(i))); 89 } 90 } 91 92 97 public void setDiscoveryURLVector(Vector s) 98 { 99 discoveryURL = s; 100 } 101 102 107 public Vector getDiscoveryURLVector() 108 { 109 return discoveryURL; 110 } 111 112 116 public void add(DiscoveryURL d) 117 { 118 discoveryURL.add(d); 119 } 120 121 127 public boolean remove(DiscoveryURL d) 128 { 129 return discoveryURL.remove(d); 130 } 131 132 137 public DiscoveryURL get(int index) 138 { 139 return (DiscoveryURL)discoveryURL.get(index); 140 } 141 142 146 public int size() 147 { 148 return discoveryURL.size(); 149 } 150 151 160 public void saveToXML(Element parent) 161 { 162 base = parent.getOwnerDocument().createElement(UDDI_TAG); 163 if (discoveryURL != null) 165 { 166 for (int i = 0; i < discoveryURL.size(); i++) 167 { 168 ((DiscoveryURL) (discoveryURL.elementAt(i))).saveToXML(base); 169 } 170 } 171 parent.appendChild(base); 172 } 173 } 174
| Popular Tags
|