Commit aa09c644 authored by Ricco Førgaard's avatar Ricco Førgaard

Initial commit

parents
/pom.xml
*jar
/lib
/classes
/native
/.lein-failures
/checkouts
/.lein-deps-sum
# raird
FIXME: write description
## Usage
FIXME: write
## License
Copyright (C) 2013 FIXME
Distributed under the Eclipse Public License, the same as Clojure.
(defproject raird "1.0.0-SNAPSHOT"
:description "FIXME: write description"
:dependencies [[org.clojure/clojure "1.3.0"] [com.nesstar/nesstar-api "0.6.5"]]
:repositories {"nesstar" "http://nesstar-dev.nsd.uib.no/nexus/content/groups/public/"}
:main raird.core)
(ns raird.core (:gen-class))
(import
'(com.nesstar.api NesstarDBFactory)
'(com.nesstar.api NesstarDB)
'(com.nesstar.api Server)
'(com.nesstar.api Study))
(defn -main [& args]
(def server-url "http://nesstar-demo.nsd.uib.no")
(defn connect [url]
(def instance (. NesstarDBFactory getInstance))
(def uri (new java.net.URI url))
(. instance getServer uri))
(defn getBank [klass]
(def server (connect server-url))
(. server getBank klass))
(defn getStudy [id]
(def bank (getBank Study))
(. bank (get id)))
(defn topics [id]
(def study (getStudy id))
(. study getVariableGroups))
(defn studies []
(def bank (getBank Study))
(. bank getAll))
(defn llist [result]
(doseq [element result]
(println (. element getId) ":" (. element getLabel))
))
(llist (studies))
(llist (topics "demo-gor")))
(ns raird.test.core
(:use [raird.core])
(:use [clojure.test]))
(deftest replace-me ;; FIXME: write
(is false "No tests have been written."))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment