Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/top-level-sequence' into synbio-…
Browse files Browse the repository at this point in the history
…suite
  • Loading branch information
zachsents committed Dec 12, 2023
2 parents 5101e1c + 9c7d89b commit 6c03a51
Show file tree
Hide file tree
Showing 16 changed files with 578 additions and 294 deletions.
3 changes: 2 additions & 1 deletion SBOLCanvasBackend/src/utils/SBOLData.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ public class SBOLData {
roles.put("RBS (Ribosome Binding Site)", SequenceOntology.RIBOSOME_ENTRY_SITE);
roles.put("CDS (Coding Sequence)", SequenceOntology.CDS);
roles.put("Ter (Terminator)", SequenceOntology.TERMINATOR);
roles.put("Cir (Circular Backbone)", SequenceOntology.CIRCULAR);
roles.put("Cir (Circular Backbone Left)", SequenceOntology.CIRCULAR);
roles.put("Cir (Circular Backbone Right)", SequenceOntology.CIRCULAR);
roles.put("gRNA (Non-Coding RNA gene)", URI.create("http://identifiers.org/so/SO:0001263"));
roles.put("Ori (Origin of Replication)", SequenceOntology.ORIGIN_OF_REPLICATION);
roles.put("OriT (Origin of Transfer)", URI.create("http://identifiers.org/so/SO:0000724"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ <h1 *ngIf="mode != classRef.SELECT_MODE" mat-dialog-title>Download</h1>
<mat-form-field>
<mat-label>Server</mat-label>
<mat-select id="registry" [disabled]="registries == null || registries.length < 1"
(selectionChange)="setRegistry($event.value)">
<mat-option *ngFor="let registry of registries" [value]="registry" [matTooltip]="registry">
(selectionChange)="setRegistry($event.value)" value="{{registry}}">
<mat-option *ngFor="let registry of registries" [value]="registry" [matTooltip]="registry">
{{registry}}
</mat-option>
</mat-select>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ export class DownloadGraphComponent implements OnInit {
constructor(@Inject(MAT_DIALOG_DATA) public data: any, private dialog: MatDialog, private metadataService: MetadataService, private graphService: GraphService, private filesService: FilesService, private loginService: LoginService, public dialogRef: MatDialogRef<DownloadGraphComponent>) { }

ngOnInit() {
// check if there is a saved registry and collection information
if (this.metadataService.getSavedRegistry() !== undefined) this.registry = this.metadataService.getSavedRegistry();
if (this.metadataService.getSavedCollection() !== undefined) {
this.collection = this.metadataService.getSavedCollection().collection;
this.history = this.metadataService.getSavedCollection().history;
} else {
this.collection = "";
this.history = [];
}

this.working = true;
if (this.data != null) {
if (this.data.mode != null) {
Expand Down Expand Up @@ -108,10 +118,9 @@ export class DownloadGraphComponent implements OnInit {
this.working = false;
});
}

this.updateParts();
this.parts.sort = this.sort;
this.history = [];
this.collection = "";
}

loginDisabled(): boolean {
Expand All @@ -128,6 +137,7 @@ export class DownloadGraphComponent implements OnInit {

setRegistry(registry: string) {
this.registry = registry;
this.metadataService.setSavedRegistry(registry);
this.updateParts();
}

Expand Down Expand Up @@ -172,7 +182,9 @@ export class DownloadGraphComponent implements OnInit {
// only allowed to get here when there is one item selected, and it's a collection
let row = this.selection.selected[0];
this.history.push(row);
this.metadataService.setSavedCollection({ collection: row.uri, history: this.history });
this.selection.clear();

this.updateParts();
}

Expand Down Expand Up @@ -222,6 +234,7 @@ export class DownloadGraphComponent implements OnInit {
if (row.type === DownloadGraphComponent.collectionType) {
this.history.push(row);
this.collection = row.uri;
this.metadataService.setSavedCollection({ collection: this.collection, history: this.history });
this.selection.clear();
this.updateParts();
} else if (row.type === DownloadGraphComponent.componentType) {
Expand Down Expand Up @@ -296,6 +309,7 @@ export class DownloadGraphComponent implements OnInit {

changeCollection(collection: string) {
this.selection.clear();

let found = false;
for (let i = 0; i < this.history.length; i++) {
if (this.history[i] === collection) {
Expand All @@ -306,7 +320,9 @@ export class DownloadGraphComponent implements OnInit {
}
if (!found)
this.history.length = 0;

this.collection = collection;
this.metadataService.setSavedCollection({ collection: collection, history: this.history });

this.updateParts();
}
Expand Down Expand Up @@ -356,7 +372,7 @@ export class DownloadGraphComponent implements OnInit {
this.parts.data = partCache;
this.working = false;
});
}else{
}else {
// collection, modules, and components
this.partRequest = forkJoin(
this.filesService.listParts(this.loginService.users[this.registry], this.registry, this.collection, null, null, "collections"),
Expand Down
Loading

0 comments on commit 6c03a51

Please sign in to comment.