Liking cljdoc? Tell your friends :D

naga.data

Converts external data into a graph format (triples).

Converts external data into a graph format (triples).
raw docstring

*current-storage*clj

source

build-listclj

(build-list store pairs)

Inputs: [store :- Storage pairs :- [[s/Keyword s/Any]]] Returns: [s/Any]

Takes property/value pairs and if they represent a list node, returns the list. else, nil.

Inputs: [store :- Storage pairs :- [[s/Keyword s/Any]]]
Returns: [s/Any]

Takes property/value pairs and if they represent a list node, returns the list.
 else, nil.
sourceraw docstring

check-structureclj

(check-structure store prop v)

Inputs: [store :- Storage prop :- s/Any v :- s/Any] Returns: (s/maybe [[s/Keyword s/Any]])

Determines if a value represents a structure. If so, return the property/values for it. Otherwise, return nil.

Inputs: [store :- Storage prop :- s/Any v :- s/Any]
Returns: (s/maybe [[s/Keyword s/Any]])

Determines if a value represents a structure. If so, return the property/values for it.
 Otherwise, return nil.
sourceraw docstring

containership-triplesclj

(containership-triples node triples)

Inputs: [node :- s/Any triples :- [Triple]]

Finds the list of entity nodes referred to in a list and builds triples describing a flat 'contains' property

Inputs: [node :- s/Any triples :- [Triple]]

Finds the list of entity nodes referred to in a list and builds
 triples describing a flat 'contains' property
sourceraw docstring

get-naga-firstclj

(get-naga-first struct)

Finds the naga/first property in a map, and gets the value.

Finds the naga/first property in a map, and gets the value.
sourceraw docstring

id->jsonclj

(id->json store entity-id)

Inputs: [store :- Storage entity-id :- s/Any] Returns: {s/Keyword s/Any}

Uses an id node to load up a nested data structure from the graph

Inputs: [store :- Storage entity-id :- s/Any]
Returns: {s/Keyword s/Any}

Uses an id node to load up a nested data structure from the graph
sourceraw docstring

ident->jsonclj

(ident->json store ident)

Inputs: [store :- Storage ident :- s/Any] Returns: {s/Keyword s/Any}

Converts data in a database to data structures suitable for JSON encoding

Inputs: [store :- Storage ident :- s/Any]
Returns: {s/Keyword s/Any}

Converts data in a database to data structures suitable for JSON encoding
sourceraw docstring

ident-map->triplesclj

(ident-map->triples j)

Inputs: [j] Returns: [s/Any [Triple]]

Converts a single map to triples for an ID'ed map

Inputs: [j]
Returns: [s/Any [Triple]]

Converts a single map to triples for an ID'ed map
sourceraw docstring

json->triplesclj

(json->triples storage j)

Inputs: [storage j] Returns: [Triple]

Converts parsed JSON into a sequence of triples for a provided storage.

Inputs: [storage j]
Returns: [Triple]

Converts parsed JSON into a sequence of triples for a provided storage.
sourceraw docstring

list-triplesclj

(list-triples [v & vs :as vlist])

Inputs: [[v & vs :as vlist]]

Creates the triples for a list

Inputs: [[v & vs :as vlist]]

Creates the triples for a list
sourceraw docstring

map->triplesclj

(map->triples data)

Inputs: [data :- {s/Keyword s/Any}] Returns: [s/Any [Triple]]

Converts a single map to triples. Returns a pair of the map's ID and the triples for the map.

Inputs: [data :- {s/Keyword s/Any}]
Returns: [s/Any [Triple]]

Converts a single map to triples. Returns a pair of the map's ID and the triples for the map.
sourceraw docstring

name-forclj

(name-for id)

Inputs: [id :- s/Any]

Convert an id (probably a number) to a keyword for identification

Inputs: [id :- s/Any]

Convert an id (probably a number) to a keyword for identification
sourceraw docstring

pairs->jsonclj

(pairs->json store prop-vals)

Inputs: [store :- Storage prop-vals :- [[s/Keyword s/Any]]] Returns: {s/Keyword s/Any}

Uses a set of property-value pairs to load up a nested data structure from the graph

Inputs: [store :- Storage prop-vals :- [[s/Keyword s/Any]]]
Returns: {s/Keyword s/Any}

Uses a set of property-value pairs to load up a nested data structure from the graph
sourceraw docstring

property-valsclj

(property-vals entity-id [property value])

Inputs: [entity-id :- s/Any [property value] :- [s/Keyword s/Any]] Returns: [Triple]

Takes a property-value pair associated with an entity, and builds triples around it

Inputs: [entity-id :- s/Any [property value] :- [s/Keyword s/Any]]
Returns: [Triple]

Takes a property-value pair associated with an entity,
 and builds triples around it
sourceraw docstring

property-valuesclj

(property-values store entity)

Inputs: [store :- Storage entity :- s/Any] Returns: [[s/Keyword s/Any]]

Return all the property/value pairs for a given entity in the store.

Inputs: [store :- Storage entity :- s/Any]
Returns: [[s/Keyword s/Any]]

Return all the property/value pairs for a given entity in the store.
sourceraw docstring

recurse-nodeclj

(recurse-node store [prop v :as prop-val])

Inputs: [store :- Storage [prop v :as prop-val] :- [s/Keyword s/Any]] Returns: s/Any

Determines if the val of a map entry is a node to be recursed on, and loads if necessary

Inputs: [store :- Storage [prop v :as prop-val] :- [s/Keyword s/Any]]
Returns: s/Any

Determines if the val of a map entry is a node to be recursed on, and loads if necessary
sourceraw docstring

store->jsonclj

(store->json store)

Inputs: [store :- Storage] Returns: [{s/Keyword s/Any}]

Pulls all top level JSON out of a store

Inputs: [store :- Storage]
Returns: [{s/Keyword s/Any}]

Pulls all top level JSON out of a store
sourceraw docstring

store->strclj

(store->str store)

Inputs: [store :- Storage] Returns: s/Str

Reads a store into JSON strings

Inputs: [store :- Storage]
Returns: s/Str

Reads a store into JSON strings
sourceraw docstring

stream->triplesclj

(stream->triples storage io)

Inputs: [storage io] Returns: [Triple]

Converts a stream to triples relevant to a store

Inputs: [storage io]
Returns: [Triple]

Converts a stream to triples relevant to a store
sourceraw docstring

string->triplesclj

(string->triples storage s)

Inputs: [storage :- Storage s :- s/Str] Returns: [Triple]

Converts a string to triples relevant to a store

Inputs: [storage :- Storage s :- s/Str]
Returns: [Triple]

Converts a string to triples relevant to a store
sourceraw docstring

Tripleclj

source

value-triplescljmultimethod

Converts a value into a list of triples. Return the entity ID of the data coupled with the sequence of triples. NOTE: This may need to be dispatched to storage. e.g. Datomic could use properties to determine how to encode data.

Converts a value into a list of triples.
Return the entity ID of the data coupled with the sequence of triples.
NOTE: This may need to be dispatched to storage.
      e.g. Datomic could use properties to determine how to encode data.
sourceraw docstring

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

× close