 extension Term : Comparable {
     var isNumeric : Bool {
         switch type {
-        case .datatype("http://www.w3.org/2001/XMLSchema#integer"), .datatype("http://www.w3.org/2001/XMLSchema#float"):
+        case .datatype("http://www.w3.org/2001/XMLSchema#integer"),
+             .datatype("http://www.w3.org/2001/XMLSchema#decimal"),
+             .datatype("http://www.w3.org/2001/XMLSchema#float"),
+             .datatype("http://www.w3.org/2001/XMLSchema#double"):
             return true
         default:
             return false

    }
}

public func ==(lhs: TermType, rhs: TermType) -> Bool {
    switch (lhs, rhs) {
    case (.iri, .iri), (.blank, .blank):

    public init(float value: Double) {
        self.value = "\(value)"
        self.type = .datatype("http://www.w3.org/2001/XMLSchema#float")
    }
    
    public init?(numeric value : Double, type : TermType) {
        self.type = type
        switch type {
        case .datatype("http://www.w3.org/2001/XMLSchema#float"),
             .datatype("http://www.w3.org/2001/XMLSchema#double"):
            self.value = "\(value)"
        case .datatype("http://www.w3.org/2001/XMLSchema#decimal"):
            self.value = String(format: "%f", value)
        case .datatype("http://www.w3.org/2001/XMLSchema#integer"):
            let i = Int(value)
            self.value = "\(i)"
        default:
            return nil
        }
    }
    
    var value : String
