/********************************************************************************* * * * WARNING: File automatically generated by DMXmlJson. DON'T CHANGE IT manually! * * * *********************************************************************************/ package it.bz.tis.sasabus.backend.shared; public class SASAbusMarshaller_Helper extends bz.davide.dmxmljson.marshalling.Marshaller { protected SASAbusMarshaller_Helper() { this.putClassMarshaller("it.bz.tis.sasabus.backend.shared.AreaList", new bz.davide.dmxmljson.marshalling.ClassMarshaller() { @Override public void marshall(Object obj, String compileTimeClassName, bz.davide.dmxmljson.marshalling.Structure structure, java.util.IdentityHashMap<Object, bz.davide.dmxmljson.marshalling.Structure> identities, long[] seq, boolean superClass) throws Exception { if (!superClass) { if (isReference(structure, obj, identities, seq)) return; identities.put(obj, structure); structure.open(shortName(compileTimeClassName), shortName(obj.getClass().getName()), null); } Object value; // areas value = ((it.bz.tis.sasabus.backend.shared.AreaList)obj).areas; if (value == null) structure.property("areas").nullValue(); else { it.bz.tis.sasabus.backend.shared.Area[] rawarray = (it.bz.tis.sasabus.backend.shared.Area[])value; bz.davide.dmxmljson.marshalling.Array array = structure.property("areas").array(rawarray.length); for (Object o: rawarray) { if (o == null) array.item().nullValue(); internalMarschall(o, o.getClass().getName(), "it.bz.tis.sasabus.backend.shared.Area", array.item().structure(), identities, seq, false); } } // lastModified value = ((it.bz.tis.sasabus.backend.shared.AreaList)obj).lastModified; if (value == null) structure.property("lastModified").nullValue(); else { structure.property("lastModified").integer((Long)value); } if (!superClass) structure.close(); } }); this.putClassMarshaller("it.bz.tis.sasabus.backend.shared.Area", new bz.davide.dmxmljson.marshalling.ClassMarshaller() { @Override public void marshall(Object obj, String compileTimeClassName, bz.davide.dmxmljson.marshalling.Structure structure, java.util.IdentityHashMap<Object, bz.davide.dmxmljson.marshalling.Structure> identities, long[] seq, boolean superClass) throws Exception { if (!superClass) { if (isReference(structure, obj, identities, seq)) return; identities.put(obj, structure); structure.open(shortName(compileTimeClassName), shortName(obj.getClass().getName()), null); } Object value; // bounds value = ((it.bz.tis.sasabus.backend.shared.Area)obj).bounds; if (value == null) structure.property("bounds").nullValue(); else { it.bz.tis.sasabus.backend.shared.LatLng[] rawarray = (it.bz.tis.sasabus.backend.shared.LatLng[])value; bz.davide.dmxmljson.marshalling.Array array = structure.property("bounds").array(rawarray.length); for (Object o: rawarray) { if (o == null) array.item().nullValue(); internalMarschall(o, o.getClass().getName(), "it.bz.tis.sasabus.backend.shared.LatLng", array.item().structure(), identities, seq, false); } } // busLines value = ((it.bz.tis.sasabus.backend.shared.Area)obj).busLines; if (value == null) structure.property("busLines").nullValue(); else { it.bz.tis.sasabus.backend.shared.BusLine[] rawarray = (it.bz.tis.sasabus.backend.shared.BusLine[])value; bz.davide.dmxmljson.marshalling.Array array = structure.property("busLines").array(rawarray.length); for (Object o: rawarray) { if (o == null) array.item().nullValue(); internalMarschall(o, o.getClass().getName(), "it.bz.tis.sasabus.backend.shared.BusLine", array.item().structure(), identities, seq, false); } } // id value = ((it.bz.tis.sasabus.backend.shared.Area)obj).id; if (value == null) structure.property("id").nullValue(); else { structure.property("id").integer((Integer)value); } // name_de value = ((it.bz.tis.sasabus.backend.shared.Area)obj).name_de; if (value == null) structure.property("name_de").nullValue(); else { structure.property("name_de").string((String)value); } // name_it value = ((it.bz.tis.sasabus.backend.shared.Area)obj).name_it; if (value == null) structure.property("name_it").nullValue(); else { structure.property("name_it").string((String)value); } if (!superClass) structure.close(); } }); this.putClassMarshaller("it.bz.tis.sasabus.backend.shared.LatLng", new bz.davide.dmxmljson.marshalling.ClassMarshaller() { @Override public void marshall(Object obj, String compileTimeClassName, bz.davide.dmxmljson.marshalling.Structure structure, java.util.IdentityHashMap<Object, bz.davide.dmxmljson.marshalling.Structure> identities, long[] seq, boolean superClass) throws Exception { if (!superClass) { if (isReference(structure, obj, identities, seq)) return; identities.put(obj, structure); structure.open(shortName(compileTimeClassName), shortName(obj.getClass().getName()), null); } Object value; // lat value = ((it.bz.tis.sasabus.backend.shared.LatLng)obj).lat; if (value == null) structure.property("lat").nullValue(); else { structure.property("lat").decimal((Double)value); } // lon value = ((it.bz.tis.sasabus.backend.shared.LatLng)obj).lon; if (value == null) structure.property("lon").nullValue(); else { structure.property("lon").decimal((Double)value); } if (!superClass) structure.close(); } }); this.putClassMarshaller("it.bz.tis.sasabus.backend.shared.BusLine", new bz.davide.dmxmljson.marshalling.ClassMarshaller() { @Override public void marshall(Object obj, String compileTimeClassName, bz.davide.dmxmljson.marshalling.Structure structure, java.util.IdentityHashMap<Object, bz.davide.dmxmljson.marshalling.Structure> identities, long[] seq, boolean superClass) throws Exception { if (!superClass) { if (isReference(structure, obj, identities, seq)) return; identities.put(obj, structure); structure.open(shortName(compileTimeClassName), shortName(obj.getClass().getName()), null); } Object value; // area value = ((it.bz.tis.sasabus.backend.shared.BusLine)obj).area; if (value == null) structure.property("area").nullValue(); else { internalMarschall(value, value.getClass().getName(),"it.bz.tis.sasabus.backend.shared.Area", structure.property("area").structure(), identities, seq, false); } // busStops value = ((it.bz.tis.sasabus.backend.shared.BusLine)obj).busStops; if (value == null) structure.property("busStops").nullValue(); else { it.bz.tis.sasabus.backend.shared.BusStop[] rawarray = (it.bz.tis.sasabus.backend.shared.BusStop[])value; bz.davide.dmxmljson.marshalling.Array array = structure.property("busStops").array(rawarray.length); for (Object o: rawarray) { if (o == null) array.item().nullValue(); internalMarschall(o, o.getClass().getName(), "it.bz.tis.sasabus.backend.shared.BusStop", array.item().structure(), identities, seq, false); } } // id value = ((it.bz.tis.sasabus.backend.shared.BusLine)obj).id; if (value == null) structure.property("id").nullValue(); else { structure.property("id").integer((Integer)value); } // number value = ((it.bz.tis.sasabus.backend.shared.BusLine)obj).number; if (value == null) structure.property("number").nullValue(); else { structure.property("number").string((String)value); } if (!superClass) structure.close(); } }); this.putClassMarshaller("it.bz.tis.sasabus.backend.shared.BusStop", new bz.davide.dmxmljson.marshalling.ClassMarshaller() { @Override public void marshall(Object obj, String compileTimeClassName, bz.davide.dmxmljson.marshalling.Structure structure, java.util.IdentityHashMap<Object, bz.davide.dmxmljson.marshalling.Structure> identities, long[] seq, boolean superClass) throws Exception { if (!superClass) { if (isReference(structure, obj, identities, seq)) return; identities.put(obj, structure); structure.open(shortName(compileTimeClassName), shortName(obj.getClass().getName()), null); } Object value; // busStation value = ((it.bz.tis.sasabus.backend.shared.BusStop)obj).busStation; if (value == null) structure.property("busStation").nullValue(); else { internalMarschall(value, value.getClass().getName(),"it.bz.tis.sasabus.backend.shared.BusStation", structure.property("busStation").structure(), identities, seq, false); } // id value = ((it.bz.tis.sasabus.backend.shared.BusStop)obj).id; if (value == null) structure.property("id").nullValue(); else { structure.property("id").integer((Integer)value); } // lat value = ((it.bz.tis.sasabus.backend.shared.BusStop)obj).lat; if (value == null) structure.property("lat").nullValue(); else { structure.property("lat").decimal((Double)value); } // lon value = ((it.bz.tis.sasabus.backend.shared.BusStop)obj).lon; if (value == null) structure.property("lon").nullValue(); else { structure.property("lon").decimal((Double)value); } if (!superClass) structure.close(); } }); this.putClassMarshaller("it.bz.tis.sasabus.backend.shared.BusStation", new bz.davide.dmxmljson.marshalling.ClassMarshaller() { @Override public void marshall(Object obj, String compileTimeClassName, bz.davide.dmxmljson.marshalling.Structure structure, java.util.IdentityHashMap<Object, bz.davide.dmxmljson.marshalling.Structure> identities, long[] seq, boolean superClass) throws Exception { if (!superClass) { if (isReference(structure, obj, identities, seq)) return; identities.put(obj, structure); structure.open(shortName(compileTimeClassName), shortName(obj.getClass().getName()), null); } Object value; // busLines value = ((it.bz.tis.sasabus.backend.shared.BusStation)obj).busLines; if (value == null) structure.property("busLines").nullValue(); else { it.bz.tis.sasabus.backend.shared.BusLine[] rawarray = (it.bz.tis.sasabus.backend.shared.BusLine[])value; bz.davide.dmxmljson.marshalling.Array array = structure.property("busLines").array(rawarray.length); for (Object o: rawarray) { if (o == null) array.item().nullValue(); internalMarschall(o, o.getClass().getName(), "it.bz.tis.sasabus.backend.shared.BusLine", array.item().structure(), identities, seq, false); } } // busStops value = ((it.bz.tis.sasabus.backend.shared.BusStation)obj).busStops; if (value == null) structure.property("busStops").nullValue(); else { it.bz.tis.sasabus.backend.shared.BusStop[] rawarray = (it.bz.tis.sasabus.backend.shared.BusStop[])value; bz.davide.dmxmljson.marshalling.Array array = structure.property("busStops").array(rawarray.length); for (Object o: rawarray) { if (o == null) array.item().nullValue(); internalMarschall(o, o.getClass().getName(), "it.bz.tis.sasabus.backend.shared.BusStop", array.item().structure(), identities, seq, false); } } // id value = ((it.bz.tis.sasabus.backend.shared.BusStation)obj).id; if (value == null) structure.property("id").nullValue(); else { structure.property("id").string((String)value); } // name_de value = ((it.bz.tis.sasabus.backend.shared.BusStation)obj).name_de; if (value == null) structure.property("name_de").nullValue(); else { structure.property("name_de").string((String)value); } // name_it value = ((it.bz.tis.sasabus.backend.shared.BusStation)obj).name_it; if (value == null) structure.property("name_it").nullValue(); else { structure.property("name_it").string((String)value); } if (!superClass) structure.close(); } }); } }