1 8 9 package org.uddi4j.datatype; 10 11 import org.uddi4j.UDDIElement; 12 import org.uddi4j.UDDIException; 13 import org.w3c.dom.Element ; 14 15 33 public class OverviewURL extends UDDIElement 34 { 35 public static final String UDDI_TAG = "overviewURL"; 36 37 protected Element base = null; 38 39 String text = null; 40 41 47 public OverviewURL() 48 { 49 } 50 51 56 public OverviewURL(String value) 57 { 58 setText(value); 59 } 60 61 70 public OverviewURL(Element base) throws UDDIException 71 { 72 super(base); 74 text = getText(base); 75 } 76 77 public void setText(String s) 78 { 79 text = s; 80 } 81 82 public String getText() 83 { 84 return text; 85 } 86 87 96 public void saveToXML(Element parent) 97 { 98 base = parent.getOwnerDocument().createElement(UDDI_TAG); 99 if (text != null) 101 { 102 base.appendChild(parent.getOwnerDocument().createTextNode(text)); 103 } 104 parent.appendChild(base); 105 } 106 107 public boolean equals(Object object) 108 { 109 boolean result = false; 110 if (object != null && object instanceof OverviewURL) 111 { 112 OverviewURL otherOverviewURL = (OverviewURL) object; 113 if ((this.text == null && otherOverviewURL.text == null) 114 || (this.text != null && this.text.equals(otherOverviewURL.text))) 115 { 116 result = true; 118 } 119 } 121 return result; 122 } 123 } 124 | Popular Tags |