/
specify-property-value.component.html
33 lines (28 loc) · 2.35 KB
/
specify-property-value.component.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<span *ngIf="comparisonOperators?.length > 0" [formGroup]="form">
<mat-form-field class="search-operator-field small-field">
<mat-select placeholder="Comparison Operator" [formControlName]="'comparisonOperator'" class="comparison-operator">
<mat-option *ngFor="let compOp of comparisonOperators" [value]="compOp">{{ compOp.label }}</mat-option>
</mat-select>
</mat-form-field>
</span>
<!-- select apt component for value specification using a switch case statement-->
<span *ngIf="comparisonOperatorSelected !== undefined && comparisonOperatorSelected !== null && comparisonOperatorSelected.getClassName() != 'Exists'"
[ngSwitch]="propertyValueType">
<app-search-int-value #propertyValue [formGroup]="form" *ngSwitchCase="Constants.IntValue"></app-search-int-value>
<app-search-decimal-value #propertyValue [formGroup]="form" *ngSwitchCase="Constants.DecimalValue"></app-search-decimal-value>
<app-search-boolean-value #propertyValue [formGroup]="form" *ngSwitchCase="Constants.BooleanValue"></app-search-boolean-value>
<app-search-date-value #propertyValue [formGroup]="form" *ngSwitchCase="Constants.DateValue"></app-search-date-value>
<span *ngSwitchCase="Constants.Resource">
<span *ngIf="comparisonOperatorSelected.getClassName() == 'Match'; else elseBlock">
<app-search-resource #propertyValue [formGroup]="form" [restrictResourceClass]="objectClassConstraint"></app-search-resource>
</span>
<ng-template #elseBlock>
<app-search-link-value #propertyValue [formGroup]="form" [restrictResourceClass]="objectClassConstraint"></app-search-link-value>
</ng-template>
</span>
<app-search-text-value #propertyValue [formGroup]="form" *ngSwitchCase="Constants.TextValue"></app-search-text-value>
<app-search-list-value #propertyValue [formGroup]="form" [property]="property" *ngSwitchCase="Constants.ListValue"></app-search-list-value>
<app-search-uri-value #propertyValue [formGroup]="form" *ngSwitchCase="Constants.UriValue"></app-search-uri-value>
<span *ngSwitchDefault>Not supported {{propertyValueType}}</span>
</span>
<!-- TODO: Resource: handle linking properties with target class restriction: access property member to get objectClass via property() getter method -->