2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
9 package eu
.etaxonomy
.cdm
.remote
.dto
;
11 import java
.util
.ArrayList
;
12 import java
.util
.HashSet
;
13 import java
.util
.List
;
16 public class DescriptionTO
extends BaseTO
{
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;
24 // -- TaxonDescription specific --
25 private TaxonSTO taxon
;
27 private Set
<LocalisedTermSTO
> scopes
= new HashSet
<LocalisedTermSTO
>();
29 // -- SpecimenDescription specific --
30 private Set
<SpecimenSTO
> specimensOrObersvations
= new HashSet
<SpecimenSTO
>();
32 // ******************** METHODS *********************************/
36 public boolean isVisible() {
40 * @param visible the visible to set
42 public void setVisible(boolean visible
) {
43 this.visible
= visible
;
46 public TaxonSTO
getTaxon() {
49 public void setTaxon(TaxonSTO taxon
) {
53 public Set
<LocalisedTermSTO
> getScopes() {
56 public void setScopes(Set
<LocalisedTermSTO
> scopes
) {
59 public void addScope(LocalisedTermSTO scope
){
60 this.scopes
.add(scope
);
63 public Set
<ReferenceSTO
> getSources() {
66 public void setSources(Set
<ReferenceSTO
> sources
) {
67 this.sources
= sources
;
69 public void addSource(ReferenceSTO source
){
70 this.sources
.add(source
);
73 //************** FEATURE *************************************/
75 public List
<FeatureTO
> getFeatures() {
78 public void setElements(List
<FeatureTO
> features
) {
79 this.features
= features
;
81 public void addFeature(FeatureTO feature
){
82 this.features
.add(feature
);
85 //**************** SPECIMEN/OBSERVATION *********************/
87 public Set
<SpecimenSTO
> getSpecimensOrObersvations() {
88 return specimensOrObersvations
;
90 public void setSpecimensOrObersvations(Set
<SpecimenSTO
> specimensOrObersvations
) {
91 this.specimensOrObersvations
= specimensOrObersvations
;
93 public void addSpecimensOrObersvation(SpecimenSTO specimenOrObersvation
){
94 this.specimensOrObersvations
.add(specimenOrObersvation
);
97 //************** OLD ********************************************/
99 public Set
<DescriptionElementSTO
> getElements() {
102 public void setElements(Set
<DescriptionElementSTO
> elements
) {
103 this.elements
= elements
;
105 public void addElement(DescriptionElementSTO element
){
106 this.elements
.add(element
);