LocalTripleDocumentWithRef
Globals › LocalTripleDocumentWithRef
An initialised Document that has not been stored to the Pod yet, but whose desired location is already known.
This will be obtained when you call createDocument. Compared to a fully initialised TripleDocument, some methods relating to manipulating existing values on the Pod are not available yet. They will be available on the TripleDocument returned when you call save.
Hierarchy
LocalTripleDocumentWithRef
Index
Properties
Properties
addSubject
• addSubject: function
Inherited from void
Add a Subject — note that it is not written to the Pod until you call save.
returns
A TripleSubject instance that can be used to define its properties.
Type declaration:
▸ (options?
: NewSubjectOptions): TripleSubject
Parameters:
Name | Type | Description |
---|---|---|
options? | NewSubjectOptions | By default, Tripledoc will automatically generate an identifier with which this Subject can be identified within the Document, and which is likely to be unique. The options parameter has a number of optional properties. The first, identifier , takes a string. If set, Tripledoc will not automatically generate an identifier. Instead, the value of this parameter will be used as the Subject's identifier. The second optional parameter, identifierPrefix , is also a string. If set, it will be prepended before this Subject's identifier, whether that's autogenerated or not. |
asRef
• asRef: function
returns
The IRI of this Document.
Type declaration:
▸ (): Reference
save
• save: function
Inherited from LocalTripleDocumentForContainer.save
Persist Subjects in this Document to the Pod.
returns
The updated Document with persisted Subjects.
Type declaration:
▸ (subjects?
: TripleSubject[]): Promise‹TripleDocument›
Parameters:
Name | Type | Description |
---|---|---|
subjects? | TripleSubject[] | Optional array of specific Subjects within this Document that should be written to the Pod, i.e. excluding Subjects not in this array. |