1 16 package org.apache.juddi.handler; 17 18 import org.apache.juddi.datatype.OverviewURL; 19 import org.apache.juddi.datatype.RegistryObject; 20 import org.apache.juddi.util.xml.XMLUtils; 21 import org.w3c.dom.Element ; 22 23 29 public class OverviewURLHandler extends AbstractHandler 30 { 31 public static final String TAG_NAME = "overviewURL"; 32 33 private HandlerMaker maker = null; 34 35 protected OverviewURLHandler(HandlerMaker maker) 36 { 37 this.maker = maker; 38 } 39 40 public RegistryObject unmarshal(Element element) 41 { 42 OverviewURL obj = new OverviewURL(); 43 44 47 obj.setValue(XMLUtils.getText(element)); 49 50 53 return obj; 54 } 55 56 public void marshal(RegistryObject object,Element parent) 57 { 58 OverviewURL overURL = (OverviewURL)object; 59 Element element = parent.getOwnerDocument().createElementNS(null,TAG_NAME); 60 61 String urlValue = overURL.getValue(); 62 if (urlValue != null) 63 element.appendChild(parent.getOwnerDocument().createTextNode(urlValue)); 64 65 parent.appendChild(element); 66 } 67 68 69 70 71 72 73 74 public static void main(String args[]) 75 throws Exception 76 { 77 } 78 } | Popular Tags |