-
Notifications
You must be signed in to change notification settings - Fork 9
ResourceRelationshipDatastore.nucleus
Kind: global class
-
NucleusResourceRelationshipDatastore
- new NucleusResourceRelationshipDatastore($datastore)
-
.createRelationshipBetweenSubjectAndObject(subject, predicate, object) ⇒
Promise.<void>
-
.removeRelationshipBetweenSubjectAndObject(subject, predicate, object) ⇒
Promise
-
.removeAllRelationshipsToVector(vector) ⇒
Promise
-
.retrieveAllRelationshipsForSubject(subject) ⇒
Promise.<{predicate: String, object: Node}>
-
.retrieveAllNodesByTypeForAnchorNode(nodeType, anchorNode) ⇒
Promise.<Array.<Node>>
-
.retrieveObjectOfRelationshipWithSubject(subject, predicate) ⇒
Promise.<Array>
-
.retrieveSubjectOfRelationshipWithObject(object, predicate) ⇒
Promise.<Array>
-
.parseNode(node) ⇒
Object
-
.validateVectorFormat(vector) ⇒
Boolean
Creates a resource relationship datastore. The constructor returns a Proxy that interfaces the class and a Promise that resolves once the server is connected.
Param | Type |
---|---|
$datastore | NucleusDatastore |
nucleusResourceRelationshipDatastore.createRelationshipBetweenSubjectAndObject(subject, predicate, object) ⇒ Promise.<void>
Creates a relationship between the subject and the object.
Kind: instance method of NucleusResourceRelationshipDatastore
Param | Type |
---|---|
subject | String |
predicate | String |
object | String |
nucleusResourceRelationshipDatastore.removeRelationshipBetweenSubjectAndObject(subject, predicate, object) ⇒ Promise
Removes a relationship between a subject and an object.
Kind: instance method of NucleusResourceRelationshipDatastore
Param | Type |
---|---|
subject |
String | Node
|
predicate |
String | Node
|
object |
String | Node
|
Removes all relationship to the vector.
Kind: instance method of NucleusResourceRelationshipDatastore
Param | Type |
---|---|
vector |
String | Node
|
nucleusResourceRelationshipDatastore.retrieveAllRelationshipsForSubject(subject) ⇒ Promise.<{predicate: String, object: Node}>
Retrieves all the relationship for a given subject node.
Kind: instance method of NucleusResourceRelationshipDatastore
Param | Type |
---|---|
subject |
String | Node | Array.<String> | Array.<Node>
|
nucleusResourceRelationshipDatastore.retrieveAllNodesByTypeForAnchorNode(nodeType, anchorNode) ⇒ Promise.<Array.<Node>>
Retrieves all nodes by type for an anchor node given its ID.
Kind: instance method of NucleusResourceRelationshipDatastore
Param | Type |
---|---|
nodeType | String |
anchorNode |
String | Node
|
nucleusResourceRelationshipDatastore.retrieveObjectOfRelationshipWithSubject(subject, predicate) ⇒ Promise.<Array>
Retrieves the object of a subject's relationship.
Kind: instance method of NucleusResourceRelationshipDatastore
Param | Type |
---|---|
subject | String |
predicate | String |
nucleusResourceRelationshipDatastore.retrieveSubjectOfRelationshipWithObject(object, predicate) ⇒ Promise.<Array>
Retrieves the subject of an object's relationship.
Kind: instance method of NucleusResourceRelationshipDatastore
Param | Type |
---|---|
object | String |
predicate | String |
Parses a string node to an object node.
Kind: instance method of NucleusResourceRelationshipDatastore
Param | Type |
---|---|
node | String |
Validates that a vector is a resource type and a resource ID.
Kind: instance method of NucleusResourceRelationshipDatastore
Param | Type |
---|---|
vector | String |