File

src/app/models/indent.model.ts

Index

Properties
Methods

Constructor

constructor(name: string, children: ILNode[], ontologyId: string, color: string)
Parameters :
Name Type Optional
name string No
children ILNode[] No
ontologyId string No
color string No

Properties

Optional children
Type : ILNode[]
color
Type : string
comparator
Type : string
name
Type : string
ontologyId
Type : string
type
Type : string

Methods

Public search
search(name: string)
Parameters :
Name Type Optional
name string No
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 {};
  }
}

results matching ""

    No results matching ""