|
@@ -1,6 +1,7 @@
|
|
|
import {Injectable} from '@angular/core';
|
|
import {Injectable} from '@angular/core';
|
|
|
import {Subject} from 'rxjs';
|
|
import {Subject} from 'rxjs';
|
|
|
|
|
|
|
|
|
|
+import attractivenessConfig from '../attractiveness.config.json';
|
|
|
import {AdjusterEventService} from './adjuster-event.service';
|
|
import {AdjusterEventService} from './adjuster-event.service';
|
|
|
import {RDFSubject} from './ontology.model';
|
|
import {RDFSubject} from './ontology.model';
|
|
|
|
|
|
|
@@ -9,6 +10,7 @@ export class AdjusterPresetsService {
|
|
|
activeProblem: Problem;
|
|
activeProblem: Problem;
|
|
|
activeRole: Role;
|
|
activeRole: Role;
|
|
|
activeSchema: Schema;
|
|
activeSchema: Schema;
|
|
|
|
|
+ defaultSchemaId: string;
|
|
|
|
|
|
|
|
schemaChanges: Subject<Schema> = new Subject();
|
|
schemaChanges: Subject<Schema> = new Subject();
|
|
|
problemChanges: Subject<Problem> = new Subject();
|
|
problemChanges: Subject<Problem> = new Subject();
|
|
@@ -18,6 +20,7 @@ export class AdjusterPresetsService {
|
|
|
schemas: Schema[] = [];
|
|
schemas: Schema[] = [];
|
|
|
|
|
|
|
|
constructor(public adjusterEventService: AdjusterEventService) {
|
|
constructor(public adjusterEventService: AdjusterEventService) {
|
|
|
|
|
+ this.defaultSchemaId = attractivenessConfig?.defaultClassificationSchema;
|
|
|
this.adjusterEventService.ontologyLoads.subscribe((ontology) => {
|
|
this.adjusterEventService.ontologyLoads.subscribe((ontology) => {
|
|
|
this.ontology = ontology;
|
|
this.ontology = ontology;
|
|
|
this.loadRoles();
|
|
this.loadRoles();
|
|
@@ -102,7 +105,7 @@ export class AdjusterPresetsService {
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- this.activeSchema = this.schemas[0];
|
|
|
|
|
|
|
+ this.activeSchema = this.schemas.find((schema) => schema.id == this.defaultSchemaId) ?? this.schemas[0];
|
|
|
this.schemaChanges.next(this.activeSchema);
|
|
this.schemaChanges.next(this.activeSchema);
|
|
|
}
|
|
}
|
|
|
|
|
|