1 28 29 package extras; 30 31 import java.util.ArrayList ; 32 33 import org.jibx.extras.IdDefRefMapperBase; 34 import org.jibx.extras.IdRefMapperBase; 35 36 public class NameArray 37 { 38 public Object [] m_names; 39 public ArrayList m_references; 40 41 public static class Name 42 { 43 public String m_id; 44 public String m_first; 45 public String m_last; 46 } 47 48 private static class RefMapper extends IdRefMapperBase 49 { 50 public RefMapper(String uri, int index, String name) { 51 super(uri, index, name); 52 } 53 54 protected String getIdValue(Object item) { 55 return ((Name)item).m_id; 56 } 57 } 58 59 private static class DefRefMapper extends IdDefRefMapperBase 60 { 61 public DefRefMapper(String uri, int index, String name) { 62 super(uri, index, name); 63 } 64 65 protected String getIdValue(Object item) { 66 return ((Name)item).m_id; 67 } 68 } 69 } 70 | Popular Tags |