Revision e8633778
Added by Andreas Müller almost 8 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/DescriptionHelper.java | ||
---|---|---|
173 | 173 |
if (element instanceof OriginalSourceBase) { |
174 | 174 |
try{ |
175 | 175 |
OriginalSourceBase originalSource = (OriginalSourceBase) element; |
176 |
ISourceable sourcedObject = originalSource.getSourcedObj(); |
|
177 |
String sourceObjectTitle = ""; |
|
178 |
if(sourcedObject instanceof IIdentifiableEntity){ |
|
179 |
sourceObjectTitle = ((IdentifiableEntity) sourcedObject).getTitleCache(); |
|
180 |
}else if(sourcedObject instanceof DescriptionElementBase){ |
|
181 |
sourceObjectTitle = "Element for description: " + ((DescriptionElementBase) sourcedObject).getInDescription().getTitleCache(); |
|
182 |
}else{ |
|
183 |
throw new IllegalStateException("Unknown ISourceable object for given OriginalSourceBase"); |
|
184 |
} |
|
176 |
// ISourceable sourcedObject = originalSource.getSourcedObj(); |
|
177 |
//due to #5743 the bidirectionality for sourced object had to be removed |
|
178 |
String sourceObjectTitle = "sourced object data not available (#5743)"; |
|
179 |
// if(sourcedObject instanceof IIdentifiableEntity){ |
|
180 |
// sourceObjectTitle = ((IdentifiableEntity) sourcedObject).getTitleCache(); |
|
181 |
// }else if(sourcedObject instanceof DescriptionElementBase){ |
|
182 |
// sourceObjectTitle = "Element for description: " + ((DescriptionElementBase) sourcedObject).getInDescription().getTitleCache(); |
|
183 |
// }else{ |
|
184 |
// throw new IllegalStateException("Unknown ISourceable object for given OriginalSourceBase"); |
|
185 |
// } |
|
185 | 186 |
|
186 | 187 |
return CdmUtils.concat("; ", new String[]{originalSource.getIdNamespace(), originalSource.getIdInSource(), sourceObjectTitle}); |
187 | 188 |
}catch(LazyInitializationException e){ |
Also available in: Unified diff
Remove sourced object form referencing objects view #5743, #5746