Class Description

class for descriptions

Constructors

Properties

Accessors

Methods

Constructors

  • Parameters

    • label: LabelAndDescription

      the label in json format

    Returns Description

    Example

    const Description = new Description({ language: 'en', value: 'Douglas Adams' });
    

Properties

language: LabelLanguages

the language of the description

value: string

the value of the description

Accessors

  • get internalID(): string
  • create a unique id for the Description

    Returns string

    the id

Methods

  • this function checks if two descriptions are equal

    Parameters

    • other: LabelAndDescription

      the other Label

    Returns boolean

    true if the descriptions are equal

    Example

    const description1 = new Description({ language: 'en', value: 'foo' });
    const description2 = new Description({ language: 'en', value: 'bar' });

    description1.equals(description2); // false
  • Returns LabelAndDescription

    the Description in a json format

    Example

    const json = description.toJson();
    
  • create a Description from a language and a value

    Parameters

    • language: LabelLanguages

      the language of the Description

    • value: string

      the value of the Description

    Returns Description

    the Description object

    Example

    const Description = Description.fromString('en', 'Douglas Adams')
    

Generated using TypeDoc