qisdk / com.aldebaran.qi.sdk.object.knowledge / KnowledgeBase

KnowledgeBase

interface KnowledgeBase

Object allowing to read data from given named graphs.

Since
2

Types

Async

interface Async

Functions

async

abstract fun async(): Async!

contains

Check whether or not there exist at least one triple matching a query. tripleQuery The query which should be match by at least one triple.

abstract fun contains(triple: Triple!, graphName: String!): Boolean!

queryLocalizedObjects

Search for the Objects of triples matching the pattern subject-predicate.

abstract fun queryLocalizedObjects(subject: ResourceNode!, predicate: ResourceNode!, language: Locale!, graphName: String!): MutableList<Node!>!

queryMetaNode

Each node of a triple is linked to a single unique node, called meta node. This function returns The meta node of all triples matching a query. You can use the name of the meta node to add and read data about a triple by calling the functions such add, remove, query. Example: add(^queryMeta(user1, eat, pizza), mood, happy)

abstract fun queryMetaNode(triple: Triple!, graphName: String!): ResourceNode!

queryObjects

Search for the Objects of triples matching the pattern subject-predicate.

abstract fun queryObjects(subject: ResourceNode!, predicate: ResourceNode!, graphName: String!): MutableList<Node!>!

queryPredicates

Search for the predicates of triples matching the pattern subject-Object.

abstract fun queryPredicates(subject: ResourceNode!, Object: Node!, graphName: String!): MutableList<ResourceNode!>!

querySubjects

Search for the subjects of triples matching the pattern predicate-Object.

abstract fun querySubjects(predicate: ResourceNode!, Object: Node!, graphName: String!): MutableList<ResourceNode!>!

queryTripleFromMetaNode

Return The triple corresponding to the given meta node.

abstract fun queryTripleFromMetaNode(meta: ResourceNode!, graphName: String!): Triple!

queryTriples

Find all the triples matching the triple.

abstract fun queryTriples(triple: Triple!, graphName: String!): MutableList<Triple!>!

subscribe

Create a knowledgeSubscriber which emit a signal each time a triple matching the Triple is added or removed in the graph named graphName.

abstract fun subscribe(triple: Triple!, graphName: String!): KnowledgeSubscriber!