Revision 5f060ab5
Added by Andreas Müller almost 6 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/media/MediaContentProvider.java | ||
---|---|---|
37 | 37 |
* |
38 | 38 |
* @author n.hoffmann |
39 | 39 |
* @created Jun 15, 2010 |
40 |
* @version 1.0 |
|
41 | 40 |
*/ |
42 | 41 |
public class MediaContentProvider implements ITreeContentProvider{ |
43 | 42 |
|
... | ... | |
60 | 59 |
MessagingUtils.error(getClass(), "Taxon is null", null); //$NON-NLS-1$ |
61 | 60 |
return NO_CHILDREN; |
62 | 61 |
} |
63 |
HashSet<DescriptionBase> imageGalleries = new HashSet<DescriptionBase>();
|
|
64 |
for(DescriptionBase description : taxon.getDescriptions()){ |
|
62 |
HashSet<DescriptionBase<?>> imageGalleries = new HashSet<>();
|
|
63 |
for(DescriptionBase<?> description : taxon.getDescriptions()){
|
|
65 | 64 |
if(description.isImageGallery()){ |
66 | 65 |
imageGalleries.add(description); |
67 | 66 |
} |
... | ... | |
69 | 68 |
return imageGalleries.toArray(); |
70 | 69 |
} |
71 | 70 |
else if (parentElement instanceof DescriptionBase) { |
72 |
if (((DescriptionBase) parentElement).isImageGallery()) { |
|
73 |
List<Media> images = getImages((DescriptionBase) parentElement); |
|
71 |
if (((DescriptionBase<?>) parentElement).isImageGallery()) {
|
|
72 |
List<Media> images = getImages((DescriptionBase<?>) parentElement);
|
|
74 | 73 |
if (images != null){ |
75 | 74 |
return images.toArray(); |
76 | 75 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/SearchManager.java | ||
---|---|---|
81 | 81 |
List<NameRelationship> relationships = new ArrayList<>(); |
82 | 82 |
List<RelationshipBase> all = CdmStore.getService(INameService.class).getAllRelationships(0, 0); |
83 | 83 |
|
84 |
for (RelationshipBase relationship : all){ |
|
84 |
for (RelationshipBase<?,?,?> relationship : all){
|
|
85 | 85 |
if(relationship instanceof NameRelationship){ |
86 | 86 |
relationships.add((NameRelationship) relationship); |
87 | 87 |
} |
... | ... | |
105 | 105 |
public List<AgentBase> findAgents(IIdentifiableEntityServiceConfigurator configurator){ |
106 | 106 |
|
107 | 107 |
if(checkLargeResult(CdmStore.getService(IAgentService.class).countByTitle(configurator))){ |
108 |
List<AgentBase> records = CdmStore.getService(IAgentService.class).findByTitle(configurator).getRecords(); |
|
109 |
addUuidSearchResults(records, configurator, IAgentService.class); |
|
110 |
return records; |
|
111 |
} |
|
108 |
List<AgentBase> records = CdmStore.getService(IAgentService.class).findByTitle(configurator).getRecords();
|
|
109 |
addUuidSearchResults(records, configurator, IAgentService.class);
|
|
110 |
return records;
|
|
111 |
}
|
|
112 | 112 |
return NO_RESULTS; |
113 | 113 |
} |
114 | 114 |
|
Also available in: Unified diff
cleanup