@inrupt/solid-client / thing/get

Module: thing/get#

Functions#

getBoolean#

getBoolean(thing, property): boolean | null

Returns the boolean value of the specified Property from a [[Thing]]. If the Property is not present or its value is not of type boolean, returns null. If the Property has multiple boolean values, returns one of its values.

Parameters#

Name

Type

Description

thing

Readonly<{}>

The [[Thing]] to read a boolean value from.

property

string | Url

The Property whose boolean value to return.

Returns#

boolean | null

A boolean value for the given Property if present, or null if the Property is not present or the value is not of type boolean.

Defined in#

src/thing/get.ts:122


getBooleanAll#

getBooleanAll(thing, property): boolean[]

Returns the boolean values of the specified Property from a [[Thing]]. If the Property is not present, returns an empty array. If the Property’s value is not of type boolean, omits that value in the array.

Parameters#

Name

Type

Description

thing

Readonly<{}>

The [[Thing]] to read the boolean values from.

property

string | Url

The Property whose boolean values to return.

Returns#

boolean[]

An array of boolean values for the given Property.

Defined in#

src/thing/get.ts:149


getDate#

getDate(thing, property): Date | null

Returns the date value of the specified Property from a [[Thing]]. If the Property is not present or its value is not of type date, returns null. If the Property has multiple date values, returns one of its values.

Parameters#

Name

Type

Description

thing

Readonly<{}>

The [[Thing]] to read a date value from.

property

string | Url

The Property whose date value to return.

Returns#

Date | null

A date value for the given Property if present, or null if the Property is not present or the value is not of type date.

Since

1.10.0

Defined in#

src/thing/get.ts:227


getDateAll#

getDateAll(thing, property): Date[]

Returns the date values of the specified Property from a [[Thing]]. If the Property is not present, returns an empty array. If the Property’s value is not of type date, omits that value in the array.

Parameters#

Name

Type

Description

thing

Readonly<{}>

The [[Thing]] to read the date values from.

property

string | Url

The Property whose date values to return.

Returns#

Date[]

An array of date values for the given Property.

Since

1.10.0

Defined in#

src/thing/get.ts:249


getDatetime#

getDatetime(thing, property): Date | null

Returns the datetime value of the specified Property from a [[Thing]]. If the Property is not present or its value is not of type datetime, returns null. If the Property has multiple datetime values, returns one of its values.

Parameters#

Name

Type

Description

thing

Readonly<{}>

The [[Thing]] to read a datetime value from.

property

string | Url

The Property whose datetime value to return.

Returns#

Date | null

A datetime value for the given Property if present, or null if the Property is not present or the value is not of type datetime.

Defined in#

src/thing/get.ts:174


getDatetimeAll#

getDatetimeAll(thing, property): Date[]

Returns the datetime values of the specified Property from a [[Thing]]. If the Property is not present, returns an empty array. If the Property’s value is not of type datetime, omits that value in the array.

Parameters#

Name

Type

Description

thing

Readonly<{}>

The [[Thing]] to read the datetime values from.

property

string | Url

The Property whose datetime values to return.

Returns#

Date[]

An array of datetime values for the given Property.

Defined in#

src/thing/get.ts:201


getDecimal#

getDecimal(thing, property): number | null

Returns the decimal value of the specified Property from a [[Thing]]. If the Property is not present or its value is not of type decimal, returns null. If the Property has multiple decimal values, returns one of its values.

Parameters#

Name

Type

Description

thing

Readonly<{}>

The [[Thing]] to read a decimal value from.

property

string | Url

The Property whose decimal value to return.

Returns#

number | null

A decimal value for the given Property if present, or null if the Property is not present or the value is not of type decimal.

Defined in#

src/thing/get.ts:315


getDecimalAll#

getDecimalAll(thing, property): number[]

Returns the decimal values of the specified Property from a [[Thing]]. If the Property is not present, returns an empty array. If the Property’s value is not of type decimal, omits that value in the array.

Parameters#

Name

Type

Description

thing

Readonly<{}>

The [[Thing]] to read the decimal values from.

property

string | Url

The Property whose decimal values to return.

Returns#

number[]

An array of decimal values for the given Property.

Defined in#

src/thing/get.ts:342


getInteger#

getInteger(thing, property): number | null

Returns the integer value of the specified Property from a [[Thing]]. If the Property is not present or its value is not of type integer, returns null. If the Property has multiple integer values, returns one of its values.

Parameters#

Name

Type

Description

thing

Readonly<{}>

The [[Thing]] to read an integer value from.

property

string | Url

The Property whose integer value to return.

Returns#

number | null

A integer value for the given Property if present, or null if the Property is not present or the value is not of type datetime.

Defined in#

src/thing/get.ts:367


getIntegerAll#

getIntegerAll(thing, property): number[]

Returns the integer values of the specified Property from a [[Thing]]. If the Property is not present, returns an empty array. If the Property’s value is not of type integer, omits that value in the array.

Parameters#

Name

Type

Description

thing

Readonly<{}>

The [[Thing]] to read the integer values from.

property

string | Url

The Property whose integer values to return.

Returns#

number[]

An array of integer values for the given Property.

Defined in#

src/thing/get.ts:394


getStringByLocaleAll#

getStringByLocaleAll(thing, property): Map<string, string[]>

Returns all localized string values mapped by the locales for the specified property from the specified [[Thing]] (explicitly filters out non-language string literals).

Parameters#

Name

Type

Description

thing

Readonly<{}>

The [[Thing]] to read the localised string values from.

property

string | Url

The Property whose localised string values to return.

Returns#

Map<string, string[]>

A Map of objects, keyed on locale with the value an array of string values (for that locale).

Defined in#

src/thing/get.ts:517


getStringEnglish#

getStringEnglish(thing, property): string | null

Returns the English (language tag “en”) string value of the specified Property from a [[Thing]]. If the Property is not present as a string in English, returns null. If the Property has multiple English string values, returns one of its values.

Parameters#

Name

Type

Description

thing

Readonly<{}>

The [[Thing]] to read a localised string value from.

property

string | Url

The Property whose localised string value to return.

Returns#

string | null

An English string value for the given Property if present, or null otherwise.

Since

1.13.0

Defined in#

src/thing/get.ts:420


getStringEnglishAll#

getStringEnglishAll(thing, property): string[]

Returns the English (language tag “en”) string values of the specified Property from a [[Thing]]. If the Property is not present, returns an empty array. If the Property’s value is not an English string, omits that value in the array.

Parameters#

Name

Type

Description

thing

Readonly<{}>

The [[Thing]] to read a localised string value from.

property

string | Url

The Property whose localised string value to return.

Returns#

string[]

An array of English string values for the given Property.

Defined in#

src/thing/get.ts:469


getStringNoLocale#

getStringNoLocale(thing, property): string | null

Returns the string value of the specified Property from a [[Thing]]. If the Property is not present or its value is not of type string, returns null. If the Property has multiple string values, returns one of its values.

Parameters#

Name

Type

Description

thing

Readonly<{}>

The [[Thing]] to read a string value from.

property

string | Url

The Property whose string value to return.

Returns#

string | null

A string value for the given Property if present, or null if the Property is not present or the value is not of type string.

Defined in#

src/thing/get.ts:544


getStringNoLocaleAll#

getStringNoLocaleAll(thing, property): string[]

Returns the string values of the specified Property from a [[Thing]]. If the Property is not present, returns an empty array. If the Property’s value is not of type string, omits that value in the array.

Parameters#

Name

Type

Description

thing

Readonly<{}>

The [[Thing]] to read the string values from.

property

string | Url

The Property whose string values to return.

Returns#

string[]

An array of string values for the given Property.

Defined in#

src/thing/get.ts:567


getStringWithLocale#

getStringWithLocale(thing, property, locale): string | null

Returns the localized string value of the specified Property from a [[Thing]]. If the Property is not present as a string in the specified locale, returns null. If the Property has multiple string values for the specified locale, returns one of its values.

Parameters#

Name

Type

Description

thing

Readonly<{}>

The [[Thing]] to read a localised string value from.

property

string | Url

The Property whose localised string value to return.

locale

string

The desired locale for the string value.

Returns#

string | null

A localised string value for the given Property if present in the specified locale, or null otherwise.

Defined in#

src/thing/get.ts:437


getStringWithLocaleAll#

getStringWithLocaleAll(thing, property, locale): string[]

Returns the localized string values of the specified Property from a [[Thing]]. If the Property is not present, returns an empty array. If the Property’s value is not a string of the specified locale, omits that value in the array.

Parameters#

Name

Type

Description

thing

Readonly<{}>

The [[Thing]] to read the localised string values from.

property

string | Url

The Property whose localised string values to return.

locale

string

The desired locale for the string values.

Returns#

string[]

An array of localised string values for the given Property.

Defined in#

src/thing/get.ts:486


getTime#

getTime(thing, property): Time | null

Returns the time value of the specified Property from a [[Thing]]. If the Property is not present or its value is not of type time, returns null. If the Property has multiple time values, returns one of its values.

Parameters#

Name

Type

Description

thing

Readonly<{}>

The [[Thing]] to read a time value from.

property

string | Url

The Property whose time value to return.

Returns#

Time | null

A time value for the given Property if present, or null if the Property is not present or the value is not of type time.

Since

1.10.0

Defined in#

src/thing/get.ts:272


getTimeAll#

getTimeAll(thing, property): Time[]

Returns the time values of the specified Property from a [[Thing]]. If the Property is not present, returns an empty array. If the Property’s value is not of type time, omits that value in the array.

Parameters#

Name

Type

Description

thing

Readonly<{}>

The [[Thing]] to read the time values from.

property

string | Url

The Property whose time values to return.

Returns#

Time[]

An array of time values for the given Property.

Since

1.10.0

Defined in#

src/thing/get.ts:293


getUrl#

getUrl(thing, property): UrlString | null

Returns the URL value of the specified Property from a [[Thing]]. If the Property is not present or its value is not of type URL, returns null. If the Property has multiple URL values, returns one of its URL values.

Parameters#

Name

Type

Description

thing

Readonly<{}>

The [[Thing]] to read a URL value from.

property

string | Url

The Property whose URL value to return.

Returns#

UrlString | null

A URL value for the given Property if present, or null if the Property is not present or the value is not of type URL.

Defined in#

src/thing/get.ts:68


getUrlAll#

getUrlAll(thing, property): UrlString[]

Returns the URL values of the specified Property from a [[Thing]]. If the Property is not present, returns an empty array. If the Property’s value is not of type URL, omits that value in the array.

Parameters#

Name

Type

Description

thing

Readonly<{}>

The [[Thing]] to read the URL values from.

property

string | Url

The Property whose URL values to return.

Returns#

UrlString[]

An array of URL values for the given Property.

Defined in#

src/thing/get.ts:95