 
   IRDFString
   (language [this]
+    nil))
+
+(extend-protocol IRDFLiteral
+
+  java.math.BigInteger
+  (raw-value [t]
+    t)
+
+  (datatype-uri [t]
+    (->java-uri xsd:integer))
+
+  java.math.BigDecimal
+  (raw-value [t]
+    t)
+
+  (datatype-uri [t]
+    (->java-uri xsd:decimal))
+
+  Boolean
+  (raw-value [t]
+    t)
+
+  (datatype-uri [t]
+    (->java-uri xsd:boolean))
+
+  Byte
+  (raw-value [t]
+    t)
+
+  (datatype-uri [t]
+    (->java-uri xsd:byte))
+
+  Date
+  (raw-value [t]
+    t)
+
+  (datatype-uri [t]
+    (->java-uri xsd:dateTime))
+
+  Double
+  (raw-value [t]
+    t)
+
+  (datatype-uri [t]
+    (->java-uri xsd:double))
+
+  Float
+  (raw-value [t]
+    t)
+
+  (datatype-uri [t]
+    (->java-uri xsd:float))
+
+  Integer
+  (raw-value [t]
+    t)
+
+  (datatype-uri [t]
+    (->java-uri xsd:integer))
+
+  Long
+  (raw-value [t]
+    t)
+
+  (datatype-uri [t]
+    (->java-uri xsd:integer))
+
+  Short
+  (raw-value [t]
+    t)
+
+  (datatype-uri [t]
+    (->java-uri xsd:short))
+
+  String
+  (raw-value [t]
+    t)
+
+  (datatype-uri [t]
+    (->java-uri xsd:string))
+
+  (language [t]
     nil))
 
 (defn- destructure-quad [quad i default]

(ns grafter.rdf.protocols
  "Grafter protocols and types for RDF processing"
  (:import [java.net URI]
           [org.openrdf.model Literal]))

(defprotocol IStatement

  (raw-value [this])
  (datatype-uri [this]))

(def rdf:langString (java.net.URI. "http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"))

;; TODO add tests to ensure that datatype-uri's etc are right
