fixed some issues with TypeDesignations and NameRelations
[cdmlib.git] / cdmlib-remote / src / main / java / eu / etaxonomy / cdm / remote / dto / DescriptionTO.java
1 /**
2 * Copyright (C) 2007 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.remote.dto;
10
11 import java.util.ArrayList;
12 import java.util.HashSet;
13 import java.util.List;
14 import java.util.Set;
15
16 public class DescriptionTO extends BaseTO {
17
18 // general bits from DescriptionBase
19 private Set<ReferenceSTO> sources = new HashSet<ReferenceSTO>();
20 private Set<DescriptionElementSTO> elements = new HashSet<DescriptionElementSTO>();
21 private List<FeatureTO> features = new ArrayList<FeatureTO>();
22 private boolean visible = true;
23
24 // -- TaxonDescription specific --
25 private TaxonSTO taxon;
26 // scopes & geoscopes
27 private Set<LocalisedTermSTO> scopes = new HashSet<LocalisedTermSTO>();
28
29 // -- SpecimenDescription specific --
30 private Set<SpecimenSTO> specimensOrObersvations = new HashSet<SpecimenSTO>();
31
32 // ******************** METHODS *********************************/
33 /**
34 * @return the visible
35 */
36 public boolean isVisible() {
37 return visible;
38 }
39 /**
40 * @param visible the visible to set
41 */
42 public void setVisible(boolean visible) {
43 this.visible = visible;
44 }
45
46 public TaxonSTO getTaxon() {
47 return taxon;
48 }
49 public void setTaxon(TaxonSTO taxon) {
50 this.taxon = taxon;
51 }
52
53 public Set<LocalisedTermSTO> getScopes() {
54 return scopes;
55 }
56 public void setScopes(Set<LocalisedTermSTO> scopes) {
57 this.scopes = scopes;
58 }
59 public void addScope(LocalisedTermSTO scope){
60 this.scopes.add(scope);
61 }
62
63 public Set<ReferenceSTO> getSources() {
64 return sources;
65 }
66 public void setSources(Set<ReferenceSTO> sources) {
67 this.sources = sources;
68 }
69 public void addSource(ReferenceSTO source){
70 this.sources.add(source);
71 }
72
73 //************** FEATURE *************************************/
74
75 public List<FeatureTO> getFeatures() {
76 return features;
77 }
78 public void setElements(List<FeatureTO> features) {
79 this.features = features;
80 }
81 public void addFeature(FeatureTO feature){
82 this.features.add(feature);
83 }
84
85 //**************** SPECIMEN/OBSERVATION *********************/
86
87 public Set<SpecimenSTO> getSpecimensOrObersvations() {
88 return specimensOrObersvations;
89 }
90 public void setSpecimensOrObersvations(Set<SpecimenSTO> specimensOrObersvations) {
91 this.specimensOrObersvations = specimensOrObersvations;
92 }
93 public void addSpecimensOrObersvation(SpecimenSTO specimenOrObersvation){
94 this.specimensOrObersvations.add(specimenOrObersvation);
95 }
96
97 //************** OLD ********************************************/
98
99 public Set<DescriptionElementSTO> getElements() {
100 return elements;
101 }
102 public void setElements(Set<DescriptionElementSTO> elements) {
103 this.elements = elements;
104 }
105 public void addElement(DescriptionElementSTO element){
106 this.elements.add(element);
107 }
108
109
110 }