Class WikibaseSenseSnak

Class for the WikibaseSenseSnak.

Most used property of this type...

Hierarchy (View Summary)

  • Snak
    • WikibaseSenseSnak

Constructors

Properties

datatype: string = 'wikibase-sense'
hash: undefined | string
property: `P${number}`
snaktype: SnakType

Accessors

  • get hasValue(): boolean
  • Checks if the snak has a value.

    Returns boolean

    True if the snak has a value.

  • get id(): undefined | string
  • The lexeme ID will take the form L{number}-S{number}.

    Returns undefined | string

    The value of the snak.

    id

  • set id(value: undefined | string): void
  • Parameters

    • value: undefined | string

      The value of the snak.

    Returns void

    id

  • get internalID(): string
  • Creates a unique ID for the Snak.

    Returns string

    The ID.

  • get lexemeId(): undefined | number
  • Returns undefined | number

    The value of the snak.

    lexemeId

  • set lexemeId(value: undefined | number): void
  • Parameters

    • value: undefined | number

      The value of the snak.

    Returns void

    lexemeId

  • get senseId(): undefined | number
  • Returns undefined | number

    The value of the snak.

    senseId

  • set senseId(value: undefined | number): void
  • Parameters

    • value: undefined | number

      The value of the snak.

    Returns void

    senseId

Methods

  • Create a new instance of the class from some basic data.

    Parameters

    • property: `P${number}`

      The property of the snak.

    • id: string

      The lexeme ID.

    Returns WikibaseSenseSnak

    A new instance of the class.

    const snak = WikibaseSenseSnak.fromData('P123', 123, 456);