TripleSubject
Represents a single Subject in a TripleDocument.
Used to read and modify properties of a single Subject in a TripleDocument, using the get*
,
set*
, add*
and remove*
methods for the relevant data types. Note that those changes will
not be persisted until you call TripleDocument.save.
Hierarchy
- TripleSubject
Index
Properties
- addDateTime
- addDecimal
- addInteger
- addLiteral
- addLocaleString
- addRef
- addString
- asRef
- getAllDateTimes
- getAllDecimals
- getAllIntegers
- getAllLiterals
- getAllLocaleStrings
- getAllRefs
- getAllStrings
- getDateTime
- getDecimal
- getDocument
- getInteger
- getLiteral
- getLocaleString
- getRef
- getString
- getType
- removeAll
- removeDateTime
- removeDecimal
- removeInteger
- removeLiteral
- removeLocaleString
- removeRef
- removeString
- setDateTime
- setDecimal
- setInteger
- setLiteral
- setLocaleString
- setRef
- setString
Properties
addDateTime
• addDateTime: function
Set a property of this Subject to a Literal DateTime value.
Note that this value is not saved to the user's Pod until you save the containing Document.
Type declaration:
▸ (predicate
: Reference, object
: Date): void
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | The property you want to add another value of. |
object | Date | The Literal DateTime value you want to add. |
addDecimal
• addDecimal: function
Set a property of this Subject to a Literal decimal value.
Note that this value is not saved to the user's Pod until you save the containing Document.
Type declaration:
▸ (predicate
: Reference, object
: number): void
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | The property you want to add another value of. |
object | number | The Literal decimal value you want to add. |
addInteger
• addInteger: function
Set a property of this Subject to a Literal integer value.
Note that this value is not saved to the user's Pod until you save the containing Document.
Type declaration:
▸ (predicate
: Reference, object
: number): void
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | The property you want to add another value of. |
object | number | The Literal integer value you want to add. |
addLiteral
• addLiteral: function
Set a property of this Subject to a Literal value (i.e. not a URL).
Note that this value is not saved to the user's Pod until you save the containing Document.
deprecated
This method has been superseded by the type-specific methods addString,
addInteger, addDecimal and addDateTime.
Type declaration:
▸ (predicate
: Reference, object
: LiteralTypes): void
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | The property you want to add another value of. |
object | LiteralTypes | The Literal value you want to add, the type of which is one of LiteralTypes. |
addLocaleString
• addLocaleString: function
Set a property of this Subject to a Literal localised string value.
Note that this value is not saved to the user's Pod until you save the containing Document.
Type declaration:
▸ (predicate
: Reference, object
: string, locale
: string): void
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | The property you want to add another value of. |
object | string | The Literal string value you want to add. |
locale | string | The locale the given string is in. |
addRef
• addRef: function
Set a property of this Subject to a Reference.
Note that this value is not saved to the user's Pod until you save the containing Document.
Type declaration:
▸ (predicate
: Reference, object
: Reference): void
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | The property you want to add another value of. |
object | Reference | The IRI you want to add a reference to. |
addString
• addString: function
Set a property of this Subject to a Literal string value.
Note that this value is not saved to the user's Pod until you save the containing Document.
Type declaration:
▸ (predicate
: Reference, object
: string): void
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | The property you want to add another value of. |
object | string | The Literal string value you want to add. |
asRef
• asRef: function
Get the IRI of the Reference representing this specific Subject.
returns
The IRI of this specific Subject.
Type declaration:
▸ (): Reference
getAllDateTimes
• getAllDateTimes: function
returns
All literal DateTime values satisfying predicate
.
Type declaration:
▸ (predicate
: Reference): Date[]
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | Which property of this Subject you want the values of. |
getAllDecimals
• getAllDecimals: function
returns
All literal decimal values satisfying predicate
.
Type declaration:
▸ (predicate
: Reference): number[]
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | Which property of this Subject you want the values of. |
getAllIntegers
• getAllIntegers: function
returns
All literal integer values satisfying predicate
.
Type declaration:
▸ (predicate
: Reference): number[]
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | Which property of this Subject you want the values of. |
getAllLiterals
• getAllLiterals: function
returns
All literal values satisfying predicate
.
deprecated
This method has been superseded by the type-specific methods getAllStrings,
getAllIntegers, getAllDecimals and [[getAllDates]].
Type declaration:
▸ (predicate
: Reference): LiteralTypes[]
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | Which property of this Subject you want the values of. |
getAllLocaleStrings
• getAllLocaleStrings: function
returns
All literal string values satisfying predicate
in the given locale, or all locale strings if no locale was specified.
Type declaration:
▸ (predicate
: Reference, locale?
: undefined | string): GetAllLocaleStringsReturnType‹undefined | string›
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | Which property of this Subject you want the values of. |
locale? | undefined | string | Which locale the values should be in, e.g. 'nl-NL', or undefined to get all locale strings. |
getAllRefs
• getAllRefs: function
returns
All references satisfying predicate
.
Type declaration:
▸ (predicate
: Reference): Array‹Reference›
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | Which property of this Subject you want the values of. |
getAllStrings
• getAllStrings: function
returns
All literal string values satisfying predicate
.
Type declaration:
▸ (predicate
: Reference): string[]
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | Which property of this Subject you want the values of. |
getDateTime
• getDateTime: function
Find a literal date+time value for predicate
on this Subject.
This retrieves one date+time literal, or null
if none is found. If you want to find all
date+time literals for a predicate, see getAllDateTimes.
returns
The first literal Date value satisfying predicate
, if any, and null
otherwise.
Type declaration:
▸ (predicate
: Reference): Date | null
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | Which property of this Subject you want the value of. |
getDecimal
• getDecimal: function
Find a literal decimal value for predicate
on this Subject.
This retrieves one decimal literal, or null
if none is found. If you want to find all
decimal literals for a predicate, see getAllDecimals.
returns
The first literal decimal value satisfying predicate
, if any, and null
otherwise.
Type declaration:
▸ (predicate
: Reference): number | null
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | Which property of this Subject you want the value of. |
getDocument
• getDocument: function
returns
The TripleDocument that contains this Subject.
Type declaration:
▸ (): BareTripleDocument
getInteger
• getInteger: function
Find a literal integer value for predicate
on this Subject.
This retrieves one integer literal, or null
if none is found. If you want to find all
integer literals for a predicate, see getAllIntegers.
returns
The first literal integer value satisfying predicate
, if any, and null
otherwise.
Type declaration:
▸ (predicate
: Reference): number | null
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | Which property of this Subject you want the value of. |
getLiteral
• getLiteral: function
returns
The first literal value satisfying predicate
, if any, and null
otherwise.
deprecated
This method has been superseded by the type-specific methods getString,
getInteger, getDecimal and getDateTime.
Type declaration:
▸ (predicate
: Reference): LiteralTypes | null
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | Which property of this Subject you want the value of. |
getLocaleString
• getLocaleString: function
Find a literal string value in a given locale for predicate
on this Subject.
This retrieves one string literal, or null
if none (in the given locale) is found. If you
want to find all string literals in a locale for a predicate, see getAllLocaleStrings.
returns
The first literal string value satisfying predicate
in the given locale, if any, and null
otherwise.
Type declaration:
▸ (predicate
: Reference, locale
: string): string | null
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | Which property of this Subject you want the value of. |
locale | string | Which locale the string should be in, e.g. 'nl-NL'. |
getRef
• getRef: function
Find a reference attached to this Subject with predicate
.
This retrieves one reference, or null
if none is found. If you want to find all
references for a predicate, see getAllRefs.
returns
The first referenced IRI satisfying predicate
, if any, and null
otherwise.
Type declaration:
▸ (predicate
: Reference): Reference | null
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | Which property of this Subject you want the value of. |
getString
• getString: function
Find a literal string value for predicate
on this Subject.
This retrieves one string literal, or null
if none is found. If you want to find all
string literals for a predicate, see getAllStrings.
returns
The first literal string value satisfying predicate
, if any, and null
otherwise.
Type declaration:
▸ (predicate
: Reference): string | null
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | Which property of this Subject you want the value of. |
getType
• getType: function
returns
The type of this Subject, if known.
Type declaration:
▸ (): Reference | null
removeAll
• removeAll: function
Remove all values for a property of this Subject.
Note that these values are not removed from the user's Pod until you save the containing Document.
Type declaration:
▸ (predicate
: Reference): void
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | The property you want to remove the values of. |
removeDateTime
• removeDateTime: function
Remove a Literal DateTime value for a property of this Subject.
Note that this value is not removed from the user's Pod until you save the containing Document.
Type declaration:
▸ (predicate
: Reference, object
: Date): void
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | The property you want to remove a value of. |
object | Date | The Literal DateTime value you want to remove. |
removeDecimal
• removeDecimal: function
Remove a Literal decimal value for a property of this Subject.
Note that this value is not removed from the user's Pod until you save the containing Document.
Type declaration:
▸ (predicate
: Reference, object
: number): void
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | The property you want to remove a value of. |
object | number | The Literal decimal value you want to remove. |
removeInteger
• removeInteger: function
Remove a Literal integer value for a property of this Subject.
Note that this value is not removed from the user's Pod until you save the containing Document.
Type declaration:
▸ (predicate
: Reference, object
: number): void
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | The property you want to remove a value of. |
object | number | The Literal integer value you want to remove. |
removeLiteral
• removeLiteral: function
Remove a Literal value for a property of this Subject.
Note that this value is not removed from the user's Pod until you save the containing Document.
deprecated
This method has been superseded by the type-specific methods removeString,
removeInteger, removeDecimal and removeDateTime.
Type declaration:
▸ (predicate
: Reference, object
: LiteralTypes): void
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | The property you want to remove a value of. |
object | LiteralTypes | The Literal value you want to remove, the type of which is one of LiteralTypes. |
removeLocaleString
• removeLocaleString: function
Remove a Literal localised string value for a property of this Subject.
Note that this value is not removed from the user's Pod until you save the containing Document.
Type declaration:
▸ (predicate
: Reference, object
: string, locale
: string): void
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | The property you want to remove a value of. |
object | string | The Literal string value you want to remove. |
locale | string | The locale of the string to remove. |
removeRef
• removeRef: function
Remove a Reference value for a property of this Subject.
Note that this pointer is not removed from the user's Pod until you save the containing Document.
Type declaration:
▸ (predicate
: Reference, object
: Reference): void
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | The property you want to remove a reference for. |
object | Reference | The reference you want to remove. |
removeString
• removeString: function
Remove a Literal string value for a property of this Subject.
Note that this value is not removed from the user's Pod until you save the containing Document.
Type declaration:
▸ (predicate
: Reference, object
: string): void
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | The property you want to remove a value of. |
object | string | The Literal string value you want to remove. |
setDateTime
• setDateTime: function
Set a property of this Subject to a DateTime Literal value, clearing all existing values.
Note that this change is not saved to the user's Pod until you save the containing Document.
Type declaration:
▸ (predicate
: Reference, object
: Date): void
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | The property you want to set the value of. |
object | Date | The DateTime Literal value you want to set. |
setDecimal
• setDecimal: function
Set a property of this Subject to a decimal Literal value, clearing all existing values.
Note that this change is not saved to the user's Pod until you save the containing Document.
Type declaration:
▸ (predicate
: Reference, object
: number): void
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | The property you want to set the value of. |
object | number | The decimal Literal value you want to set. |
setInteger
• setInteger: function
Set a property of this Subject to an integer Literal value, clearing all existing values.
Note that this change is not saved to the user's Pod until you save the containing Document.
Type declaration:
▸ (predicate
: Reference, object
: number): void
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | The property you want to set the value of. |
object | number | The integer Literal value you want to set. |
setLiteral
• setLiteral: function
Set a property of this Subject to a Literal value, clearing all existing values.
Note that this change is not saved to the user's Pod until you save the containing Document.
deprecated
This method has been superseded by the type-specific methods setString,
setInteger, setDecimal and setDateTime.
Type declaration:
▸ (predicate
: Reference, object
: LiteralTypes): void
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | The property you want to set the value of. |
object | LiteralTypes | The Literal value you want to set, the type of which is one of LiteralTypes. |
setLocaleString
• setLocaleString: function
Set a property of this Subject to a localised string Literal value, clearing all existing values.
Note that this change is not saved to the user's Pod until you save the containing Document.
Type declaration:
▸ (predicate
: Reference, object
: string, locale
: string): void
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | The property you want to set the value of. |
object | string | The string Literal value you want to set. |
locale | string | The locale of the given string. |
setRef
• setRef: function
Set a property of this Subject to a Reference, clearing all existing values.
Note that this change is not saved to the user's Pod until you save the containing Document.
Type declaration:
▸ (predicate
: Reference, object
: Reference): void
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | The property you want to set the value of. |
object | Reference | The reference you want to add. |
setString
• setString: function
Set a property of this Subject to a string Literal value, clearing all existing values.
Note that this change is not saved to the user's Pod until you save the containing Document.
Type declaration:
▸ (predicate
: Reference, object
: string): void
Parameters:
Name | Type | Description |
---|---|---|
predicate | Reference | The property you want to set the value of. |
object | string | The string Literal value you want to set. |