ref #7674 Create default taxon description when adding specimens
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / service / dto / SpecimenRowWrapperDTO.java
1 // $Id$
2 /**
3 * Copyright (C) 2018 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
9 */
10 package eu.etaxonomy.cdm.api.service.dto;
11
12 import eu.etaxonomy.cdm.model.description.SpecimenDescription;
13 import eu.etaxonomy.cdm.model.location.NamedArea;
14 import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
15 import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
16 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
17
18 /**
19 * @author pplitzner
20 * @since 16.04.2018
21 *
22 */
23 public class SpecimenRowWrapperDTO extends RowWrapperDTO<SpecimenDescription> {
24
25 private static final long serialVersionUID = 5198447592554976471L;
26
27 private TaxonRowWrapperDTO defaultTaxonDescription;
28 private SpecimenOrObservationBase specimen;
29 private FieldUnit fieldUnit;
30 private String identifier;
31 private NamedArea country;
32
33 public SpecimenRowWrapperDTO(SpecimenDescription description, TaxonNode taxonNode, FieldUnit fieldUnit, String identifier,
34 NamedArea country, TaxonRowWrapperDTO defaultTaxonDescription) {
35 super(description, taxonNode);
36 this.fieldUnit = fieldUnit;
37 this.identifier = identifier;
38 this.country = country;
39 this.defaultTaxonDescription = defaultTaxonDescription;
40 this.specimen = description.getDescribedSpecimenOrObservation();
41 }
42
43 public SpecimenOrObservationBase getSpecimen() {
44 return specimen;
45 }
46
47 public FieldUnit getFieldUnit() {
48 return fieldUnit;
49 }
50
51 public String getIdentifier() {
52 return identifier;
53 }
54
55 public NamedArea getCountry() {
56 return country;
57 }
58
59 public TaxonRowWrapperDTO getDefaultTaxonDescription() {
60 return defaultTaxonDescription;
61 }
62 }