1 8 9 package org.uddi4j.response; 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 43 public class AssertionStatusReport extends UDDIElement { 44 public static final String UDDI_TAG = "assertionStatusReport"; 45 46 protected Element base = null; 47 48 String operator = null; 49 50 Vector assertionStatusItem = new Vector (); 52 53 54 60 61 public AssertionStatusReport() { 62 } 63 64 65 75 76 public AssertionStatusReport(Element base) throws UDDIException { 77 super(base); 79 operator = base.getAttribute("operator"); 80 NodeList nl = null; 81 nl = getChildElementsByTagName(base, AssertionStatusItem.UDDI_TAG); 82 for (int i=0; i < nl.getLength(); i++) { 83 assertionStatusItem.addElement(new AssertionStatusItem((Element)nl.item(i))); 84 } 85 } 86 87 public String getOperator() { 88 return operator; 89 } 90 91 public void setOperator(String s) { 92 operator = s; 93 } 94 95 100 public Vector getAssertionStatusItemVector() { 101 return assertionStatusItem; 102 } 103 104 109 public void setAssertionStatusItemVector(Vector v) { 110 assertionStatusItem = v; 111 } 112 113 114 123 124 public void saveToXML(Element parent) { 125 base = parent.getOwnerDocument().createElement(UDDI_TAG); 126 base.setAttribute("generic", UDDIElement.GENERIC); 128 base.setAttribute("xmlns", UDDIElement.XMLNS); 129 if (operator!=null) { 130 base.setAttribute("operator", operator); 131 } 132 if (assertionStatusItem!=null) { 133 for (int i=0; i < assertionStatusItem.size(); i++) { 134 ((AssertionStatusItem)(assertionStatusItem.elementAt(i))).saveToXML(base); 135 } 136 } 137 parent.appendChild(base); 138 } 139 } 140 | Popular Tags |