Liking cljdoc? Tell your friends :D

kee.units


add-partitionclj

(add-partition kb partition-id partition-doc)

Create a new knowledge partition identified by partition id (a namedspaced key e.g. :synergy/test1) in the specified knowledgebase kb (a crux database)

Create a new knowledge partition identified by partition id (a namedspaced key e.g. :synergy/test1)
in the specified knowledgebase kb (a crux database)
raw docstring

add-relationshipclj

(add-relationship kb from-unit-vec to-unit-key)
(add-relationship kb from-unit-vec to-unit-key only-update-to)

Add relationship from from-unit to to-unit. From unit is defined as a vector [unit-key slot-id] (e.g. [:unit-instance/emily :person/pets] and to-unit is defined by a namespaced key, e.g. :animal/pearl-cat If a reverse relationship slot is defined, add it. If the parameter only-update-to is set to true, then don't generate/save changes to the from unit. The operation is in a knowledgebase kb (a crux database)

Add relationship from from-unit to to-unit. From unit is defined as a vector [unit-key slot-id] (e.g.
[:unit-instance/emily :person/pets] and to-unit is defined by a namespaced key, e.g. :animal/pearl-cat
If a reverse relationship slot is defined, add it. If the parameter only-update-to is set to true,
then don't generate/save changes to the from unit. The operation is in a knowledgebase kb (a crux database)
raw docstring

add-slot-defclj

(add-slot-def kb unit-name new-slot-def)

Add a slot to a unit denoted by unit-name defined in a standard ::ks/unit-slot map (e.g. {::ks/slot-name :animal/tail-colour ::ks/slot-doc "Colour of tail" ::ks/slot-max-cardinality 1 ::ks/slot-type :string ::ks/slot-active true}) in parameter new-slot-def in knowledgebase kb (a crux database).

Add a slot to a unit denoted by unit-name defined in a standard ::ks/unit-slot map (e.g.
{::ks/slot-name :animal/tail-colour
 ::ks/slot-doc "Colour of tail"
 ::ks/slot-max-cardinality 1
 ::ks/slot-type  :string
 ::ks/slot-active true})
in parameter new-slot-def in knowledgebase kb (a crux database).
raw docstring

add-unitclj

(add-unit kb unit-content)
(add-unit kb unit-content partitions)

Add the unit defined in a map unit-content to the knowledgebase kb (a crux database), applying checks. If a vector of partition keys (e.g. [:synergy/animals :synergy/pets] is provided as a third argument, add the unit to those partitions

Add the unit defined in a map unit-content to the knowledgebase kb (a crux database), applying checks.
If a vector of partition keys (e.g. [:synergy/animals :synergy/pets] is provided as a third argument,
add the unit to those partitions
raw docstring

add-unit-to-partitionclj

(add-unit-to-partition kb unit-key partition-key)

In the knowledgebase kb (a crux database), add the unit instance identified by unit-key (e.g. :unit-instance/emily) to the partition identified by partition-key (e.g. :synergy/users)

In the knowledgebase kb (a crux database), add the unit instance identified by unit-key (e.g. :unit-instance/emily)
to the partition identified by partition-key (e.g. :synergy/users)
raw docstring

def-unitclj

(def-unit kb unit-definition)

Create a new unit definition defined in the map unit-definition in the knowledgebase kb (which is a crux database), carrying out appropriate pre-save checks

Create a new unit definition defined in the map unit-definition in the knowledgebase kb (which is a crux database),
carrying out appropriate pre-save checks
raw docstring

delete-slot-defclj

(delete-slot-def kb unit-name slot-details)

In a knowledgebase kb (a crux databse) delete a slot from a unit-def denoted by unit-name (e.g. :unit-def/person)

  • slot-details is a map with :slot-name as the slot to be deleted, and :action being either :list or :delete (default :list)
  • :list lists all affected instances without removing the slot def, :delete updates all affected instances by removing the slot value. Exmaple of slot-details {:slot-name :person/eye-colour :action delete}
In a knowledgebase kb (a crux databse) delete a slot from a unit-def denoted by unit-name (e.g. :unit-def/person)
- slot-details is a map with :slot-name as the slot to be deleted, and :action being either :list or :delete (default :list)
- :list lists all affected instances without removing the slot def, :delete updates all affected instances by removing
the slot value. Exmaple of slot-details {:slot-name :person/eye-colour :action delete}
raw docstring

delete-unitclj

(delete-unit kb unit-key)

Delete a unit identified by unit-key (e.g. :unit-instance/emily) from knowledgebase kb (a crux database) including relationships and partitions - assuming checks are satisfied

Delete a unit identified by unit-key (e.g. :unit-instance/emily) from knowledgebase kb (a crux database)
including relationships and partitions - assuming checks are satisfied
raw docstring

delete-unit-defclj

(delete-unit-def kb delete-params)

Delete a unit definition. Pass in kb (a crux database) to delete from and a map delete-params containing {:unit-def <unit-name> :delete-instances? true/false}. Example: {:unit-def/person :delete-instances? true} If the unit has any instances, the :delete-instances? flag must be true. If however this flag is set to true, then deletion only takes place if this does not break any relationship cardinality constraints for linked units

Delete a unit definition. Pass in kb (a crux database) to delete from and a map delete-params containing
{:unit-def <unit-name> :delete-instances? true/false}. Example: {:unit-def/person :delete-instances? true}
If the unit has any instances, the :delete-instances? flag must be true. If however this flag is set to true, then
deletion only takes place if this does not break any relationship cardinality constraints for linked units
raw docstring

disableSynergyEventsclj

(disableSynergyEvents)

Stop this instance of SynergyKEE publishing events.

Stop this instance of SynergyKEE publishing events.
raw docstring

enableSynergyEventsclj

(enableSynergyEvents)

Enable this instance of SynergyKEE to publish events as the knowledgebase is updated. Requires pre-requisites to be set

Enable this instance of SynergyKEE to publish events as the knowledgebase is updated. Requires pre-requisites to be set
raw docstring

eventArchitectureEnabledclj


eventIdentificationclj


get-kb-infoclj

(get-kb-info kb)

Get the knowledge identification info from a given knowledgebase kb (a crux database)

Get the knowledge identification info from a given knowledgebase kb (a crux database)
raw docstring

get-partitionclj

(get-partition kb partition-key)

Get partition info for the partition identified by a namespaced partition-key (e.g. :synergy/test1) in given knowledgebase kb (a crux database)

Get partition info for the partition identified by a namespaced partition-key (e.g. :synergy/test1) in given
knowledgebase kb (a crux database)
raw docstring

get-partitionsclj

(get-partitions kb)

List all knowledge partitions in a given knowledgebase, identified by kb (a crux database)

List all knowledge partitions in a given knowledgebase, identified by kb (a crux database)
raw docstring

get-unit-defclj

(get-unit-def kb unit-key)

Find unit definition for unit x identified by unit-key (:unit-def/x) in knowledgebase kb (a crux database)

Find unit definition for unit x identified by unit-key (:unit-def/x) in knowledgebase kb (a crux database)
raw docstring

get-unit-instanceclj

(get-unit-instance kb unit-key)

Find and return the unit instance x identified by :unit-instance/x in knowledgebase kb (a crux database)

Find and return the unit instance x identified by :unit-instance/x in knowledgebase kb (a crux database)
raw docstring

get-unit-instancesclj

(get-unit-instances kb instance-type)

Get all instances of unit x identified by instance-type :unit-def/x in knowledgebase kb

Get all instances of unit x identified by instance-type :unit-def/x in knowledgebase kb
raw docstring

get-units-in-kbclj

(get-units-in-kb kb unit-type)

List all units in a given knowledgebase. unit-type parameter should be :unit/definition or :unit/instance

List all units in a given knowledgebase. unit-type parameter should be :unit/definition or :unit/instance
raw docstring

get-units-in-partitionclj

(get-units-in-partition kb partition-key)

List all units in a given partition (identified by a namespaced partition-key, e.g. :synergy/test1) in a given knowledgebase kb (a crux database)

List all units in a given partition (identified by a namespaced partition-key, e.g. :synergy/test1)
in a given knowledgebase kb (a crux database)
raw docstring

kb?clj

(kb? kb)

Is this crux database identified by kb a knowledgebase?

Is this crux database identified by kb a knowledgebase?
raw docstring

load-unit-defsclj

(load-unit-defs kb filename)

Load the unit definitions in the file identified by filename into a knowledgebase kb (a crux database). The unit definition is an array of maps. This function is generally for use at the REPL

Load the unit definitions in the file identified by filename into a knowledgebase kb (a crux database).
The unit definition is an array of maps. This function is generally for use at the REPL
raw docstring

load-unit-defs-from-s3clj

(load-unit-defs-from-s3 s3client kb bucket-name filename)

Load the unit definitions in the file identified by bucketname/filename from S3 into a knowledgebase kb (a crux database). The unit definition is an array of maps.

Load the unit definitions in the file identified by bucketname/filename from S3 into a knowledgebase kb (a crux database).
The unit definition is an array of maps.
raw docstring

load-unit-instancesclj

(load-unit-instances kb filename)
(load-unit-instances kb filename partitions)

Load the unit values in the file identified by filename into knowledgebase kb (a crux database). Unit values are stored as an array of maps. If a an array of partition names (e.g. [:synergy/animals :synergy/cats]) is supplied, the units will be added into those partitions

Load the unit values in the file identified by filename into knowledgebase kb (a crux database).
Unit values are stored as an array of maps. If a an array of partition names (e.g. [:synergy/animals :synergy/cats])
is supplied, the units will be added into those partitions
raw docstring

partition?clj

(partition? kb partition-key)

Check whether a partition identified by a given namespaced key (e.g. :synergy/test1) exists in the supplied knowledgebase kb (a crux database)

Check whether a partition identified by a given namespaced key (e.g. :synergy/test1) exists in the supplied knowledgebase kb
(a crux database)
raw docstring

remove-partitionclj

(remove-partition kb partition-key)

Remove a partition identified by partition-key (e.g. :synergy/animals) from the knowledgebase kb (a crux database), and remove all references to that partition from unit instances in that knowledgebase

Remove a partition identified by partition-key (e.g. :synergy/animals) from the knowledgebase kb (a crux database),
and remove all references to that partition from unit instances in that knowledgebase
raw docstring

remove-relationshipclj

(remove-relationship kb from-unit-vec to-unit-key)

Remove the relationship between from-unit and to-unit. From unit is defined as a vector [unit-key slot-id] (e.g. [:unit-instance/emily :person/pets] and to-unit is defined by a namespaced key, e.g. :animal/pearl-cat The operation is in a knowledgebase kb (a crux database)

Remove the relationship between from-unit and to-unit. From unit is defined as a vector [unit-key slot-id] (e.g.
[:unit-instance/emily :person/pets] and to-unit is defined by a namespaced key, e.g. :animal/pearl-cat
The operation is in a knowledgebase kb (a crux database)
raw docstring

remove-unit-from-partitionclj

(remove-unit-from-partition kb unit-key partition-key)

In the knowledgebase kb (a crux database), remove the unit instance identified by unit-key (e.g. :unit-instance/emily) from the partition identified by partition-key (e.g. :synergy/users)

In the knowledgebase kb (a crux database), remove the unit instance identified by unit-key (e.g. :unit-instance/emily)
from the partition identified by partition-key (e.g. :synergy/users)
raw docstring

routerArnclj


routerTopicclj


set-kb-infoclj

(set-kb-info kb kb-name kb-doc)

Set up a Crux database identified by kb as a SynergyKEE knowledgebase. Assign a knowledgebase UUID and set the :kb-name and :kb-doc values according to the values passed in

Set up a Crux database identified by kb as a SynergyKEE knowledgebase. Assign a knowledgebase UUID and set
the :kb-name and :kb-doc values according to the values passed in
raw docstring

setupAWSclientsclj

(setupAWSclients)

Set up the AWS clients (SSM and SNS) for this SynergyKEE instance. Requires AWS credentials to be appropriately set

Set up the AWS clients (SSM and SNS) for this SynergyKEE instance. Requires AWS credentials to be appropriately set
raw docstring

setupForAWSclj

(setupForAWS thisSSMclient keeTopic)

Set up the atoms that hold the SNS topic and ARN prefixes necessary for this SynergyKEE instance to publish events. Use the SSM client identified by thisSSMclient to retrieve details, set the KEE topic to the value passed in as keeTopic

Set up the atoms that hold the SNS topic and ARN prefixes necessary for this SynergyKEE instance to publish events.
Use the SSM client identified by thisSSMclient to retrieve details, set the KEE topic to the value passed in as keeTopic
raw docstring

snsClientclj


ssmClientclj


update-kb-infoclj

(update-kb-info kb kb-info)

Update name and description for a given knowledgebase identified by kb (a crux database). Pass in a map of {:kb-name X :kb-doc Y}

Update name and description for a given knowledgebase identified by kb (a crux database).
Pass in a map of {:kb-name X :kb-doc Y}
raw docstring

update-partition-descriptionclj

(update-partition-description kb partition-key partition-doc)

Update description for a given partition identified by partition key (e.g. :synergy/test1) in the knowledgebase kb (a crux database). Pass in the new description in partition-doc

Update description for a given partition identified by partition key (e.g. :synergy/test1) in the knowledgebase
kb (a crux database). Pass in the new description in partition-doc
raw docstring

update-unit-slotsclj

(update-unit-slots kb unit-key unit-slot-map)

In the knowledgebase kb (a crux database), update the unit identified by unit-key (e.g. :unit-instance/emily) the values contained in slot-map (e.g. { :animal/fur-colour ["brown"] :animal/eye-colour ["blue"] } Mo relationships or partition updates permitted, checks are carried out

In the knowledgebase kb (a crux database), update the unit identified by unit-key (e.g. :unit-instance/emily) the values
contained in slot-map (e.g. { :animal/fur-colour ["brown"] :animal/eye-colour ["blue"] }
Mo relationships or partition updates permitted, checks are carried out
raw docstring

updateEventIdentificationclj

(updateEventIdentification userId orgId eventVersion)

Set the userId, orgId and eventVersion used when publishing events from this SynergyKEE instance

Set the userId, orgId and eventVersion used when publishing events from this SynergyKEE instance
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close