Project

General

Profile

Download (2.53 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.taxeditor.view.webimport.termimport.wrapper;
10

    
11
/**
12
 * @author pplitzner
13
 * @since Apr 23, 2018
14
 *
15
 */
16
public class TerminologyWrapper {
17

    
18
    private String name;
19
    private String acronym;
20
    private String description;
21
    private String uri;
22
    public TerminologyWrapper(String name, String acronym, String description, String uri) {
23
        this.name = name;
24
        this.acronym = acronym;
25
        this.description = description;
26
        this.uri = uri;
27
    }
28
    public String getName() {
29
        return name;
30
    }
31
    public String getAcronym() {
32
        return acronym;
33
    }
34
    public String getDescription() {
35
        return description;
36
    }
37
    public String getUri() {
38
        return uri;
39
    }
40

    
41
    @Override
42
    public int hashCode() {
43
        final int prime = 31;
44
        int result = 1;
45
        result = prime * result + ((acronym == null) ? 0 : acronym.hashCode());
46
        result = prime * result + ((description == null) ? 0 : description.hashCode());
47
        result = prime * result + ((name == null) ? 0 : name.hashCode());
48
        result = prime * result + ((uri == null) ? 0 : uri.hashCode());
49
        return result;
50
    }
51

    
52
    @Override
53
    public boolean equals(Object obj) {
54
        if (this == obj) {
55
            return true;
56
        }
57
        if (obj == null) {
58
            return false;
59
        }
60
        if (getClass() != obj.getClass()) {
61
            return false;
62
        }
63
        TerminologyWrapper other = (TerminologyWrapper) obj;
64
        if (acronym == null) {
65
            if (other.acronym != null) {
66
                return false;
67
            }
68
        } else if (!acronym.equals(other.acronym)) {
69
            return false;
70
        }
71
        if (description == null) {
72
            if (other.description != null) {
73
                return false;
74
            }
75
        } else if (!description.equals(other.description)) {
76
            return false;
77
        }
78
        if (name == null) {
79
            if (other.name != null) {
80
                return false;
81
            }
82
        } else if (!name.equals(other.name)) {
83
            return false;
84
        }
85
        if (uri == null) {
86
            if (other.uri != null) {
87
                return false;
88
            }
89
        } else if (!uri.equals(other.uri)) {
90
            return false;
91
        }
92
        return true;
93
    }
94

    
95
}
(4-4/4)