-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial import of common-lisp.net subversion repo
- Loading branch information
Showing
10 changed files
with
464 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
cl-neo4j | ||
|
||
Copyright (c) 2010 Kevin Raison <raison@chatsubo.net> | ||
|
||
Permission is hereby granted, free of charge, to any person | ||
obtaining a copy of this software and associated documentation | ||
files (the "Software"), to deal in the Software without | ||
restriction, including without limitation the rights to use, | ||
copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the | ||
Software is furnished to do so, subject to the following | ||
conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
TODO. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
(in-package #:cl-user) | ||
|
||
(defpackage #:cl-neo4j | ||
(:use #:cl | ||
#:json | ||
#:json-rpc | ||
#:drakma) | ||
(:export #:do-neo4j-query | ||
#:get-node | ||
#:extract-node-id | ||
#:create-node | ||
#:set-node-properties | ||
#:get-node-properties | ||
#:del-node-properties | ||
#:set-node-property | ||
#:get-node-property | ||
#:del-node-property | ||
#:delete-node | ||
#:create-relationship | ||
#:set-relationship-properties | ||
#:get-relationship-properties | ||
#:del-relationship-properties | ||
#:set-relationship-property | ||
#:get-relationship-property | ||
#:del-relationship-property | ||
#:delete-relationship | ||
#:get-node-relationships | ||
#:list-indices | ||
#:add-to-index | ||
#:remove-from-index | ||
#:query-index | ||
#:traverse | ||
;; Vars | ||
#:*neo4j-host* | ||
#:*neo4j-port* | ||
#:*use-structs* | ||
;; Node struct | ||
#:neo-node? | ||
#:neo-node-self-url | ||
#:neo-node-id | ||
)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
;; ASDF package description for cl-neo4j -*- Lisp -*- | ||
|
||
(defpackage :cl-neo4j-system (:use :cl :asdf)) | ||
(in-package :cl-neo4j-system) | ||
|
||
(defsystem cl-neo4j | ||
:name "neo4j RESTful Client Interface ()" | ||
:maintainer "Kevin Raison" | ||
:author "Kevin Raison <last name @ chatsubo dot net>" | ||
:version "0.2" | ||
:description "neo4j RESTful Client Interface" | ||
:long-description "neo4j RESTful Client Interface." | ||
:depends-on (:drakma | ||
:cl-ppcre | ||
:cl-json) | ||
:components ((:file "cl-neo4j-package") | ||
(:file "globals" :depends-on ("cl-neo4j-package")) | ||
(:file "utilities" :depends-on ("globals")) | ||
(:file "conditions" :depends-on ("utilities")) | ||
(:file "struct" :depends-on ("conditions")) | ||
(:file "neo4j" :depends-on ("conditions" "struct")) | ||
(:file "struct-methods" :depends-on ("neo4j")))) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
(in-package #:cl-neo4j) | ||
|
||
(define-condition unknown-return-type-error (error) | ||
((uri :accessor uri :initarg :uri) | ||
(property :accessor property :initarg :property) | ||
(status :accessor status :initarg :status)) | ||
(:report (lambda (condition stream) | ||
(format stream "Unknown status ~A returned for ~A (~A)" | ||
(status condition) (uri condition) (property condition))))) | ||
|
||
(define-condition invalid-data-sent-error (error) | ||
((json :accessor json :initarg :json) | ||
(uri :accessor uri :initarg :uri)) | ||
(:report (lambda (condition stream) | ||
(format stream "Invalid data sent to ~A: ~A" (uri condition) (json condition))))) | ||
|
||
(define-condition node-not-found-error (error) | ||
((uri :accessor uri :initarg :uri) | ||
(property :accessor property :initarg :property)) | ||
(:report (lambda (condition stream) | ||
(if (slot-boundp condition 'property) | ||
(format stream "Property ~A not found for node ~A" | ||
(property condition) (uri condition)) | ||
(format stream "Node not found ~A" (uri condition)))))) | ||
|
||
(define-condition unable-to-delete-node-error (error) | ||
((uri :accessor uri :initarg :uri)) | ||
(:report (lambda (condition stream) | ||
(format stream "Unable to delete node ~A. Still has relationships?" (uri condition))))) | ||
|
||
(define-condition relationship-not-found-error (error) | ||
((uri :accessor uri :initarg :uri) | ||
(property :accessor property :initarg :property)) | ||
(:report (lambda (condition stream) | ||
(if (slot-boundp condition 'property) | ||
(format stream "Property ~A not found for relationship ~A" | ||
(property condition) (uri condition)) | ||
(format stream "Relationship not found ~A" (uri condition)))))) | ||
|
||
(define-condition index-entry-not-found-error (error) | ||
((uri :accessor uri :initarg :uri)) | ||
(:report (lambda (condition stream) | ||
(format stream "Index entry not found ~A" (uri condition))))) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
(in-package #:cl-neo4j) | ||
|
||
(defparameter *use-structs* nil) | ||
(defvar *neo4j-host* "localhost") | ||
(defvar *neo4j-port* 9999) |
Oops, something went wrong.