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.
10 package eu
.etaxonomy
.cdm
.model
.view
;
13 import org
.apache
.log4j
.Logger
;
15 import eu
.etaxonomy
.cdm
.model
.common
.CdmBase
;
16 import eu
.etaxonomy
.cdm
.model
.common
.ICdmBase
;
17 import eu
.etaxonomy
.cdm
.model
.common
.IReferencedEntity
;
18 import eu
.etaxonomy
.cdm
.model
.reference
.ReferenceBase
;
22 import javax
.persistence
.*;
25 * use ARCHIVE view/dataset to maintain an archive. All members of that view will
29 * @created 08-Nov-2007 13:07:01
31 @Entity(name
="CDM_VIEW")
32 public class View
extends CdmBase
implements IReferencedEntity
{
33 static Logger logger
= Logger
.getLogger(View
.class);
35 private String description
;
36 private ReferenceBase reference
;
37 private Set
<View
> superViews
= new HashSet();
38 private Set
<CdmBase
> members
= new HashSet();
39 private Set
<CdmBase
> nonMembers
= new HashSet();
41 public String
getName(){
44 public void setName(String name
){
48 public String
getDescription(){
49 return this.description
;
51 public void setDescription(String description
){
52 this.description
= description
;
56 public ReferenceBase
getCitation() {
57 return getReference();
60 public ReferenceBase
getReference() {
64 public void setReference(ReferenceBase reference
) {
65 this.reference
= reference
;
70 public Set
<View
> getSuperViews() {
73 protected void setSuperViews(Set
<View
> superViews
) {
74 this.superViews
= superViews
;
76 public void addSuperView(View superView
) {
77 this.superViews
.add(superView
);
79 public void removeSuperView(View superView
) {
80 this.superViews
.remove(superView
);
85 public Set
<CdmBase
> getMembers() {
88 protected void setMembers(Set
<CdmBase
> members
) {
89 this.members
= members
;
91 public void addMember(CdmBase member
) {
92 this.members
.add(member
);
94 public void removeMember(ICdmBase member
) {
95 this.members
.remove(member
);
100 public Set
<CdmBase
> getNonMembers() {
103 protected void setNonMembers(Set
<CdmBase
> nonMembers
) {
104 this.nonMembers
= nonMembers
;
106 public void addNonMember(CdmBase member
) {
107 this.nonMembers
.add(member
);
109 public void removeNonMember(ICdmBase member
) {
110 this.nonMembers
.remove(member
);