1 8 9 package org.uddi4j.datatype.binding; 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 TModelInstanceDetails extends UDDIElement { 42 public static final String UDDI_TAG = "tModelInstanceDetails"; 43 44 protected Element base = null; 45 46 Vector tModelInstanceInfo = new Vector (); 48 49 53 public TModelInstanceDetails() { 54 } 55 56 66 public TModelInstanceDetails(Element base) throws UDDIException { 67 super(base); 69 NodeList nl = null; 70 nl = getChildElementsByTagName(base, TModelInstanceInfo.UDDI_TAG); 71 for (int i=0; i < nl.getLength(); i++) { 72 tModelInstanceInfo.addElement(new TModelInstanceInfo((Element)nl.item(i))); 73 } 74 } 75 76 81 public void setTModelInstanceInfoVector(Vector s) { 82 tModelInstanceInfo = s; 83 } 84 85 90 public Vector getTModelInstanceInfoVector() { 91 return tModelInstanceInfo; 92 } 93 94 98 public void add (TModelInstanceInfo t) { 99 tModelInstanceInfo.add (t); 100 } 101 102 108 public boolean remove (TModelInstanceInfo t) { 109 return tModelInstanceInfo.remove (t); 110 } 111 112 117 public TModelInstanceInfo get (int index) { 118 return (TModelInstanceInfo) tModelInstanceInfo.get (index); 119 } 120 121 125 public int size () { 126 return tModelInstanceInfo.size (); 127 } 128 129 138 public void saveToXML(Element parent) { 139 base = parent.getOwnerDocument().createElement(UDDI_TAG); 140 if (tModelInstanceInfo!=null) { 142 for (int i=0; i < tModelInstanceInfo.size(); i++) { 143 ((TModelInstanceInfo)(tModelInstanceInfo.elementAt(i))).saveToXML(base); 144 } 145 } 146 parent.appendChild(base); 147 } 148 } 149 | Popular Tags |