Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,22 @@ public DatabaseIdentifierPanel(DetailsPanel parentPanel, PhysicalEntity pe) {
initialize();
break;
}
} else if (pe instanceof OtherEntity) {
for (DatabaseIdentifier identifier : pe.getCrossReference()) {
this.reference = identifier.getDatabaseName();
this.id = identifier.getIdentifier();
this.url = identifier.getUrl();
initialize();
break;
}
} else if (pe instanceof GenomeEncodedEntity) {
for (DatabaseIdentifier identifier : pe.getCrossReference()) {
this.reference = identifier.getDatabaseName();
this.id = identifier.getIdentifier();
this.url = identifier.getUrl();
initialize();
break;
}
} else {
initWidget(new Label("No reference entity"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,15 @@ public void onClick(ClickEvent event) {

Widget getCrossReferenceTree(){
TreeItem references = new TreeItem(SafeHtmlUtils.fromString("External cross-references"));

DatabaseIdentifierPanel dbIdPanel = new DatabaseIdentifierPanel(physicalEntity);
TreeItem reference = dbIdPanel.asTreeItem();
reference.setState(true, false);
references.addItem(reference);

//Links to the complex portal have been added as cross references for Complexes but they
//do not have reference entity. The first condition is a hack to accommodate this case
if(!(this.physicalEntity instanceof Complex) && !this.physicalEntity.getCrossReference().isEmpty()){
if(!(this.physicalEntity instanceof Complex) && !(this.physicalEntity instanceof GenomeEncodedEntity) &&
!(this.physicalEntity instanceof OtherEntity) && !this.physicalEntity.getCrossReference().isEmpty()){
Collections.sort(physicalEntity.getCrossReference());
for (DatabaseIdentifier databaseIdentifier : this.physicalEntity.getCrossReference()) {
dbIdPanel = new DatabaseIdentifierPanel(databaseIdentifier);
Expand Down