clojurewerkz.neocons.rest.labels

Operations on labels (Neo4J 2.0+)

add

(add connection node labels)
Adds a string label or a list of labels (string or keyword) to a node.
See http://docs.neo4j.org/chunked/milestone/rest-api-node-labels.html#rest-api-adding-a-label-to-a-node

get-all-labels

(get-all-labels connection)(get-all-labels connection node)
This function gets all labels in the database if no argument is passed.
If a node is passed, then it returns all the labels associated with the node.

See http://docs.neo4j.org/chunked/milestone/rest-api-node-labels.html#rest-api-listing-labels-for-a-node
and http://docs.neo4j.org/chunked/milestone/rest-api-node-labels.html#rest-api-list-all-labels

get-all-nodes

(get-all-nodes connection label)(get-all-nodes connection label prop-name prop-value)
This returns all the nodes which have a particular label.
See http://docs.neo4j.org/chunked/milestone/rest-api-node-labels.html#rest-api-get-all-nodes-with-a-label

You can also pass a property name and value you want to filter the nodes on.
See http://docs.neo4j.org/chunked/milestone/rest-api-node-labels.html#rest-api-get-nodes-by-label-and-property

remove

(remove connection node label)

replace

(replace connection node labels)
This removes any existing labels for the node and adds the labels passes to the function.
See http://docs.neo4j.org/chunked/milestone/rest-api-node-labels.html#rest-api-replacing-labels-on-a-node