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 FindQualifiers extends UDDIElement { 42 public static final String UDDI_TAG = "findQualifiers"; 43 44 protected Element base = null; 45 46 Vector findQualifier = new Vector (); 48 49 55 public FindQualifiers() { 56 } 57 58 68 public FindQualifiers(Element base) throws UDDIException { 69 super(base); 71 NodeList nl = null; 72 nl = getChildElementsByTagName(base, FindQualifier.UDDI_TAG); 73 for (int i=0; i < nl.getLength(); i++) { 74 findQualifier.addElement(new FindQualifier((Element)nl.item(i))); 75 } 76 } 77 78 83 public void setFindQualifierVector(Vector s) { 84 findQualifier = s; 85 } 86 87 91 public void add (FindQualifier f) { 92 findQualifier.add (f); 93 } 94 95 101 public boolean remove (FindQualifier f) { 102 return findQualifier.remove (f); 103 } 104 105 110 public FindQualifier get (int index) { 111 return (FindQualifier) findQualifier.get (index); 112 } 113 114 118 public int size () { 119 return findQualifier.size (); 120 } 121 122 127 public Vector getFindQualifierVector() { 128 return findQualifier; 129 } 130 131 140 public void saveToXML(Element parent) { 141 base = parent.getOwnerDocument().createElement(UDDI_TAG); 142 if (findQualifier!=null) { 144 for (int i=0; i < findQualifier.size(); i++) { 145 ((FindQualifier)(findQualifier.elementAt(i))).saveToXML(base); 146 } 147 } 148 parent.appendChild(base); 149 } 150 } 151 | Popular Tags |