Class: AddStatementPayload

AddStatementPayload()

Object builder used for constructing a statement addition payload.

Constructor

new AddStatementPayload()

Author:
  • Mihail Radkov
  • Svilen Velikov
Source:

Methods

getBaseURI() → {string}

Returns the base URI that is used for resolving any relative URIs.

Source:
Returns:

the base URI

Type
string

getDataType() → {string}

Returns the statement object's data type.

Having a data type means it is a literal.

Source:
Returns:

the data type

Type
string

getLanguage() → {string}

Returns the statement object's language.

Having a language means it is a literal.

Source:
Returns:

the language

Type
string

isLiteral() → {boolean}

Returns if this statement payload is for a literal. A literal have data type and/or language.

Source:
Returns:

true if it is a literal payload or false otherwise

Type
boolean

setBaseURI(baseURI) → {AddStatementPayload}

Sets the base URI that is used for resolving any relative URIs in the current payload.

Parameters:
Name Type Description
baseURI string

the base URI

Source:
Returns:

the payload for method chaining

Type
AddStatementPayload

setDataType(dataTypeopt) → {AddStatementPayload}

Sets the data type this statement's object.

This makes the statement a literal.

Parameters:
Name Type Attributes Description
dataType string <optional>

the object's data type

Source:
Returns:

the payload for method chaining

Type
AddStatementPayload

setLanguage(languageopt) → {AddStatementPayload}

Sets the language this statement's object.

This makes the statement a literal.

Parameters:
Name Type Attributes Description
language string <optional>

the object's language

Source:
Returns:

the payload for method chaining

Type
AddStatementPayload

setObjectLiteral(value, typeopt, languageopt) → {AddStatementPayload}

Sets the statement's object value making it a literal.

If the data type is not provided, it will try to autodetect it:

  • integer -> xsd:integer
  • float -> xsd:decimal
  • boolean -> xsd:boolean
Everything else will be considered as xsd:string.

To set a language the data type must be xsd:string.

Parameters:
Name Type Attributes Description
value *

the statements object value

type string <optional>

the statements object data type

language string <optional>

the statements object language

Source:
Returns:

the payload for method chaining

Type
AddStatementPayload