/sigmah/src/main/resources/dozer-admin-mapping.xml

http://sigma-h.googlecode.com/ · XML · 68 lines · 47 code · 14 blank · 7 comment · 0 complexity · b620c5f927a03eb9405412de7046d718 MD5 · raw file

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. ~ All Sigmah code is released under the GNU General Public License v3
  4. ~ See COPYRIGHT.txt and LICENSE.txt.
  5. -->
  6. <mappings xmlns="http://dozer.sourceforge.net" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://dozer.sourceforge.net beanmapping.xsd ">
  7. <!-- This mapping is for the GetCountries command, it maps only the id and
  8. name of the Country object, leaving other fields blanks -->
  9. <mapping wildcard="false" map-id="countryNameOnly">
  10. <class-a>org.sigmah.shared.domain.Country</class-a>
  11. <class-b>org.sigmah.shared.dto.CountryDTO</class-b>
  12. <field>
  13. <a>id</a>
  14. <b>id</b>
  15. </field>
  16. <field>
  17. <a>name</a>
  18. <b>name</b>
  19. </field>
  20. <!-- Adds the ISO code to this mapping to display countries full name -->
  21. <field>
  22. <a>codeISO</a>
  23. <b>codeISO</b>
  24. </field>
  25. </mapping>
  26. <mapping wildcard="true">
  27. <class-a>org.sigmah.shared.domain.AdminLevel</class-a>
  28. <class-b>org.sigmah.shared.dto.AdminLevelDTO</class-b>
  29. <field>
  30. <a>parent.id</a>
  31. <b>parentLevelId</b>
  32. </field>
  33. </mapping>
  34. <mapping wildcard="true">
  35. <class-a>org.sigmah.shared.domain.AdminEntity</class-a>
  36. <class-b>org.sigmah.shared.dto.AdminEntityDTO</class-b>
  37. <field>
  38. <a>level.id</a>
  39. <b>levelId</b>
  40. </field>
  41. <field>
  42. <a>parent.id</a>
  43. <b>parentId</b>
  44. </field>
  45. </mapping>
  46. <mapping wildcard="true">
  47. <class-a>org.sigmah.shared.domain.LocationType</class-a>
  48. <class-b>org.sigmah.shared.dto.LocationTypeDTO</class-b>
  49. <field>
  50. <a>boundAdminLevel.id</a>
  51. <b>boundAdminLevelId</b>
  52. </field>
  53. </mapping>
  54. </mappings>