Project

General

Profile

Revision 19628913

ID1962891319edeb12380aa69994467f674a96ce96
Parent 49405267
Child 20ffe9b7

Added by Andreas Müller over 1 year ago

fix #7957 add types to DescriptionBase

View differences:

cdmlib-ext/src/test/resources/eu/etaxonomy/cdm/ext/geo/EditGeoServiceTest.getDistributionServiceRequestParameterString.xml
1 1
<?xml version='1.0' encoding='UTF-8'?>
2 2
<dataset>
3
  <TAXONBASE DTYPE="Taxon" ID="10" CREATED="2015-12-18 09:29:42.0" UUID="7598f5d4-1cf2-4269-ae99-2adb79ae167c" UPDATED="[null]" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="true" TITLECACHE="Dummy taxon" APPENDEDPHRASE="[null]" DOUBTFUL="false" PUBLISH="true" USENAMECACHE="false" TAXONSTATUSUNKNOWN="false" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" NAME_ID="[null]" SEC_ID="[null]"/>
4
  <DESCRIPTIONBASE DTYPE="TaxonDescription" ID="10" CREATED="2015-12-18 09:29:42.0" UUID="9c362630-08ef-4e2f-95d8-57b1cebd1197" UPDATED="[null]" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="false" TITLECACHE="Taxon description for Dummy taxon" IMAGEGALLERY="false" ISDEFAULT="false" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" SPECIMEN_ID="[null]" TAXON_ID="10" TAXONNAME_ID="[null]"/>
5
  <DESCRIPTIONELEMENTBASE DTYPE="Distribution" ID="10" CREATED="2015-12-18 09:29:42.0" UUID="43b69cdb-ef08-41b2-9f25-32dce86e260d" UPDATED="[null]" NAME="[null]" TIMEPERIOD_START="[null]" TIMEPERIOD_END="[null]" TIMEPERIOD_FREETEXT="[null]" ORDERRELEVANT="[null]" UNKNOWNDATA="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" FEATURE_ID="986" INDESCRIPTION_ID="10" AREA_ID="572" LANGUAGE_ID="[null]" STATUS_ID="[null]" ASSOCIATEDSPECIMENOROBSERVATION_ID="[null]" UNIT_ID="[null]" TAXON2_ID="[null]" FORMAT_ID="[null]"/>
6
  <DESCRIPTIONELEMENTBASE DTYPE="Distribution" ID="11" CREATED="2015-12-18 09:29:42.0" UUID="285562d2-0fd3-4e6e-a83c-c65bb2eb9085" UPDATED="[null]" NAME="[null]" TIMEPERIOD_START="[null]" TIMEPERIOD_END="[null]" TIMEPERIOD_FREETEXT="[null]" ORDERRELEVANT="[null]" UNKNOWNDATA="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" FEATURE_ID="986" INDESCRIPTION_ID="10" AREA_ID="537" LANGUAGE_ID="[null]" STATUS_ID="[null]" ASSOCIATEDSPECIMENOROBSERVATION_ID="[null]" UNIT_ID="[null]" TAXON2_ID="[null]" FORMAT_ID="[null]"/>
3
  <TAXONBASE DTYPE="Taxon" ID="10" UUID="7598f5d4-1cf2-4269-ae99-2adb79ae167c" PROTECTEDTITLECACHE="true" TITLECACHE="Dummy taxon" DOUBTFUL="false" PUBLISH="true" USENAMECACHE="false" TAXONSTATUSUNKNOWN="false" />
4
  <DESCRIPTIONBASE DTYPE="TaxonDescription" ID="10" UUID="9c362630-08ef-4e2f-95d8-57b1cebd1197" PROTECTEDTITLECACHE="false" TITLECACHE="Taxon description for Dummy taxon" IMAGEGALLERY="false" ISDEFAULT="false" TAXON_ID="10"/>
5
  <DESCRIPTIONELEMENTBASE DTYPE="Distribution" ID="10" UUID="43b69cdb-ef08-41b2-9f25-32dce86e260d" FEATURE_ID="986" INDESCRIPTION_ID="10" AREA_ID="572" />
6
  <DESCRIPTIONELEMENTBASE DTYPE="Distribution" ID="11" UUID="285562d2-0fd3-4e6e-a83c-c65bb2eb9085" FEATURE_ID="986" INDESCRIPTION_ID="10" AREA_ID="537" />
7 7
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="CdmMetaData" NEXT_VAL="30"/>
8 8
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="DefinedTermBase" NEXT_VAL="2190"/>
9 9
  <HIBERNATE_SEQUENCES SEQUENCE_NAME="DescriptionBase" NEXT_VAL="30"/>
cdmlib-model/src/main/java/eu/etaxonomy/cdm/hibernate/EnumSetUserType.java
15 15
import java.sql.SQLException;
16 16
import java.sql.Types;
17 17
import java.util.EnumSet;
18
import java.util.HashSet;
19 18
import java.util.Properties;
20
import java.util.Set;
21 19

  
22 20
import org.apache.commons.lang3.StringUtils;
23 21
import org.apache.log4j.Logger;
......
85 83
		if(val == null) {
86 84
			return null;
87 85
		} else {
88
		    Set<E> result = new HashSet<>();
86
		    EnumSet<E> result = EnumSet.noneOf(clazz);
89 87
			String[] splits = val.split(SEP);
90 88
			for (String split:splits){
91 89
			    if (StringUtils.isNotEmpty(split)) {
......
96 94
                    result.add(term);
97 95
                }
98 96
			}
99
			EnumSet<E> enumSet = EnumSet.copyOf(result);
100
			return enumSet;
97
			return result;
101 98
		}
102 99
	}
103 100

  
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/description/DescriptionBase.java
9 9

  
10 10
package eu.etaxonomy.cdm.model.description;
11 11

  
12
import java.util.EnumSet;
12 13
import java.util.HashSet;
13 14
import java.util.Set;
14 15

  
......
21 22
import javax.persistence.ManyToOne;
22 23
import javax.persistence.OneToMany;
23 24
import javax.persistence.Transient;
25
import javax.validation.constraints.NotNull;
24 26
import javax.xml.bind.annotation.XmlAccessType;
25 27
import javax.xml.bind.annotation.XmlAccessorType;
28
import javax.xml.bind.annotation.XmlAttribute;
26 29
import javax.xml.bind.annotation.XmlElement;
27 30
import javax.xml.bind.annotation.XmlElementWrapper;
28 31
import javax.xml.bind.annotation.XmlElements;
......
33 36
import org.apache.log4j.Logger;
34 37
import org.hibernate.annotations.Cascade;
35 38
import org.hibernate.annotations.CascadeType;
39
import org.hibernate.annotations.Type;
36 40
import org.hibernate.envers.Audited;
37 41
import org.hibernate.search.annotations.ClassBridge;
38 42
import org.hibernate.search.annotations.ClassBridges;
......
74 78
    "descriptiveDataSets",
75 79
    "descriptionElements",
76 80
    "imageGallery",
77
    "isDefault"
81
    "isDefault",
82
    "types"
78 83
})
79 84
@Entity
80 85
@Audited
......
133 138
    @XmlElement(name = "ImageGallery")
134 139
    private boolean imageGallery;
135 140

  
141
    //TODO make it a DescriptionState
136 142
    @XmlElement(name = "isDefault")
137 143
    private boolean isDefault;
138 144

  
145
    @XmlAttribute(name ="Operations")
146
    @NotNull
147
    @Type(type = "eu.etaxonomy.cdm.hibernate.EnumSetUserType",
148
        parameters = {@org.hibernate.annotations.Parameter(name  = "enumClass", value = "eu.etaxonomy.cdm.model.description.DescriptionState")}
149
    )
150
    private EnumSet<DescriptionState> types = EnumSet.noneOf(DescriptionState.class);
151

  
152
//******************************** GETTER / SETTER ***************************/
139 153

  
140 154
    /**
141 155
     * Returns a {@link SpecimenOrObservationBase specimen or observation} involved in
......
150 164
		return describedSpecimenOrObservation;
151 165
	}
152 166

  
153

  
154 167
	/**
155 168
	 * @see #getDescribedSpecimenOrObservation()
156 169
	 * @param describedSpecimenOrObservation
......
166 179
	}
167 180

  
168 181

  
169
	/**
170
     * Returns the set of {@link Reference references} used as sources for <i>this</i> description as a
171
     * whole. More than one source can be used for a general description without
172
     * assigning for each data element of the description one of those sources.
173
     *
174
     * @see    #addDescriptionSource(Reference)
175
     * @see    #removeDescriptionSource(Reference)
176
     */
177
    @Deprecated //will probably be removed in future versions due to #2240
178
    public Set<Reference> getDescriptionSources() {
179
        return this.descriptionSources;
180
    }
181

  
182
    /**
183
     * Adds an existing {@link Reference reference} to the set of
184
     * {@link #getDescriptionSources() references} used as sources for <i>this</i>
185
     * description.
186
     *
187
     * @param descriptionSource	the reference source to be added to <i>this</i> description
188
     * @see    	   				#getDescriptionSources()
189
     */
190
    @Deprecated //will probably be removed in future versions due to #2240
191
    public void addDescriptionSource(Reference descriptionSource) {
192
        this.descriptionSources.add(descriptionSource);
193
    }
194 182

  
195
    /**
196
     * Removes one element from the set of {@link #getDescriptionSources() references} used as
197
     * sources for <i>this</i> description.
198
     *
199
     * @param  descriptionSource	the reference source which should be deleted
200
     * @see     		  			#getDescriptionSources()
201
     * @see     		  			#addDescriptionSource(Reference)
202
     */
203
    @Deprecated //will probably be removed in future versions due to #2240
204
    public void removeDescriptionSource(Reference descriptionSource) {
205
        this.descriptionSources.remove(descriptionSource);
206
    }
207 183

  
208 184
    /**
209 185
     * Returns the set of {@link DescriptionElementBase elementary description data} which constitute
......
274 250
        return this.descriptionElements.size();
275 251
    }
276 252

  
277
    /**
278
     * @return the imageGallery
279
     */
280 253
    public boolean isImageGallery() {
281 254
        return imageGallery;
282 255
    }
283

  
284
    /**
285
     * @param imageGallery the imageGallery to set
286
     */
287 256
    public void setImageGallery(boolean imageGallery) {
288 257
        this.imageGallery = imageGallery;
289 258
    }
......
291 260
    public boolean isDefault() {
292 261
        return isDefault;
293 262
    }
294

  
295 263
    public void setDefault(boolean isDefault) {
296 264
        this.isDefault = isDefault;
297 265
    }
298 266

  
267
    public EnumSet<DescriptionState> getTypes() {
268
        return types;
269
    }
270
    public void setTypes(EnumSet<DescriptionState> types) {
271
        this.types = types;
272
    }
273

  
299 274

  
300 275
    public Set<DescriptiveDataSet> getDescriptiveDataSets() {
301 276
        return descriptiveDataSets;
302 277
    }
303

  
304 278
    public boolean addDescriptiveDataSet(DescriptiveDataSet descriptiveDataSet){
305 279
        boolean result = this.descriptiveDataSets.add(descriptiveDataSet);
306 280
        if (! descriptiveDataSet.getDescriptions().contains(this)){
......
308 282
        }
309 283
        return result;
310 284
    }
311

  
312 285
    public boolean removeDescriptiveDataSet(DescriptiveDataSet descriptiveDataSet){
313 286
        boolean result = this.descriptiveDataSets.remove(descriptiveDataSet);
314 287
        if (descriptiveDataSet.getDescriptions().contains(this)){
......
316 289
        }
317 290
        return result;
318 291
    }
319

  
320 292
    protected void setDescriptiveDataSet(Set<DescriptiveDataSet> descriptiveDataSets) {
321 293
        this.descriptiveDataSets = descriptiveDataSets;
322 294
    }
323 295

  
296
    /**
297
     * Returns the set of {@link Reference references} used as sources for <i>this</i> description as a
298
     * whole. More than one source can be used for a general description without
299
     * assigning for each data element of the description one of those sources.
300
     *
301
     * @see    #addDescriptionSource(Reference)
302
     * @see    #removeDescriptionSource(Reference)
303
     */
304
    @Deprecated //will probably be removed in future versions due to #2240
305
    public Set<Reference> getDescriptionSources() {
306
        return this.descriptionSources;
307
    }
308

  
309
    /**
310
     * Adds an existing {@link Reference reference} to the set of
311
     * {@link #getDescriptionSources() references} used as sources for <i>this</i>
312
     * description.
313
     *
314
     * @param descriptionSource the reference source to be added to <i>this</i> description
315
     * @see                     #getDescriptionSources()
316
     */
317
    @Deprecated //will probably be removed in future versions due to #2240
318
    public void addDescriptionSource(Reference descriptionSource) {
319
        this.descriptionSources.add(descriptionSource);
320
    }
321

  
322
    /**
323
     * Removes one element from the set of {@link #getDescriptionSources() references} used as
324
     * sources for <i>this</i> description.
325
     *
326
     * @param  descriptionSource    the reference source which should be deleted
327
     * @see                         #getDescriptionSources()
328
     * @see                         #addDescriptionSource(Reference)
329
     */
330
    @Deprecated //will probably be removed in future versions due to #2240
331
    public void removeDescriptionSource(Reference descriptionSource) {
332
        this.descriptionSources.remove(descriptionSource);
333
    }
324 334

  
335
// *********************** METHODS ******************************/
325 336

  
326 337
    @Transient
338
    //TODO this is not correct
327 339
    public boolean hasStructuredData(){
328 340
        for (DescriptionElementBase element : this.getElements()){
329 341
            if (element.isInstanceOf(QuantitativeData.class) ||
......
334 346
        return false;
335 347
    }
336 348

  
349
    /**
350
     * if this is of type {@link DescriptionState#COMPUTED} computed.<BR><BR>
351
     * Note: Computed is a base type. It has children like {@link DescriptionState#AGGREGATED}.
352
     * Also for them this method returns <code>true</code>.
353
     */
354
    public boolean isComputed() {
355
        return DescriptionState.isComputed(types);
356
    }
357
    public boolean isAggregated() {
358
        return DescriptionState.includesType(types, DescriptionState.AGGREGATED);
359
    }
360
    public boolean isCloneForSource() {
361
        return DescriptionState.includesType(types, DescriptionState.CLONE_FOR_SOURCE);
362
    }
363
    public static boolean isDefaultForAggregation(EnumSet<DescriptionState> set) {
364
        return DescriptionState.includesType(set, DescriptionState.DEFAULT_VALUES_FOR_AGGREGATION);
365
    }
366
    public static boolean isSecondaryData(EnumSet<DescriptionState> set) {
367
        return DescriptionState.includesType(set, DescriptionState.SECONDARY_DATA);
368
    }
369

  
337 370

  
338 371
//*********************** CLONE ********************************************************/
339 372

  
......
359 392
            result = (DescriptionBase<?>)super.clone();
360 393

  
361 394
            //working set
362
            result.descriptiveDataSets = new HashSet<DescriptiveDataSet>();
395
            result.descriptiveDataSets = new HashSet<>();
363 396
            for (DescriptiveDataSet descriptiveDataSet : getDescriptiveDataSets()){
364 397
                descriptiveDataSet.addDescription(result);
365 398
            }
366 399

  
367 400
            //descriptions
368
            result.descriptionSources = new HashSet<Reference>();
401
            result.descriptionSources = new HashSet<>();
369 402
            for (Reference reference : getDescriptionSources()){
370 403
                result.descriptionSources.add(reference);
371 404
            }
372 405

  
373 406
            //elements
374
            result.descriptionElements = new HashSet<DescriptionElementBase>();
407
            result.descriptionElements = new HashSet<>();
375 408
            for (DescriptionElementBase element : getElements()){
376 409
                DescriptionElementBase newElement = (DescriptionElementBase)element.clone();
377 410
                result.addElement(newElement);
378 411
            }
379 412

  
413
            result.types = this.types.clone();
414

  
380 415
            //no changes to: imageGallery
381 416
            return result;
382 417
        } catch (CloneNotSupportedException e) {
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/description/DescriptionState.java
1
/**
2
* Copyright (C) 2019 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.model.description;
10

  
11
import java.util.EnumSet;
12
import java.util.Set;
13
import java.util.UUID;
14

  
15
import javax.xml.bind.annotation.XmlEnumValue;
16

  
17
import org.apache.log4j.Logger;
18

  
19
import eu.etaxonomy.cdm.model.common.Language;
20
import eu.etaxonomy.cdm.model.term.EnumeratedTermVoc;
21
import eu.etaxonomy.cdm.model.term.IEnumTerm;
22

  
23
/**
24
 * @author a.mueller
25
 * @since 14.08.2019
26
 *
27
 */
28
public enum DescriptionState implements IEnumTerm<DescriptionState>{
29

  
30
    @XmlEnumValue("COM")
31
    COMPUTED(UUID.fromString("7048c64e-9e61-41ed-b561-5765bc8e4ba2"), "Computed", "COM", null),
32

  
33
    @XmlEnumValue("AGG")
34
    AGGREGATED(UUID.fromString("d1c02cbf-e27c-49ee-919a-7393d953ef36"), "Aggregated", "AGG", COMPUTED),
35

  
36
    @XmlEnumValue("CLO")
37
    CLONE_FOR_SOURCE(UUID.fromString("2d58416f-506b-40c5-bdb6-60b6735c92d3"), "Clone", "CLO", null),
38

  
39
    @XmlEnumValue("SEC")
40
    SECONDARY_DATA(UUID.fromString("382e6b00-9725-4877-bd50-18ee263fe90e"), "Secondary Data", "SEC", null),
41

  
42
    /**
43
     * If Descriptions are aggregated, these values can be taken as default if explicit values do not exist.
44
     */
45
    @XmlEnumValue("DVA")
46
    DEFAULT_VALUES_FOR_AGGREGATION(UUID.fromString("e4a51ab3-7040-4f60-9d08-51782c2255a1"), "Default Values for Aggregation", "DVA", null),
47

  
48
    ;
49

  
50
    @SuppressWarnings("unused")
51
    private static final Logger logger = Logger.getLogger(DescriptionState.class);
52

  
53

  
54
    private DescriptionState(UUID uuid, String defaultString, String key, DescriptionState parent){
55
        delegateVocTerm = EnumeratedTermVoc.addTerm(getClass(), this, uuid, defaultString, key, parent);
56
    }
57

  
58
// *************************** DELEGATE **************************************/
59

  
60
    private static EnumeratedTermVoc<DescriptionState> delegateVoc;
61
    private IEnumTerm<DescriptionState> delegateVocTerm;
62

  
63
    static {
64
        delegateVoc = EnumeratedTermVoc.getVoc(DescriptionState.class);
65
    }
66

  
67
    @Override
68
    public String getKey(){return delegateVocTerm.getKey();}
69

  
70
    @Override
71
    public String getMessage(){return delegateVocTerm.getMessage();}
72

  
73
    @Override
74
    public String getMessage(Language language){return delegateVocTerm.getMessage(language);}
75

  
76
    @Override
77
    public UUID getUuid() {return delegateVocTerm.getUuid();}
78

  
79
    @Override
80
    public DescriptionState getKindOf() {return delegateVocTerm.getKindOf();}
81

  
82
    @Override
83
    public Set<DescriptionState> getGeneralizationOf() {return delegateVocTerm.getGeneralizationOf();}
84

  
85
    @Override
86
    public boolean isKindOf(DescriptionState ancestor) {return delegateVocTerm.isKindOf(ancestor);   }
87

  
88
    @Override
89
    public Set<DescriptionState> getGeneralizationOf(boolean recursive) {return delegateVocTerm.getGeneralizationOf(recursive);}
90

  
91
    public static DescriptionState getByKey(String key){return delegateVoc.getByKey(key);}
92
    public static DescriptionState getByUuid(UUID uuid) {return delegateVoc.getByUuid(uuid);}
93

  
94

  
95
    /**
96
     * Returns true if the given set contains the type {@link #COMPUTED} computed or one of
97
     * it's sub-types.<BR><BR>
98
     * Note: Computed is a base type. It has children like {@link #AGGREGATED}.
99
     * Also for them this method returns <code>true</code>.
100
     */
101
    public static boolean isComputed(EnumSet<DescriptionState> set) {
102
        return includesType(set, COMPUTED);
103
    }
104

  
105
    public static boolean isAggregated(EnumSet<DescriptionState> set) {
106
        return includesType(set, AGGREGATED);
107
    }
108

  
109
    public static boolean isCloneForSource(EnumSet<DescriptionState> set) {
110
        return includesType(set, DescriptionState.CLONE_FOR_SOURCE);
111
    }
112

  
113
    public static boolean isSecondaryData(EnumSet<DescriptionState> set) {
114
        return includesType(set, DescriptionState.SECONDARY_DATA);
115
    }
116

  
117
    public static boolean isDefaultForAggregation(EnumSet<DescriptionState> set) {
118
        return includesType(set, DescriptionState.DEFAULT_VALUES_FOR_AGGREGATION);
119
    }
120

  
121
    /**
122
     * @param set
123
     * @return
124
     */
125
    protected static boolean includesType(EnumSet<DescriptionState> set, DescriptionState state) {
126
        EnumSet<DescriptionState> all = EnumSet.copyOf(state.getGeneralizationOf(true));
127
        all.add(state);
128
        for (DescriptionState st : all){
129
            if (set.contains(st)){
130
                return true;
131
            }
132
        }
133
        return false;
134
    }
135

  
136

  
137

  
138
}
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/database/update/v55_58/SchemaUpdater_581_582.java
14 14

  
15 15
import org.apache.log4j.Logger;
16 16

  
17
import eu.etaxonomy.cdm.database.update.ColumnAdder;
17 18
import eu.etaxonomy.cdm.database.update.ColumnNameChanger;
18 19
import eu.etaxonomy.cdm.database.update.ISchemaUpdater;
19 20
import eu.etaxonomy.cdm.database.update.ISchemaUpdaterStep;
......
99 100
        newColumnName = "onlyApplicableIf_old_id";
100 101
        ColumnNameChanger.NewIntegerInstance(stepList, stepName, tableName, oldColumnName, newColumnName, INCLUDE_AUDIT);
101 102

  
102
		//DescriptionBase status
103

  
104

  
105
		//GrantedAuthorities unique
106

  
103
        //#7957 Add type(s) to DescriptionBase
104
        stepName = "Add types to DescriptionBase";
105
        tableName = "DescriptionBase";
106
        newColumnName ="types";
107
        ColumnAdder.NewStringInstance(stepList, stepName, tableName, newColumnName, 255, "#", INCLUDE_AUDIT);
107 108

  
108 109
        return stepList;
109 110
    }
cdmlib-persistence/src/test/resources/eu/etaxonomy/cdm/persistence/dao/hibernate/common/CdmGenericDaoImplTest.xml
18 18
  <ANNOTATION_AUD ID="1001" REV="1001" REVTYPE="0" CREATED="2009-06-25 14:42:27.0" UUID="8cfc78b1-584d-43a0-8f46-820fa656033b" TEXT="A1" LANGUAGE_ID="115"/>
19 19
  <AUDITEVENT REVISIONNUMBER="1000" DATE="2009-06-25 14:42:23.544" TIMESTAMP="1245933743544" UUID="c9c24dd0-6e4d-434b-a310-3e2c6e1ea7c2"/>
20 20
  <AUDITEVENT REVISIONNUMBER="1001" DATE="2009-06-25 14:42:27.778" TIMESTAMP="1245933747778" UUID="1e5f0107-9fd8-4b37-9cea-d2c876098619"/>
21
  <DESCRIPTIONBASE DTYPE="SpecimenDescription" ID="1001" CREATED="2009-06-25 18:26:26.0" UUID="40cb1905-f9d8-4647-87ad-40b37a17e85b" PROTECTEDTITLECACHE="true" TITLECACHE="desc2" IMAGEGALLERY="false" ISDEFAULT="false" SPECIMEN_ID="1001"/>
22
  <DESCRIPTIONBASE DTYPE="SpecimenDescription" ID="1002" CREATED="2009-06-25 18:26:26.0" UUID="3d7d643c-5944-47d6-8938-e884f6d79a70" PROTECTEDTITLECACHE="true" TITLECACHE="desc1" IMAGEGALLERY="false" ISDEFAULT="false" SPECIMEN_ID="1001"/>
21
  <DESCRIPTIONBASE DTYPE="SpecimenDescription" ID="1001" UUID="40cb1905-f9d8-4647-87ad-40b37a17e85b" PROTECTEDTITLECACHE="true" TITLECACHE="desc2" IMAGEGALLERY="false" ISDEFAULT="false" TYPES="#" SPECIMEN_ID="1001"/>
22
  <DESCRIPTIONBASE DTYPE="SpecimenDescription" ID="1002" UUID="3d7d643c-5944-47d6-8938-e884f6d79a70" PROTECTEDTITLECACHE="true" TITLECACHE="desc1" IMAGEGALLERY="false" ISDEFAULT="false" TYPES="#" SPECIMEN_ID="1001"/>
23 23
  <DESCRIPTIONBASE_AUD DTYPE="SpecimenDescription" ID="1001" REV="1001" REVTYPE="0" CREATED="2009-06-25 18:26:26.0" UUID="40cb1905-f9d8-4647-87ad-40b37a17e85b" PROTECTEDTITLECACHE="true" TITLECACHE="desc2" IMAGEGALLERY="false" ISDEFAULT="false" SPECIMEN_ID="1001"/>
24 24
  <DESCRIPTIONBASE_AUD DTYPE="SpecimenDescription" ID="1002" REV="1001" REVTYPE="0" CREATED="2009-06-25 18:26:26.0" UUID="3d7d643c-5944-47d6-8938-e884f6d79a70" PROTECTEDTITLECACHE="true" TITLECACHE="desc1" IMAGEGALLERY="false" ISDEFAULT="false" SPECIMEN_ID="1001"/>
25 25
  <SPECIMENOROBSERVATIONBASE DTYPE="DerivedUnit" RECORDBASIS="PS" ID="1001" CREATED="2009-06-25 18:26:26.0" UUID="41539e9c-3764-4f14-9712-2d07d00c8e4c" PROTECTEDTITLECACHE="false" TITLECACHE="" PUBLISH="true" PROTECTEDIDENTITYCACHE="true" IDENTITYCACHE="ID1"/>
cdmlib-services/src/test/resources/eu/etaxonomy/cdm/api/service/OccurrenceServiceTest.testIsDeletableWithSpecimenDescription.xml
1 1
<?xml version='1.0' encoding='UTF-8'?>
2 2
<dataset>
3
  <SPECIMENOROBSERVATIONBASE DTYPE="DerivedUnit" ID="5000" CREATED="2014-12-16 08:56:31.0" UUID="68095c8e-025d-49f0-8bb2-ed36378b75c3" UPDATED="[null]" RECORDBASIS="FS" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="false" TITLECACHE="class eu.etaxonomy.cdm.model.occurrence.DerivedUnit: 68095c8e-025d-49f0-8bb2-ed36378b75c3" PUBLISH="true" INDIVIDUALCOUNT="[null]" ACCESSIONNUMBER="[null]" BARCODE="[null]" CATALOGNUMBER="[null]" COLLECTORSNUMBER="[null]" EXSICCATUM="[null]" ORIGINALLABELINFO="[null]" FIELDNOTES="[null]" FIELDNUMBER="[null]" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" LIFESTAGE_ID="[null]" SEX_ID="[null]" KINDOFUNIT_ID="[null]" COLLECTION_ID="[null]" DERIVEDFROM_ID="[null]" STOREDUNDER_ID="[null]" PRESERVATION_ID="[null]" GATHERINGEVENT_ID="[null]" PRIMARYCOLLECTOR_ID="[null]" MEDIASPECIMEN_ID="[null]" DNAQUALITY_ID="[null]" PROTECTEDIDENTITYCACHE="true" IDENTITYCACHE="ID1"/>
4
  <DESCRIPTIONBASE DTYPE="SpecimenDescription" ID="5000" CREATED="2014-12-16 08:56:31.0" UUID="4094f947-ce84-47b1-bad5-e57e33239d3c" UPDATED="2014-12-16 08:56:31.251" LSID_AUTHORITY="[null]" LSID_LSID="[null]" LSID_NAMESPACE="[null]" LSID_OBJECT="[null]" LSID_REVISION="[null]" PROTECTEDTITLECACHE="false" TITLECACHE="Specimen description for class eu.etaxonomy.cdm.model.occurrence.DerivedUnit: 68095c8e-025d-49f0-8bb2-ed36378b75c3" IMAGEGALLERY="false" ISDEFAULT="false" CREATEDBY_ID="[null]" UPDATEDBY_ID="[null]" SPECIMEN_ID="5000" TAXON_ID="[null]" TAXONNAME_ID="[null]"/>
3
  <SPECIMENOROBSERVATIONBASE DTYPE="DerivedUnit" ID="5000" UUID="68095c8e-025d-49f0-8bb2-ed36378b75c3" RECORDBASIS="FS" PROTECTEDTITLECACHE="false" TITLECACHE="class eu.etaxonomy.cdm.model.occurrence.DerivedUnit: 68095c8e-025d-49f0-8bb2-ed36378b75c3" PUBLISH="true" PROTECTEDIDENTITYCACHE="true" IDENTITYCACHE="ID1"/>
4
  <DESCRIPTIONBASE DTYPE="SpecimenDescription" ID="5000" UUID="4094f947-ce84-47b1-bad5-e57e33239d3c" PROTECTEDTITLECACHE="false" TITLECACHE="Specimen description for class eu.etaxonomy.cdm.model.occurrence.DerivedUnit: 68095c8e-025d-49f0-8bb2-ed36378b75c3" IMAGEGALLERY="false" ISDEFAULT="false" TYPES="#" SPECIMEN_ID="5000" />
5 5
</dataset>
cdmlib-services/src/test/resources/eu/etaxonomy/cdm/api/service/SecurityTest.xml
150 150
  <CLASSIFICATION ID="1" CREATED="2009-06-18 13:47:59.0" UUID="aeee7448-5298-4991-b724-8d5b75a0a7a9" PROTECTEDTITLECACHE="false" TITLECACHE="TestBaum" NAME_ID="1" ROOTNODE_ID="1"/>
151 151
  <CLASSIFICATION_AUD ID="1" REV="1025" REVTYPE="0" CREATED="2009-06-18 13:47:59.0" UUID="aeee7448-5298-4991-b724-8d5b75a0a7a9" PROTECTEDTITLECACHE="false" TITLECACHE="TestBaum" NAME_ID="1" ROOTNODE_ID="1"/>
152 152

  
153
  <DESCRIPTIONBASE DTYPE="TaxonDescription" ID="2" CREATED="2009-06-25 18:26:26.0" UUID="5c75dea8-0c60-41ae-a1a0-ac91669a9b16" PROTECTEDTITLECACHE="true" TITLECACHE="Description for Acherontia lachesis" IMAGEGALLERY="false" ISDEFAULT="false" TAXON_ID="38"/>
154
  <DESCRIPTIONBASE DTYPE="TaxonDescription" ID="3" CREATED="2009-06-25 18:26:26.0" UUID="eb17b80a-9be6-4642-a6a8-b19a318925e6" PROTECTEDTITLECACHE="true" TITLECACHE="Description for Acherontia styx Westwood" IMAGEGALLERY="false" ISDEFAULT="false" TAXON_ID="37"/>
153
  <DESCRIPTIONBASE DTYPE="TaxonDescription" ID="2" UUID="5c75dea8-0c60-41ae-a1a0-ac91669a9b16" PROTECTEDTITLECACHE="true" TYPES="#" TITLECACHE="Description for Acherontia lachesis" IMAGEGALLERY="false" ISDEFAULT="false" TAXON_ID="38"/>
154
  <DESCRIPTIONBASE DTYPE="TaxonDescription" ID="3" UUID="eb17b80a-9be6-4642-a6a8-b19a318925e6" PROTECTEDTITLECACHE="true" TYPES="#" TITLECACHE="Description for Acherontia styx Westwood" IMAGEGALLERY="false" ISDEFAULT="false" TAXON_ID="37"/>
155 155
  <DESCRIPTIONELEMENTBASE DTYPE="TextData" ID="1" INDESCRIPTION_ID="3" CREATED="2008-12-10 09:56:07.0" UUID="31a0160a-51b2-4565-85cf-2be58cb561d6" UPDATED="2008-12-10 09:56:07.253" FEATURE_ID="[null]"/>
156 156
  <DESCRIPTIONELEMENTBASE_LANGUAGESTRING TEXTDATA_ID="1" MULTILANGUAGETEXT_ID="2" MULTILANGUAGETEXT_MAPKEY_ID="406"/>
157 157
  <LANGUAGESTRING ID="2" CREATED="2008-12-10 09:56:07.0" UUID="2a5ceebb-4830-4524-b330-78461bf8cb6b" UPDATED="2008-12-10 09:56:07.253" LANGUAGE_ID="352" TEXT="Lorem ipsum dolor sit amet, consectetur adipiscing elit."/>
cdmlib-services/src/test/resources/eu/etaxonomy/cdm/api/service/TaxonNodeServiceImplTest.xml
25 25
  	<HOMOTYPICALGROUP ID="3" CREATED="2011-10-12 19:57:31.0" UUID="3ac4e376-31cd-47fd-9dd6-eaff415ff0e7"/>
26 26
  	<HOMOTYPICALGROUP ID="4" CREATED="2011-10-12 19:57:31.0" UUID="76258671-07cf-40f3-a9eb-af286b5945ec"/>
27 27

  
28
    <DESCRIPTIONBASE ID="1" UUID="56cf0c8c-18e3-4bea-9525-b9804cf57c5d" DTYPE="TaxonDescription" TAXON_ID="1" PROTECTEDTITLECACHE="false" IMAGEGALLERY="false" ISDEFAULT="false" />
29
    <DESCRIPTIONBASE ID="2" UUID="36af5c7c-18e3-4bec-6535-a9804cf57c6e" DTYPE="TaxonDescription" TAXON_ID="1" PROTECTEDTITLECACHE="false" IMAGEGALLERY="false" ISDEFAULT="false" />
28
    <DESCRIPTIONBASE ID="1" UUID="56cf0c8c-18e3-4bea-9525-b9804cf57c5d" DTYPE="TaxonDescription" TAXON_ID="1" PROTECTEDTITLECACHE="false" IMAGEGALLERY="false" ISDEFAULT="false" TYPES="#" />
29
    <DESCRIPTIONBASE ID="2" UUID="36af5c7c-18e3-4bec-6535-a9804cf57c6e" DTYPE="TaxonDescription" TAXON_ID="1" PROTECTEDTITLECACHE="false" IMAGEGALLERY="false" ISDEFAULT="false" TYPES="#" />
30 30
    <DESCRIPTIONELEMENTBASE DTYPE="TextData" ID="1" INDESCRIPTION_ID="1" ORDERRELEVANT="false"/>
31 31
    <DESCRIPTIONELEMENTBASE DTYPE="TextData" ID="2" INDESCRIPTION_ID="2" ORDERRELEVANT="false"/>
32 32
    <DESCRIPTIONELEMENTBASE_LANGUAGESTRING TEXTDATA_ID="1" MULTILANGUAGETEXT_ID="1" MULTILANGUAGETEXT_MAPKEY_ID="406" />
cdmlib-services/src/test/resources/eu/etaxonomy/cdm/api/service/TaxonServiceSearchTest.xml
53 53
<!--<DESCRIPTIONELEMENTBASE DTYPE="CommonTaxonName" ID="5010" UUID="eb853c83-3e79-4742-8804-11b223cdaa5e" NAME="Balsam"       FEATURE_ID="933" INDESCRIPTION_ID="5000" AREA_ID="[null]" LANGUAGE_ID="349" STATUS_ID="[null]" UNIT_ID="[null]" TAXON2_ID="[null]" FORMAT_ID="[null]"/>-->
54 54
  <DESCRIPTIONELEMENTBASE_AUD/>
55 55
  
56
  <DESCRIPTIONBASE DTYPE="TaxonDescription" ID="5000" TAXON_ID="5003" UUID="900108d8-e6ce-495e-b32e-7aad3099135e" PROTECTEDTITLECACHE="false" TITLECACHE="Taxon description for Abies balsamea" IMAGEGALLERY="false" ISDEFAULT="false" />
57
  <DESCRIPTIONBASE DTYPE="TaxonDescription" ID="5001" TAXON_ID="5001" UUID="ec8bba03-d993-4c85-8472-18b14942464b" PROTECTEDTITLECACHE="false" TITLECACHE="Taxon description for Abies alba"     IMAGEGALLERY="false" ISDEFAULT="false" />
56
  <DESCRIPTIONBASE DTYPE="TaxonDescription" ID="5000" TAXON_ID="5003" UUID="900108d8-e6ce-495e-b32e-7aad3099135e" PROTECTEDTITLECACHE="false" TITLECACHE="Taxon description for Abies balsamea" IMAGEGALLERY="false" ISDEFAULT="false" TYPES="#" />
57
  <DESCRIPTIONBASE DTYPE="TaxonDescription" ID="5001" TAXON_ID="5001" UUID="ec8bba03-d993-4c85-8472-18b14942464b" PROTECTEDTITLECACHE="false" TITLECACHE="Taxon description for Abies alba"     IMAGEGALLERY="false" ISDEFAULT="false" TYPES="#" />
58 58
  <DESCRIPTIONBASE_AUD/>
59 59
  
60 60
  <HOMOTYPICALGROUP ID="5000" UUID="87dce437-0783-4295-b59e-730f1918d8e0" />
cdmlib-test/src/main/resources/dbscripts/001-cdm.h2.sql
1281 1281
    TITLECACHE VARCHAR(255),
1282 1282
    IMAGEGALLERY BOOLEAN NOT NULL,
1283 1283
	ISDEFAULT BOOLEAN NOT NULL,
1284
	TYPES VARCHAR(255) NOT NULL,
1284 1285
    CREATEDBY_ID INTEGER,
1285 1286
    UPDATEDBY_ID INTEGER,
1286 1287
    SPECIMEN_ID INTEGER,
......
1305 1306
    TITLECACHE VARCHAR(255),
1306 1307
    IMAGEGALLERY BOOLEAN,
1307 1308
	ISDEFAULT BOOLEAN,
1309
	TYPES VARCHAR(255) NOT NULL,
1308 1310
    CREATEDBY_ID INTEGER,
1309 1311
    UPDATEDBY_ID INTEGER,
1310 1312
    SPECIMEN_ID INTEGER,
cdmlib-test/src/main/resources/eu/etaxonomy/cdm/database/schema/dataset.dtd
1088 1088
    TITLECACHE CDATA #IMPLIED
1089 1089
    IMAGEGALLERY CDATA #IMPLIED
1090 1090
    ISDEFAULT CDATA #IMPLIED
1091
    TYPES CDATA #IMPLIED
1091 1092
    CREATEDBY_ID CDATA #IMPLIED
1092 1093
    UPDATEDBY_ID CDATA #IMPLIED
1093 1094
    SPECIMEN_ID CDATA #IMPLIED
......
1123 1124
    TITLECACHE CDATA #IMPLIED
1124 1125
    IMAGEGALLERY CDATA #IMPLIED
1125 1126
    ISDEFAULT CDATA #IMPLIED
1127
    TYPES CDATA #IMPLIED
1126 1128
    CREATEDBY_ID CDATA #IMPLIED
1127 1129
    UPDATEDBY_ID CDATA #IMPLIED
1128 1130
    SPECIMEN_ID CDATA #IMPLIED

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)