Methods
getBaseURI() → {string}
Returns the base URI that is used for resolving any relative URIs.
Returns:
the base URI
- Type
- string
getDataType() → {string}
Returns the statement object's data type.
Having a data type means it is a literal.
Returns:
the data type
- Type
- string
getLanguage() → {string}
Returns the statement object's language.
Having a language means it is a literal.
Returns:
the language
- Type
- string
isLiteral() → {boolean}
Returns if this statement payload is for a literal. A literal have data type and/or language.
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 |
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 |
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 |
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
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 |
Returns:
the payload for method chaining
- Type
- AddStatementPayload