1 18 19 package sync4j.framework.core.dm.ddf; 20 21 import java.util.Hashtable ; 22 import java.util.Map ; 23 import java.util.HashMap ; 24 import java.beans.XMLEncoder ; 25 26 27 34 public class Ext { 35 36 38 40 private Map nodes; 42 43 private String nome; 44 45 47 public Ext() { 48 this.nodes = new HashMap (); 49 } 50 51 56 public void setNode(String name, String value) { 57 nodes.put(name, value); 58 } 59 60 65 public void getNode(String name, String value) { 66 67 } 68 69 public void setNome(String nome) { 70 this.nome = nome; 71 } 72 73 public String getNome() { 74 return nome; 75 } 76 77 81 public Map getNodes() { 82 return nodes; 83 } 84 85 87 public static void main(String [] args) { 88 89 Ext ext = new Ext(); 90 ext.setNode("service", "5"); 91 ext.setNome("pippo"); 92 XMLEncoder enc = new XMLEncoder (System.out); 93 enc.writeObject(ext); 94 enc.flush(); 95 enc.close(); 96 } 97 } | Popular Tags |