PageRenderTime 33ms CodeModel.GetById 15ms app.highlight 11ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://sigma-h.googlecode.com/
XML | 609 lines | 462 code | 122 blank | 25 comment | 0 complexity | 0894000eb350a5077a4159a97702399b 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"
  7	xsi:schemaLocation="http://dozer.sourceforge.net beanmapping.xsd ">
  8
  9	<mapping wildcard="true">
 10		<class-a>org.sigmah.shared.domain.UserDatabase</class-a>
 11		<class-b>org.sigmah.shared.dto.UserDatabaseDTO</class-b>
 12
 13		<field>
 14			<a>owner.name</a>
 15			<b>ownerName</b>
 16		</field>
 17
 18		<field>
 19			<a>owner.email</a>
 20			<b>ownerEmail</b>
 21		</field>
 22
 23	</mapping>
 24
 25	<mapping wildcard="true">
 26
 27		<class-a>org.sigmah.shared.domain.Activity</class-a>
 28		<class-b>org.sigmah.shared.dto.ActivityDTO</class-b>
 29
 30		<field-exclude>
 31			<a>database</a>
 32			<b>database</b>
 33		</field-exclude>
 34
 35		<field>
 36			<a>locationType.id</a>
 37			<b>locationTypeId</b>
 38		</field>
 39
 40	</mapping>
 41
 42
 43	<mapping wildcard="true">
 44
 45		<class-a>org.sigmah.shared.domain.AttributeGroup</class-a>
 46		<class-b>org.sigmah.shared.dto.AttributeGroupDTO</class-b>
 47
 48	</mapping>
 49
 50	<mapping wildcard="true">
 51
 52		<class-a>org.sigmah.shared.domain.Attribute</class-a>
 53		<class-b>org.sigmah.shared.dto.AttributeDTO</class-b>
 54
 55	</mapping>
 56
 57
 58	<mapping wildcard="true">
 59
 60		<class-a>org.sigmah.shared.domain.UserPermission</class-a>
 61		<class-b>org.sigmah.shared.dto.UserPermissionDTO</class-b>
 62
 63		<field>
 64			<a>user.name</a>
 65			<b>name</b>
 66		</field>
 67
 68		<field>
 69			<a>user.firstName</a>
 70			<b>firstName</b>
 71		</field>
 72
 73		<field>
 74			<a>user.email</a>
 75			<b>email</b>
 76		</field>
 77	</mapping>
 78
 79	<mapping wildcard="true">
 80
 81		<class-a>org.sigmah.shared.domain.Indicator</class-a>
 82		<class-b>org.sigmah.shared.dto.IndicatorDTO</class-b>
 83
 84		<field>
 85			<a>id</a>
 86			<b>id</b>
 87		</field>
 88		
 89		<field>
 90			<a>database.id</a>
 91			<b>databaseId</b>
 92		</field>
 93
 94	</mapping>
 95
 96	<!-- Project/ProjectDTO Mapping -->
 97	<mapping wildcard="true">
 98		<class-a>org.sigmah.shared.domain.Project</class-a>
 99		<class-b>org.sigmah.shared.dto.ProjectDTO</class-b>
100
101		<field>
102			<a>projectModel</a>
103			<b>projectModelDTO</b>
104		</field>
105
106		<field>
107			<a>phases</a>
108			<b>phasesDTO</b>
109		</field>
110
111		<field>
112			<a>currentPhase</a>
113			<b>currentPhaseDTO</b>
114		</field>
115
116
117		<field>
118			<a>owner.name</a>
119			<b>ownerName</b>
120		</field>
121
122		<field>
123			<a>owner.firstName</a>
124			<b>ownerFirstName</b>
125		</field>
126
127		<field>
128			<a>owner.email</a>
129			<b>ownerEmail</b>
130		</field>
131
132		<field>
133			<a>logFrame</a>
134			<b>logFrameDTO</b>
135		</field>
136	</mapping>
137
138	<!-- Project/ProjectDTO Mapping -->
139	<mapping wildcard="true">
140		<class-a>org.sigmah.shared.domain.Project</class-a>
141		<class-b>org.sigmah.shared.dto.ProjectDTOLight</class-b>
142
143		<field>
144			<a>currentPhase.model.name</a>
145			<b>currentPhaseName</b>
146		</field>
147
148		<field>
149			<a>projectModel.visibilities</a>
150			<b>visibilities</b>
151		</field>
152	</mapping>
153
154	<!-- Phase/PhaseDTO Mapping -->
155	<mapping wildcard="true">
156		<class-a>org.sigmah.shared.domain.Phase</class-a>
157		<class-b>org.sigmah.shared.dto.PhaseDTO</class-b>
158
159		<field>
160			<a>model</a>
161			<b>phaseModelDTO</b>
162		</field>
163
164		<field>
165			<a>parentProject</a>
166			<b>parentProjectDTO</b>
167		</field>
168	</mapping>
169
170	<!-- ProjectModel/ProjectModelDTO Mapping -->
171	<mapping wildcard="true">
172		<class-a>org.sigmah.shared.domain.ProjectModel</class-a>
173		<class-b>org.sigmah.shared.dto.ProjectModelDTO</class-b>
174
175		<field>
176			<a>phases</a>
177			<b>phaseModelsDTO</b>
178		</field>
179
180		<field>
181			<a>rootPhase</a>
182			<b>rootPhaseModelDTO</b>
183		</field>
184
185		<field>
186			<a>projectBanner</a>
187			<b>projectBannerDTO</b>
188		</field>
189
190		<field>
191			<a>projectDetails</a>
192			<b>projectDetailsDTO</b>
193		</field>
194		
195		<field>
196			<a>logFrameModel</a>
197			<b>logFrameModelDTO</b>
198		</field>
199	</mapping>
200	<mapping wildcard="true">
201		<class-a>org.sigmah.shared.domain.logframe.LogFrameModel</class-a>
202		<class-b>org.sigmah.shared.dto.logframe.LogFrameModelDTO</class-b>
203	</mapping>
204	<mapping wildcard="true">
205		<class-a>org.sigmah.shared.domain.report.ProjectReportModel</class-a>
206		<class-b>org.sigmah.shared.dto.report.ReportModelDTO</class-b>
207		
208		<field>
209		 <a>organization.id</a>
210		 <b>organizationId</b>
211		</field>
212		<field>
213			<a>sections</a>
214			<b>sectionsDTO</b>
215		</field>
216	</mapping>
217	<mapping wildcard="true">
218		<class-a>org.sigmah.shared.domain.report.ProjectReportModelSection</class-a>
219		<class-b>org.sigmah.shared.dto.report.ProjectReportModelSectionDTO</class-b>
220		
221		<field>
222			<a>subSections</a>
223			<b>subSectionsDTO</b>
224		</field>
225	</mapping>
226	<!-- PhaseModel/PhaseModelDTO Mapping -->
227	<mapping wildcard="true">
228		<class-a>org.sigmah.shared.domain.PhaseModel</class-a>
229		<class-b>org.sigmah.shared.dto.PhaseModelDTO</class-b>
230
231		<field>
232			<a>parentProjectModel</a>
233			<b>parentProjectModelDTO</b>
234		</field>
235
236		<field>
237			<a>layout</a>
238			<b>layoutDTO</b>
239		</field>
240
241		<field>
242			<a>successors</a>
243			<b>successorsDTO</b>
244		</field>
245
246		<field>
247			<a>definition</a>
248			<b>definitionDTO</b>
249		</field>
250	</mapping>
251
252	<!-- Layout/LayoutDTO Mapping -->
253	<mapping wildcard="true">
254		<class-a>org.sigmah.shared.domain.layout.Layout</class-a>
255		<class-b>org.sigmah.shared.dto.layout.LayoutDTO</class-b>
256
257		<field>
258			<a>groups</a>
259			<b>layoutGroupsDTO</b>
260		</field>
261	</mapping>
262
263	<!-- LayoutGroup/LayoutGroupDTO Mapping -->
264	<mapping wildcard="true">
265		<class-a>org.sigmah.shared.domain.layout.LayoutGroup</class-a>
266		<class-b>org.sigmah.shared.dto.layout.LayoutGroupDTO</class-b>
267
268		<field>
269			<a>parentLayout</a>
270			<b>parentLayoutDTO</b>
271		</field>
272
273		<field>
274			<a>constraints</a>
275			<b>layoutConstraintsDTO</b>
276		</field>
277	</mapping>
278
279	<!-- LayoutConstraint/LayoutContraintDTO Mapping -->
280	<mapping wildcard="true">
281		<class-a>org.sigmah.shared.domain.layout.LayoutConstraint</class-a>
282		<class-b>org.sigmah.shared.dto.layout.LayoutConstraintDTO</class-b>
283
284		<field>
285			<a>parentLayoutGroup</a>
286			<b>parentLayoutGroupDTO</b>
287		</field>
288
289		<field>
290			<a>element</a>
291			<b>flexibleElementDTO</b>
292			<a-hint>org.sigmah.shared.domain.element.DefaultFlexibleElement,org.sigmah.shared.domain.element.MessageElement,org.sigmah.shared.domain.element.CheckboxElement,org.sigmah.shared.domain.element.TextAreaElement,org.sigmah.shared.domain.element.QuestionElement,org.sigmah.shared.domain.element.TripletsListElement,org.sigmah.shared.domain.element.FilesListElement,org.sigmah.shared.domain.element.IndicatorsListElement,org.sigmah.shared.domain.element.BudgetDistributionElement,org.sigmah.shared.domain.element.ReportElement,org.sigmah.shared.domain.element.ReportListElement
293			</a-hint>
294			<b-hint>org.sigmah.shared.dto.element.DefaultFlexibleElementDTO,org.sigmah.shared.dto.element.MessageElementDTO,org.sigmah.shared.dto.element.CheckboxElementDTO,org.sigmah.shared.dto.element.TextAreaElementDTO,org.sigmah.shared.dto.element.QuestionElementDTO,org.sigmah.shared.dto.element.TripletsListElementDTO,org.sigmah.shared.dto.element.FilesListElementDTO,org.sigmah.shared.dto.element.IndicatorsListElementDTO,org.sigmah.shared.dto.element.BudgetDistributionElementDTO,org.sigmah.shared.dto.element.ReportElementDTO,org.sigmah.shared.dto.element.ReportListElementDTO
295			</b-hint>
296		</field>
297
298	</mapping>
299
300	<!-- QuestionElement/QuestionElementDTO Mapping -->
301	<mapping wildcard="true">
302		<class-a>org.sigmah.shared.domain.element.QuestionElement</class-a>
303		<class-b>org.sigmah.shared.dto.element.QuestionElementDTO</class-b>
304
305		<field>
306			<a>choices</a>
307			<b>choicesDTO</b>
308		</field>
309
310		<field>
311			<a>categoryType</a>
312			<b>categoryTypeDTO</b>
313		</field>
314
315		<field>
316			<a>qualityCriterion</a>
317			<b>qualityCriterionDTO</b>
318		</field>
319	</mapping>
320
321	<!-- QuestionChoiceElement/QuestionChoiceElementDTO Mapping -->
322	<mapping wildcard="true">
323		<class-a>org.sigmah.shared.domain.element.QuestionChoiceElement
324		</class-a>
325		<class-b>org.sigmah.shared.dto.element.QuestionChoiceElementDTO
326		</class-b>
327
328		<field>
329			<a>id</a>
330			<b>id</b>
331		</field>
332
333		<field>
334			<a>parentQuestion</a>
335			<b>parentQuestionDTO</b>
336		</field>
337
338		<field>
339			<a>categoryElement</a>
340			<b>categoryElementDTO</b>
341		</field>
342	</mapping>
343
344	<!-- ProjectDetails/ProjectDetailsDTO Mapping -->
345	<mapping wildcard="true">
346		<class-a>org.sigmah.shared.domain.ProjectDetails</class-a>
347		<class-b>org.sigmah.shared.dto.ProjectDetailsDTO</class-b>
348
349		<field>
350			<a>layout</a>
351			<b>layoutDTO</b>
352		</field>
353
354		<field>
355			<a>projectModel</a>
356			<b>projectModelDTO</b>
357		</field>
358	</mapping>
359
360	<!-- ProjectBanner/ProjectBannerDTO Mapping -->
361	<mapping wildcard="true">
362		<class-a>org.sigmah.shared.domain.ProjectBanner</class-a>
363		<class-b>org.sigmah.shared.dto.ProjectBannerDTO</class-b>
364
365		<field>
366			<a>layout</a>
367			<b>layoutDTO</b>
368		</field>
369
370		<field>
371			<a>projectModel</a>
372			<b>projectModelDTO</b>
373		</field>
374	</mapping>
375
376	<!-- IndicatorsListValue/IndicatorsListValueDTO Mapping -->
377	<mapping wildcard="true">
378		<class-a>org.sigmah.shared.domain.value.IndicatorsListValue</class-a>
379		<class-b>org.sigmah.shared.dto.value.IndicatorsListValueDTO</class-b>
380
381		<field>
382			<a>id.idList</a>
383			<b>idList</b>
384		</field>
385
386		<field>
387			<a>id.indicatorId</a>
388			<b>id</b>
389		</field>
390
391		<field>
392			<a>indicator</a>
393			<b>indicatorDTO</b>
394		</field>
395	</mapping>
396
397	<!-- BudgetPartsListValue/BudgetPartsListValueDTO Mapping -->
398	<mapping wildcard="true">
399		<class-a>org.sigmah.shared.domain.value.BudgetPartsListValue</class-a>
400		<class-b>org.sigmah.shared.dto.value.BudgetPartsListValueDTO</class-b>
401
402		<field>
403			<a>id</a>
404			<b>id</b>
405		</field>
406	</mapping>
407
408	<!-- File/FileDTO Mapping -->
409	<mapping wildcard="true">
410		<class-a>org.sigmah.shared.domain.value.File</class-a>
411		<class-b>org.sigmah.shared.dto.value.FileDTO</class-b>
412
413		<field>
414			<a>versions</a>
415			<b>versionsDTO</b>
416		</field>
417	</mapping>
418
419	<!-- FilesVersion/FilesVersionDTO Mapping -->
420	<mapping wildcard="true">
421		<class-a>org.sigmah.shared.domain.value.FileVersion</class-a>
422		<class-b>org.sigmah.shared.dto.value.FileVersionDTO</class-b>
423
424		<field>
425			<a>author.name</a>
426			<b>authorName</b>
427		</field>
428
429		<field>
430			<a>author.firstName</a>
431			<b>authorFirstName</b>
432		</field>
433	</mapping>
434
435	<!-- CategoryType/CategoryTypeDTO Mapping -->
436	<mapping wildcard="true">
437		<class-a>org.sigmah.shared.domain.category.CategoryType</class-a>
438		<class-b>org.sigmah.shared.dto.category.CategoryTypeDTO</class-b>
439
440		<field>
441			<a>elements</a>
442			<b>categoryElementsDTO</b>
443		</field>
444	</mapping>
445
446	<!-- CategoryElement/CategoryElementDTO Mapping -->
447	<mapping wildcard="true">
448		<class-a>org.sigmah.shared.domain.category.CategoryElement
449		</class-a>
450		<class-b>org.sigmah.shared.dto.category.CategoryElementDTO
451		</class-b>
452
453		<field>
454			<a>parentType</a>
455			<b>parentCategoryDTO</b>
456		</field>
457	</mapping>
458
459
460	<!-- ProjectModelVisibility/ProjectModelVisibilityDTO Mapping -->
461	<mapping wildcard="true">
462		<class-a>org.sigmah.shared.domain.ProjectModelVisibility
463		</class-a>
464		<class-b>org.sigmah.shared.dto.ProjectModelVisibilityDTO
465		</class-b>
466
467		<field>
468			<a>organization.id</a>
469			<b>organizationId</b>
470		</field>
471	</mapping>
472
473	<!-- OrgUnit/OrgUnitDTO Mapping -->
474	<mapping wildcard="true">
475		<class-a>org.sigmah.shared.domain.OrgUnit</class-a>
476		<class-b>org.sigmah.shared.dto.OrgUnitDTOLight</class-b>
477
478		<field>
479			<a>orgUnitModel.title</a>
480			<b>title</b>
481		</field>
482
483		<field>
484			<a>orgUnitModel.canContainProjects</a>
485			<b>canContainProjects</b>
486		</field>
487	</mapping>
488	<mapping wildcard="true">
489		<class-a>org.sigmah.shared.domain.OrgUnitModel</class-a>
490		<class-b>org.sigmah.shared.dto.OrgUnitModelDTO</class-b>
491	</mapping>
492	<!-- Amendments -->
493	<mapping wildcard="true">
494		<class-a>org.sigmah.shared.domain.Amendment</class-a>
495		<class-b>org.sigmah.shared.dto.AmendmentDTO</class-b>
496
497                <field>
498			<a>logFrame</a>
499			<b>logFrameDTO</b>
500		</field>
501	</mapping>
502
503	<!-- ProjectReport/GetProjectReports.ReportReference mapping -->
504	<mapping wildcard="true">
505		<class-a>org.sigmah.shared.domain.report.ProjectReport</class-a>
506		<class-b>org.sigmah.shared.dto.report.ReportReference</class-b>
507
508		<field>
509			<a>currentVersion.editDate</a>
510			<b>lastEditDate</b>
511		</field>
512
513		<field>
514			<a>currentVersion.editorShortName</a>
515			<b>editorName</b>
516		</field>
517
518		<field>
519			<a>currentVersion.phaseName</a>
520			<b>phaseName</b>
521		</field>
522	</mapping>
523	
524	<!-- User/UserDTO Mapping -->
525	<mapping wildcard="true">
526		<class-a>org.sigmah.shared.domain.User</class-a>
527		<class-b>org.sigmah.shared.dto.UserDTO</class-b>
528		
529		<field-exclude>
530			<a>orgUnitWithProfiles</a>
531			<b>orgUnitWithProfiles</b>
532		</field-exclude>
533	</mapping>
534	
535	<mapping wildcard="true">
536		<class-a>org.sigmah.shared.domain.profile.Profile</class-a>
537		<class-b>org.sigmah.shared.dto.profile.ProfileDTOLight</class-b>
538
539	</mapping>
540	<mapping wildcard="true">
541
542		<class-a>org.sigmah.shared.domain.profile.Profile</class-a>
543		<class-b>org.sigmah.shared.dto.profile.ProfileDTO</class-b>
544		<field-exclude>
545			<a>globalPermissions</a>
546			<b>globalPermissions</b>
547		</field-exclude>
548		<field-exclude>
549			<a>privacyGroupPermissions</a>
550			<b>privacyGroups</b>
551		</field-exclude>
552
553	</mapping>
554	
555	<mapping wildcard="true">
556
557		<class-a>org.sigmah.shared.domain.profile.PrivacyGroup</class-a>
558		<class-b>org.sigmah.shared.dto.profile.PrivacyGroupDTO</class-b>
559
560	</mapping>
561	
562    <mapping wildcard="true">
563        <class-a>org.sigmah.shared.domain.Indicator</class-a>
564        <class-b>org.sigmah.shared.dto.IndicatorDataSourceDTO</class-b>
565
566		<field>
567			<a>id</a>
568			<b>indicatorId</b>
569		</field>
570
571		<field>
572			<a>name</a>
573			<b>indicatorName</b>
574		</field>
575        <field>
576            <a>code</a>
577            <b>indicatorCode</b>
578        </field>
579		<field>
580			<a>database.id</a>
581			<b>databaseId</b>
582		</field>
583        <field>
584            <a>database.name</a>
585            <b>databaseName</b>
586        </field>
587    </mapping>
588	
589	
590	<mapping wildcard="true">
591		<class-a>org.sigmah.shared.domain.element.ReportElement</class-a>
592		<class-b>org.sigmah.shared.dto.element.ReportElementDTO</class-b>
593		
594		<field>
595		 <a>model.id</a>
596		 <b>modelId</b>
597		</field>
598	</mapping>
599	
600	<mapping wildcard="true">
601		<class-a>org.sigmah.shared.domain.element.ReportListElement</class-a>
602		<class-b>org.sigmah.shared.dto.element.ReportListElementDTO</class-b>
603		
604		<field>
605		 <a>model.id</a>
606		 <b>modelId</b>
607		</field>
608	</mapping>
609</mappings>