Project

General

Profile

Download (1.75 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2018 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.cdm.vaadin.model.common;
10

    
11
import eu.etaxonomy.cdm.model.agent.Institution;
12
import eu.etaxonomy.cdm.vaadin.model.CdmEntityAdapterDTO;
13

    
14
/**
15
 * @author a.kohlbecker
16
 * @since Jul 25, 2018
17
 *
18
 */
19
public class InstitutionDTO extends CdmEntityAdapterDTO<Institution> {
20

    
21
    private static final long serialVersionUID = 8457280951445449327L;
22

    
23
    /**
24
     * @param entity
25
     */
26
    public InstitutionDTO(Institution entity) {
27
        super(entity);
28
    }
29

    
30
    public void setCode(String code){
31
        entity.setCode(code);
32
    }
33

    
34
    public String getCode(){
35
        return entity.getCode();
36
    }
37

    
38
    /**
39
     * Returns the full name, as distinct from a code, an acronym or initials,
40
     * by which this institution is generally known.
41
     */
42
    public String getName(){
43
        return entity.getName();
44
    }
45
    /**
46
     * @see    #getName()
47
     */
48
    public void setName(String name){
49
        entity.setName(name);
50
    }
51

    
52
    /**
53
     * Returns the parent institution of this institution.
54
     * This is for instance the case when this institution is a herbarium
55
     * belonging to a parent institution such as a museum.
56
     */
57
    public Institution getIsPartOf(){
58
        return entity.getIsPartOf();
59
    }
60

    
61
    /**
62
     * Assigns a parent institution to which this institution belongs.
63
     *
64
     * @param  isPartOf  the parent institution
65
     * @see    #getIsPartOf()
66
     */
67
    public void setIsPartOf(Institution parentInstitution){
68
        entity.setIsPartOf(parentInstitution);
69
    }
70

    
71

    
72
}
(2-2/2)