src/app/models/indent.model.ts
Properties |
|
Methods |
|
constructor(name: string, children: ILNode[], ontologyId: string, color: string)
|
Defined in src/app/models/indent.model.ts:7
|
Optional children |
Type : ILNode[]
|
Defined in src/app/models/indent.model.ts:4
|
color |
Type : string
|
Defined in src/app/models/indent.model.ts:5
|
comparator |
Type : string
|
Defined in src/app/models/indent.model.ts:6
|
name |
Type : string
|
Defined in src/app/models/indent.model.ts:2
|
ontologyId |
Type : string
|
Defined in src/app/models/indent.model.ts:3
|
type |
Type : string
|
Defined in src/app/models/indent.model.ts:7
|
Public search | ||||||
search(name: string)
|
||||||
Defined in src/app/models/indent.model.ts:18
|
||||||
Parameters :
Returns :
any
|
export class ILNode {
name: string;
ontologyId: string;
children?: ILNode[];
color: string;
comparator: string;
type: string;
constructor(name: string, children: ILNode[], ontologyId: string, color = '#808080') {
this.name = name;
this.children = children;
this.ontologyId = ontologyId;
this.color = color;
this.comparator = '';
this.type = '';
}
public search(name: string) {
for (const child of this.children ?? []) {
if (child.name.toLowerCase() === name.toLowerCase()) {
return child;
}
}
return {};
}
}