Project

General

Profile

« Previous | Next » 

Revision a14d1bae

Added by Patrick Plitzner almost 10 years ago

  • added property change listener to original data label
    • fixed conversation binding when getting derivate labels

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/derivateSearch/DerivateLabelProvider.java
20 20

  
21 21
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
22 22
import eu.etaxonomy.cdm.api.service.IOccurrenceService;
23
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
23 24
import eu.etaxonomy.cdm.model.common.DefinedTerm;
24 25
import eu.etaxonomy.cdm.model.molecular.DnaSample;
25 26
import eu.etaxonomy.cdm.model.molecular.Sequence;
26 27
import eu.etaxonomy.cdm.model.molecular.SingleRead;
27
import eu.etaxonomy.cdm.model.occurrence.Collection;
28 28
import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
29 29
import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
30 30
import eu.etaxonomy.cdm.model.occurrence.GatheringEvent;
......
127 127
            label += mediaSpecimen.getMediaSpecimen().getTitle()!=null?mediaSpecimen.getMediaSpecimen().getTitle().getText()+", ":"[no motif]";
128 128
            label += mediaSpecimen.getMediaSpecimen().getArtist()!=null?mediaSpecimen.getMediaSpecimen().getArtist()+", ":"";
129 129
            label += mediaSpecimen.getAccessionNumber()!=null?mediaSpecimen.getAccessionNumber()+", ":"";
130
            Collection collection = mediaSpecimen.getCollection();
130
            eu.etaxonomy.cdm.model.occurrence.Collection collection = mediaSpecimen.getCollection();
131 131
            if(collection!=null){
132 132
                label += collection.getName()!=null?collection.getName()+" ":"";
133 133
            }
......
146 146
                if(fieldUnits!=null && !fieldUnits.isEmpty()){
147 147
                    FieldUnit fieldUnit = fieldUnits.iterator().next();
148 148
                    GatheringEvent gatheringEvent = fieldUnit.getGatheringEvent();
149
//                    gatheringEvent = HibernateProxyHelper.deproxy(gatheringEvent, GatheringEvent.class);
149 150
                    if(gatheringEvent!=null){
150 151
                        label += gatheringEvent.getCollector()!=null?gatheringEvent.getCollector()+", ":"";
151 152
                    }
152 153
                    label += fieldUnit.getFieldNumber()!=null?fieldUnit.getFieldNumber()+", ":"";
153 154
                }
154
                Collection collection = derivedUnit.getCollection();
155
                eu.etaxonomy.cdm.model.occurrence.Collection collection = derivedUnit.getCollection();
155 156
                if(collection!=null){
156 157
                    label += collection.getName()!=null?collection.getName()+" ":"";
157 158
                    label += collection.getCode()!=null?"("+collection.getCode()+"), ":"";
......
161 162
            }
162 163
            else if(derivedUnit.getRecordBasis()==SpecimenOrObservationType.TissueSample){
163 164
                //TODO: implement
164
//                kindofTissue + SampleDesignation
165
                label += "kindofTissue? + SampleDesignation?";
165 166
            }
166 167
        }
167 168
        else if(element instanceof Sequence){

Also available in: Unified diff