Revision feb81cbe
Added by Patrick Plitzner over 9 years ago
- adapted details views and wizards to cdm changes (amplifaction + amplification result)
- added missing parameters to details views
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/dna/AmplificationGelPhotoCollectionDetailSection.java | ||
---|---|---|
14 | 14 |
|
15 | 15 |
import eu.etaxonomy.cdm.api.conversation.ConversationHolder; |
16 | 16 |
import eu.etaxonomy.cdm.model.media.Media; |
17 |
import eu.etaxonomy.cdm.model.molecular.Amplification; |
|
17 |
import eu.etaxonomy.cdm.model.molecular.AmplificationResult;
|
|
18 | 18 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
19 | 19 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
20 | 20 |
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection; |
... | ... | |
24 | 24 |
* @date 26.02.2014 |
25 | 25 |
* |
26 | 26 |
*/ |
27 |
public class AmplificationGelPhotoCollectionDetailSection extends AbstractEntityCollectionSection<Amplification, Media> { |
|
27 |
public class AmplificationGelPhotoCollectionDetailSection extends AbstractEntityCollectionSection<AmplificationResult, Media> {
|
|
28 | 28 |
|
29 | 29 |
/** |
30 | 30 |
* @param formFactory |
... | ... | |
44 | 44 |
* @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection#getCollection(java.lang.Object) |
45 | 45 |
*/ |
46 | 46 |
@Override |
47 |
public Collection<Media> getCollection(Amplification entity) { |
|
48 |
// if(entity.getGelPhoto()!=null){
|
|
49 |
// return Collections.singleton(entity.getGelPhoto());
|
|
50 |
// }
|
|
47 |
public Collection<Media> getCollection(AmplificationResult entity) {
|
|
48 |
if(entity.getGelPhoto()!=null){ |
|
49 |
return Collections.singleton(entity.getGelPhoto()); |
|
50 |
} |
|
51 | 51 |
return Collections.EMPTY_LIST; |
52 | 52 |
} |
53 | 53 |
|
... | ... | |
56 | 56 |
*/ |
57 | 57 |
@Override |
58 | 58 |
public Media createNewElement() { |
59 |
// if(getEntity().getGelPhoto()==null){
|
|
60 |
// return Media.NewInstance();
|
|
61 |
// }
|
|
59 |
if(getEntity().getGelPhoto()==null){ |
|
60 |
return Media.NewInstance(); |
|
61 |
} |
|
62 | 62 |
return null; |
63 | 63 |
} |
64 | 64 |
|
... | ... | |
67 | 67 |
*/ |
68 | 68 |
@Override |
69 | 69 |
public void addElement(Media element) { |
70 |
// if(getEntity().getGelPhoto()==null){
|
|
71 |
// getEntity().setGelPhoto(element);
|
|
72 |
// }
|
|
70 |
if(getEntity().getGelPhoto()==null){ |
|
71 |
getEntity().setGelPhoto(element); |
|
72 |
} |
|
73 | 73 |
|
74 | 74 |
} |
75 | 75 |
|
... | ... | |
78 | 78 |
*/ |
79 | 79 |
@Override |
80 | 80 |
public void removeElement(Media element) { |
81 |
// getEntity().setGelPhoto(null);
|
|
81 |
getEntity().setGelPhoto(null); |
|
82 | 82 |
} |
83 | 83 |
|
84 | 84 |
/* (non-Javadoc) |
Also available in: Unified diff