renaim domain namespaces to db

neo4j-4
Josha von Gizycki 5 years ago
parent f328e95f4e
commit b80f5f3c40

@ -1,4 +1,4 @@
(ns wanijo.attribute.domain (ns wanijo.attribute.db
(:require [clojure.spec.alpha :as spec] (:require [clojure.spec.alpha :as spec]
[wanijo.specs :as specs] [wanijo.specs :as specs]
[wanijo.framework.neo4j :as neo4j])) [wanijo.framework.neo4j :as neo4j]))

@ -4,10 +4,10 @@
[ring.util.response :as resp] [ring.util.response :as resp]
[formulare.core :as form] [formulare.core :as form]
[wanijo.framework.routing :refer [register! path]] [wanijo.framework.routing :refer [register! path]]
[wanijo.attribute.domain :as domain] [wanijo.attribute.db :as domain]
[wanijo.schema [wanijo.schema
[view :as schema-view] [view :as schema-view]
[domain :as schema-domain] [db :as schema-domain]
[routes :as schema-routes] [routes :as schema-routes]
[forms :as schema-forms] [forms :as schema-forms]
[middleware :as schema-middleware]])) [middleware :as schema-middleware]]))

@ -6,7 +6,7 @@
[hiccup.form :as hform] [hiccup.form :as hform]
[wanijo.framework.view :as view] [wanijo.framework.view :as view]
[wanijo.framework.routing :refer [register! path]] [wanijo.framework.routing :refer [register! path]]
[wanijo.user.domain :as user-domain])) [wanijo.user.db :as user-domain]))
(defn- login-check! [req] (defn- login-check! [req]
(let [{{:keys [uname pw]} :params} req (let [{{:keys [uname pw]} :params} req

@ -1,18 +0,0 @@
(ns wanijo.frontend.core
(:require
[reagent.core :as r]))
;; -------------------------
;; Views
(defn home-page []
[:div [:h2 "Welcome to Reagent ummf"]])
;; -------------------------
;; Initialize app
(defn mount-root []
(r/render [home-page] (.getElementById js/document "visualisation")))
(defn init! []
(mount-root))

@ -1,11 +1,11 @@
(ns wanijo.instance.domain (ns wanijo.instance.db
(:require [clojure.spec.alpha :as spec] (:require [clojure.spec.alpha :as spec]
[wanijo.specs :as specs] [wanijo.specs :as specs]
[wanijo.framework.neo4j :as neo4j] [wanijo.framework.neo4j :as neo4j]
[wanijo.schema.domain :as domain-schema] [wanijo.schema.db :as domain-schema]
[wanijo.attribute.domain :as domain-attr] [wanijo.attribute.db :as domain-attr]
[wanijo.tag.domain :as domain-tag] [wanijo.tag.db :as domain-tag]
[wanijo.link.domain :as domain-link])) [wanijo.link.db :as domain-link]))
(spec/def ::instance (spec/def ::instance
(spec/keys :req-un [::neo4j/uuid (spec/keys :req-un [::neo4j/uuid

@ -1,6 +1,6 @@
(ns wanijo.instance.forms (ns wanijo.instance.forms
(:require [wanijo.specs :as specs] (:require [wanijo.specs :as specs]
[wanijo.instance.domain :as domain])) [wanijo.instance.db :as domain]))
(def form (def form
{:fields {:name {:label "Name" {:fields {:name {:label "Name"

@ -5,14 +5,14 @@
[formulare.core :as form] [formulare.core :as form]
[wanijo.instance [wanijo.instance
[view :as view] [view :as view]
[domain :as domain] [db :as domain]
[forms :as forms-inst]] [forms :as forms-inst]]
[wanijo.schema [wanijo.schema
[domain :as domain-schema] [db :as domain-schema]
[middleware :as middleware-schema]] [middleware :as middleware-schema]]
[wanijo.link.domain :as domain-link] [wanijo.link.db :as domain-link]
[wanijo.framework.routing :refer [register! path]] [wanijo.framework.routing :refer [register! path]]
[wanijo.attribute.domain :as domain-attr])) [wanijo.attribute.db :as domain-attr]))
(defn list! [schema-uuid req] (defn list! [schema-uuid req]
(view/list! (domain-schema/find-by-uuid! schema-uuid) (view/list! (domain-schema/find-by-uuid! schema-uuid)

@ -6,7 +6,7 @@
[markdown.core :as md] [markdown.core :as md]
[formulare.core :as form] [formulare.core :as form]
[wanijo.tag.view :as view-tag] [wanijo.tag.view :as view-tag]
[wanijo.instance.domain :as domain] [wanijo.instance.db :as domain]
[wanijo.visualisation.viz :as viz] [wanijo.visualisation.viz :as viz]
[wanijo.framework [wanijo.framework
[view :as view] [view :as view]

@ -1,4 +1,4 @@
(ns wanijo.link.domain (ns wanijo.link.db
(:require [clojure.spec.alpha :as spec] (:require [clojure.spec.alpha :as spec]
[wanijo.specs :as specs] [wanijo.specs :as specs]
[wanijo.framework.neo4j :as neo4j])) [wanijo.framework.neo4j :as neo4j]))

@ -1,4 +1,4 @@
(ns wanijo.schema.domain (ns wanijo.schema.db
(:require [clojure.spec.alpha :as spec] (:require [clojure.spec.alpha :as spec]
[wanijo.specs :as specs] [wanijo.specs :as specs]
[wanijo.framework.neo4j :as neo4j])) [wanijo.framework.neo4j :as neo4j]))

@ -1,5 +1,5 @@
(ns wanijo.schema.forms (ns wanijo.schema.forms
(:require [wanijo.attribute.domain :as attr-domain] (:require [wanijo.attribute.db :as attr-domain]
[clojure.string :refer [capitalize]] [clojure.string :refer [capitalize]]
[clojure.spec.alpha :as spec])) [clojure.spec.alpha :as spec]))

@ -1,7 +1,7 @@
(ns wanijo.schema.middleware (ns wanijo.schema.middleware
(:require [ring.util.response :as resp] (:require [ring.util.response :as resp]
[wanijo.framework.routing :refer [path]] [wanijo.framework.routing :refer [path]]
[wanijo.schema.domain :as domain])) [wanijo.schema.db :as domain]))
(defn wrap-user-schemas [handler] (defn wrap-user-schemas [handler]
(fn [req] (fn [req]

@ -4,13 +4,13 @@
[formulare.core :as form] [formulare.core :as form]
[wanijo.framework.view :as view] [wanijo.framework.view :as view]
[wanijo.framework.routing :refer [register! path]] [wanijo.framework.routing :refer [register! path]]
[wanijo.user.domain :as domain-user] [wanijo.user.db :as domain-user]
[wanijo.schema [wanijo.schema
[view :as schema-view] [view :as schema-view]
[forms :as schema-forms] [forms :as schema-forms]
[domain :as domain] [db :as domain]
[middleware :as middleware]] [middleware :as middleware]]
[wanijo.attribute.domain :as domain-attr])) [wanijo.attribute.db :as domain-attr]))
(defn new! [req] (defn new! [req]
(if (form/valid? schema-forms/schema req) (if (form/valid? schema-forms/schema req)

@ -7,7 +7,7 @@
[wanijo.framework.view :as view] [wanijo.framework.view :as view]
[wanijo.framework.routing :refer [path]] [wanijo.framework.routing :refer [path]]
[wanijo.framework.time :refer [prettify-dt]] [wanijo.framework.time :refer [prettify-dt]]
[wanijo.schema.domain :as domain] [wanijo.schema.db :as domain]
[wanijo.schema.forms :as forms])) [wanijo.schema.forms :as forms]))
(defn overview! [req] (defn overview! [req]

@ -1,4 +1,4 @@
(ns wanijo.tag.domain (ns wanijo.tag.db
(:require [clojure.spec.alpha :as spec] (:require [clojure.spec.alpha :as spec]
[wanijo.specs :as specs] [wanijo.specs :as specs]
[wanijo.framework.neo4j :as neo4j])) [wanijo.framework.neo4j :as neo4j]))

@ -3,12 +3,12 @@
[ring.util.response :as resp] [ring.util.response :as resp]
[formulare.core :as form] [formulare.core :as form]
[wanijo.framework.routing :refer [register! path]] [wanijo.framework.routing :refer [register! path]]
[wanijo.schema.domain :as domain-schema] [wanijo.schema.db :as domain-schema]
[wanijo.instance [wanijo.instance
[view :as view-instance] [view :as view-instance]
[domain :as domain-instance]] [db :as domain-instance]]
[wanijo.tag [wanijo.tag
[domain :as domain] [db :as domain]
[forms :as forms]])) [forms :as forms]]))
(defn create-tag! [instance-uuid req] (defn create-tag! [instance-uuid req]

@ -1,4 +1,4 @@
(ns wanijo.user.domain (ns wanijo.user.db
(:require [clojure.spec.alpha :as spec] (:require [clojure.spec.alpha :as spec]
[wanijo.framework.neo4j :as neo4j])) [wanijo.framework.neo4j :as neo4j]))

@ -3,7 +3,7 @@
[ring.util.response :as resp] [ring.util.response :as resp]
[wanijo.framework.routing :refer [register!]] [wanijo.framework.routing :refer [register!]]
[wanijo.user.view :as view-user] [wanijo.user.view :as view-user]
[wanijo.user.domain :as domain])) [wanijo.user.db :as domain]))
(defroutes routes (defroutes routes
(GET (GET

@ -4,7 +4,7 @@
[formulare.core :as form] [formulare.core :as form]
[wanijo.framework.view :as view] [wanijo.framework.view :as view]
[wanijo.framework.routing :refer [path]] [wanijo.framework.routing :refer [path]]
[wanijo.user.domain :as domain])) [wanijo.user.db :as domain]))
(def edit-form (def edit-form
{:fields {:ident {:label "Ident" {:fields {:ident {:label "Ident"

@ -1,7 +1,7 @@
(ns wanijo.visualisation.domain (ns wanijo.visualisation.db
(:require [clojure.spec.alpha :as spec] (:require [clojure.spec.alpha :as spec]
[wanijo.framework.neo4j :as neo4j] [wanijo.framework.neo4j :as neo4j]
[wanijo.instance.domain :as domain-instance])) [wanijo.instance.db :as domain-instance]))
(spec/def ::link-name (spec/def ::link-name
(spec/or :not-give nil? (spec/or :not-give nil?

@ -4,10 +4,10 @@
[ring.util.response :as resp] [ring.util.response :as resp]
[wanijo.framework.routing :refer [register! path]] [wanijo.framework.routing :refer [register! path]]
[wanijo.framework.view :as view] [wanijo.framework.view :as view]
[wanijo.instance.domain :as domain-instance] [wanijo.instance.db :as domain-instance]
[wanijo.schema.domain :as domain-schema] [wanijo.schema.db :as domain-schema]
[wanijo.visualisation [wanijo.visualisation
[domain :as vis-domain] [db :as vis-db]
[viz :as viz] [viz :as viz]
[view :as vis-view]])) [view :as vis-view]]))
@ -16,7 +16,7 @@
:request req :request req
:content :content
[[:h1 "All Instances"] [[:h1 "All Instances"]
(viz/all-instances (vis-domain/all-instance-connections!))])) (viz/all-instances (vis-db/all-instance-connections!))]))
(defn all-schemas [req] (defn all-schemas [req]
{:content-type "text/json" {:content-type "text/json"
@ -24,13 +24,13 @@
(defn instance [uuid] (defn instance [uuid]
{:content-type "text/json" {:content-type "text/json"
:body (vis-domain/instance! uuid)}) :body (vis-db/instance! uuid)})
(defn search [term] (defn search [term]
{:content-type "text/json" {:content-type "text/json"
:body (map #(merge % :body (map #(merge %
{:urls {:instance (path :vis-get-instance %)}}) {:urls {:instance (path :vis-get-instance %)}})
(vis-domain/search! term))}) (vis-db/search! term))})
(defroutes routes (defroutes routes
(GET (register! :vis-explore "/vis/explore/:instance-uuid") (GET (register! :vis-explore "/vis/explore/:instance-uuid")

Loading…
Cancel
Save