Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Satisfying my control-freakishness by renaming some files and adding …

…an src dir.
  • Loading branch information...
commit 966bfc46c4d1548a9aec45d54426ebae68ce051c 1 parent 7930a6a
@freiksenet freiksenet authored
View
16 cl-neo4j.asd
@@ -15,10 +15,12 @@
: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"))))
+ :components
+ ((:module "src"
+ :serial t
+ :components
+ ((:file "package")
+ (:file "globals")
+ (:file "utilities")
+ (:file "conditions")
+ (:file "restapi")))))
View
0  conditions.lisp → src/conditions.lisp
File renamed without changes
View
0  globals.lisp → src/globals.lisp
File renamed without changes
View
0  cl-neo4j-package.lisp → src/package.lisp
File renamed without changes
View
0  neo4j.lisp → src/restapi.lisp
File renamed without changes
View
0  utilities.lisp → src/utilities.lisp
File renamed without changes
View
2  struct-methods.lisp
@@ -1,2 +0,0 @@
-(in-package #:cl-neo4j)
-
View
55 struct.lisp
@@ -1,55 +0,0 @@
-(in-package #:cl-neo4j)
-
-(defun extract-node-id (url)
- "http://localhost:9999/node/1"
- (subseq url (1+ (search "/" url :from-end t))))
-
-(defun print-neo-relationship (r s d)
- (declare (ignore d))
- (format s "#<NEO-RELATIONSHIP ~A>" (neo-relationship-self-url r)))
-
-(defstruct (neo-relationship
- (:print-function print-neo-relationship)
- (:predicate neo-relationship?))
- id self-url)
-
-(defun translate-to-neo-relationship-struct (relationship-as-list)
- )
-
-(defun make-neo-relationship-from-octets (octets)
- (let ((relationship (decode-json-from-string (map 'string #'code-char octets))))
- (if *use-structs*
- (translate-to-neo-relationship-struct relationship)
- relationship)))
-
-(defun print-neo-node (n s d)
- (declare (ignore d))
- (format s "#<NEO-NODE-~A ~A>" (neo-node-id n) (neo-node-self-url n)))
-
-(defstruct (neo-node
- (:print-function print-neo-node)
- (:predicate neo-node?))
- id self-url incoming-relationships-url outgoing-relationship-url properties-hash)
-
-(defun translate-to-neo-node-struct (node-as-list)
- (let ((node
- (make-neo-node :id (extract-node-id (cdr (assoc :self node-as-list)))
- :self-url (cdr (assoc :self node-as-list))
- :incoming-relationships-url
- (cdr (assoc :|INCOMING RELATIONSHIPS| node-as-list))
- :outgoing-relationship-url
- (cdr (assoc :|OUTGOING RELATIONSHIPS| node-as-list))
- :properties-hash (make-hash-table))))
- (dolist (prop (cdr (assoc :data node-as-list)))
- (setf (gethash (car prop) (neo-node-properties-hash node)) (cdr prop)))
- node))
-
-(defun make-neo-node-from-octets (octets)
- (let ((node (decode-json-from-string (map 'string #'code-char octets))))
- (if *use-structs*
- (translate-to-neo-node-struct node)
- node)))
-
-(defmethod node-property ((node neo-node) key)
- (gethash key (neo-node-properties-hash node)))
-

0 comments on commit 966bfc4

Please sign in to comment.
Something went wrong with that request. Please try again.