Project

General

Profile

Revision bd07c1ce

IDbd07c1cee34f61d75fa2b8a254006b6bbbfcd722
Parent ace720cf
Child 3733052b

Added by Andreas Müller over 8 years ago

remove descriptive system from description base #2202

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/description/DescriptionBase.java
72 72
@XmlType(name = "DescriptionBase", propOrder = {
73 73
    "describedSpecimenOrObservation",
74 74
    "descriptionSources",
75
    "descriptiveSystem",
76 75
    "workingSets",
77 76
    "descriptionElements",
78 77
    "imageGallery"
......
114 113
    @ManyToMany(fetch = FetchType.LAZY)  //FIXME what is the difference between this and IdentifiableEntity.sources
115 114
    private Set<Reference> descriptionSources = new HashSet<Reference>();
116 115

  
117
    @XmlElementWrapper(name = "DescriptiveSystem")
118
    @XmlElement(name = "Feature")
119
    @XmlIDREF
120
    @XmlSchemaType(name="IDREF")
121
    @ManyToMany(fetch = FetchType.LAZY)  //FIXME
122
    //@Cascade( { CascadeType.SAVE_UPDATE, CascadeType.MERGE })
123
    @JoinTable(name = "DescriptionBase_Feature")
124
    @Deprecated //will probably be removed in future versions due to #2240
125
    //fortunately never worked well due to missing cascade #1846
126
    private Set<Feature> descriptiveSystem = new HashSet<Feature>();
127

  
128 116
    @XmlElementWrapper(name = "WorkingSets")
129 117
    @XmlElement(name = "WorkingSet")
130 118
    @XmlIDREF
......
221 209
    }
222 210

  
223 211
    /**
224
     * Returns the set of {@link Feature feature} used as
225
     * features/characters/descriptors for <i>this</i> description.
226
     *
227
     * @see    #addFeature(Feature)
228
     * @see    #removeFeature(Feature)
229
     */
230
    public Set<Feature> getDescriptiveSystem() {
231
        return this.descriptiveSystem;
232
    }
233

  
234
    /**
235
     * @see    #getDescriptiveSystem()
236
     * @see    #addDescriptiveSystem(Feature)
237
     */
238
    public void setDescriptiveSystem(Set<Feature> descriptiveSystem) {
239
        this.descriptiveSystem = descriptiveSystem;
240
    }
241

  
242
    /**
243
     * Adds an existing {@link Feature feature} to the set of
244
     * {@link #getDescriptiveSystem() descriptiveSystem} used as features for
245
     * <i>this</i> description.
246
     *
247
     * @param feature	the feature to be added to the descriptive system
248
     * @see     #getDescriptiveSystem()
249
     */
250
    public void addFeature(Feature feature) {
251
        this.descriptiveSystem.add(feature);
252
    }
253

  
254
    /**
255
     * Removes one element from the set of {@link #getDescriptiveSystem() features} used as
256
     * features for <i>this</i> description.
257
     *
258
     * @param  feature	the feature which should be deleted
259
     * @see     #getDescriptiveSystem()
260
     * @see     addFeature(Feature)
261
     */
262
    public void removeFeature(Feature feature) {
263
        this.descriptiveSystem.remove(feature);
264
    }
265

  
266
    /**
267 212
     * Returns the set of {@link DescriptionElementBase elementary description data} which constitute
268 213
     * <i>this</i> description as a whole.
269 214
     *
......
393 338
        try{
394 339
            result = (DescriptionBase)super.clone();
395 340

  
396
            //descriptive system
397
            result.descriptiveSystem = new HashSet<Feature>();
398
            for (Feature feature : getDescriptiveSystem()){
399
                result.descriptiveSystem.add(feature);
400
            }
401

  
402 341
            //working set
403 342
            result.workingSets = new HashSet<WorkingSet>();
404 343
            for (WorkingSet workingSet : getWorkingSets()){
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/database/update/v31_33/SchemaUpdater_31_33.java
235 235
		step = SimpleSchemaUpdaterStep.NewInstance(stepName, updateSql);
236 236
		stepList.add(step);
237 237
		
238
		//TODO update molecular data #3340
239
		
240
		//TODO add MediaSpecimen column #3614
241
		
242
		//remove DescriptionBase_Feature  #2202
243
		stepName = "Remove table DescriptionBase_Feature";
244
		TableDroper.NewInstance(stepName, "DescriptionBase_Feature", INCLUDE_AUDIT);
245
		stepList.add(step);
246
		
238 247
		return stepList;
239 248
	}
240 249

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)