Class MonolingualTextSnak

class for the MonolingualTextSnak

most used property of this type P1476 (title)

Hierarchy (view full)

  • Snak
    • MonolingualTextSnak

Constructors

Properties

datatype: string = 'monolingualtext'
hash: undefined | string
language: undefined | string

the language of the value

property: `P${number}`
snaktype: SnakType
text: undefined | string

the value of the snak

Accessors

  • get hasValue(): boolean
  • Returns boolean

    true if the snak has a value

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

    Returns string

    the id

Methods

  • Parameters

    • property: `P${number}`

      the property of the snak in 'P-form'

    • language: MonolingualLanguages

      the language of the snak

    • value: string

      the value

    Returns MonolingualTextSnak

    a snak with the given properties

    Static

    Example

    const snak = MonolingualTextSnak.fromValue('P1476', 'en', 'test');
    

Generated using TypeDoc