1 8 9 package org.uddi4j.util; 10 11 import org.uddi4j.UDDIElement; 12 import org.uddi4j.UDDIException; 13 import org.w3c.dom.Element ; 14 15 34 public class ToKey extends UDDIElement { 35 public static final String UDDI_TAG = "toKey"; 36 37 protected Element base = null; 38 39 String text = null; 40 41 42 48 public ToKey() { 49 } 50 51 61 public ToKey(Element base) throws UDDIException { 62 super(base); 63 text = getText(base); 64 } 65 66 71 public ToKey(String key) { 72 setText(key); 73 } 74 75 public void setText(String s) { 76 text = s; 77 } 78 79 public String getText() { 80 return text; 81 } 82 83 92 public void saveToXML(Element parent) { 93 base = parent.getOwnerDocument().createElement(UDDI_TAG); 94 if (text!=null) { 96 base.appendChild(parent.getOwnerDocument().createTextNode(text)); 97 } 98 parent.appendChild(base); 99 } 100 } 101 | Popular Tags |