Major update to the latest CDM definition 2.Nov.2007
[cdmlib.git] / cdmlibrary / src / main / java / eu / etaxonomy / cdm / model / common / DefinedTermBase.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
10 package etaxonomy.cdm.model.common;
11
12
13 import org.apache.log4j.Logger;
14
15 /**
16 * workaround for enumerations, base type according to TDWG.
17 *
18 * For linear ordering use partOf relation and BreadthFirst.
19 * Default iterator order should therefore be BreadthFirst (not DepthFirst)
20 * @author m.doering
21 * @version 1.0
22 * @created 02-Nov-2007 18:14:43
23 */
24 public abstract class DefinedTermBase extends VersionableEntity {
25 static Logger logger = Logger.getLogger(DefinedTermBase.class);
26
27 //URI used as an ID for the term. In the case of TDWG ontology derived terms the URL to the term!
28 @Description("URI used as an ID for the term. In the case of TDWG ontology derived terms the URL to the term!")
29 private String uri;
30 //The RDF ontology source defining the terms to be loaded when a database is created for the first time.
31 //
32 //Software can go and grap these terms incl labels and description. UUID needed? Furhter vocs can be setup through our
33 //own ontology.
34 @Description("The RDF ontology source defining the terms to be loaded when a database is created for the first time.
35
36 Software can go and grap these terms incl labels and description. UUID needed? Furhter vocs can be setup through our own ontology.")
37 private static final int initializationClassUri;
38 private DefinedTermBase partOf;
39 private ArrayList includes;
40 private ArrayList representations;
41 private DefinedTermBase kindOf;
42 private ArrayList generalizationOf;
43 private java.util.ArrayList media;
44
45 public ArrayList getRepresentations(){
46 return representations;
47 }
48
49 /**
50 *
51 * @param newVal
52 */
53 public void setRepresentations(ArrayList newVal){
54 representations = newVal;
55 }
56
57 public DefinedTermBase getKindOf(){
58 return kindOf;
59 }
60
61 /**
62 *
63 * @param newVal
64 */
65 public void setKindOf(DefinedTermBase newVal){
66 kindOf = newVal;
67 }
68
69 public ArrayList getGeneralizationOf(){
70 return generalizationOf;
71 }
72
73 /**
74 *
75 * @param newVal
76 */
77 public void setGeneralizationOf(ArrayList newVal){
78 generalizationOf = newVal;
79 }
80
81 public DefinedTermBase getPartOf(){
82 return partOf;
83 }
84
85 /**
86 *
87 * @param newVal
88 */
89 public void setPartOf(DefinedTermBase newVal){
90 partOf = newVal;
91 }
92
93 public ArrayList getIncludes(){
94 return includes;
95 }
96
97 /**
98 *
99 * @param newVal
100 */
101 public void setIncludes(ArrayList newVal){
102 includes = newVal;
103 }
104
105 public java.util.ArrayList getMedia(){
106 return media;
107 }
108
109 /**
110 *
111 * @param newVal
112 */
113 public void setMedia(java.util.ArrayList newVal){
114 media = newVal;
115 }
116
117 public String getUri(){
118 return uri;
119 }
120
121 /**
122 *
123 * @param newVal
124 */
125 public void setUri(String newVal){
126 uri = newVal;
127 }
128
129 public getInitializationClassUri(){
130 return initializationClassUri;
131 }
132
133 /**
134 *
135 * @param newVal
136 */
137 public void setInitializationClassUri(newVal){
138 initializationClassUri = newVal;
139 }
140
141 /**
142 *
143 * @param uri
144 */
145 @Transient
146 public static defined terms getDefinedTermByUri(String uri){
147 return null;
148 }
149
150 /**
151 * add new terms from a vocabulary to which uri points. By default this is the
152 * initializationClassUri
153 *
154 * @param uri
155 */
156 public void addTermsFromInitializationClass(String uri){
157
158 }
159
160 }