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