     
     }
     
-    //MARK: INT (Int64)
-    
-
+    //MARK: INT 
+    
+    public var intValue : Int? {
+        get {
+            if numberData != nil {
+                return numberData!.longValue
+            }
+            return nil
+        }
+        set {
+            if intValue != newValue {
+                dirty = true
+                type = .kIntType
+                
+                if (newValue != nil) {
+                    numberData = NSNumber(long:newValue!)
+                } else {
+                    numberData = nil
+                }
+                
+            }
+        }
+        
+    }
+    
+    //MARK: STRING
+    
+    public var stringValue : String? {
+        get{
+            return stringData
+        }
+        set {
+            if stringData != newValue {
+                dirty = true
+                type = .kStringType
+                
+                stringData = newValue
+            }
+        }
+    }
 }
 
 

    return lhs.uid == rhs.uid
}

public class Property : GraphElement, Coding, Equatable {
    
    //MARK: Init
    
    public var data: PROPERTY = PROPERTY()
    
    var stringHash : Int? = nil
    //var stringStoreUID : UID? = nil

    public required init() {
    }
    
    // UseCase: Init with data during read
    required public init(data: PROPERTY) {
        //phase 1

//  Copyright (c) 2014 Stephan Zehrer. All rights reserved.
//

public enum PropertyType: String {
    case kUndefined         = "1" // NO ENCODE
    case kBoolType          = "2" // Encode: DONE
    case kIntType           = "3" // Encode: DONE (longValue)
    case kDoubleType        = "4" // Encode: DONE
    case kStringType        = "5" // Encode: partially done (length check TODO)
    case kNSDateType        = "6" // TODO
    case kNSUUIDType        = "7" // TODO
    
    //case kNSURLType         = "C"  // TODO
    //case kNSRangeType       = "B"
    
   
    //case kUnsignedLongType  = "X"
    //case kNSNumberType
    //case kNSDecimalNumberType
    //case kNSDataType  --> file
    //case kSOIDType -->??
    //case kNSPointType
}


public struct PROPERTY : Init {

    //var type: PropertyType = .kUndefined;   // 1
    
    var isNodeSource: Bool = false;         // 3  <- yes = property of a node / no = property of a relationship
    //var isUTF8Encoding: Bool = true;      // --  <- yes internal string usues UTF8 / NO == UTF16
    
    // TODO use default length?
    //var bufferLength: UInt8 = 0;          // --
    
    var sourceID: UID = 0;                  //  <- link to the source object
    
    var propertyKeyNodeID: UID = 0;         //  <- "type" of this property
    
    var prevPropertyID: UID = 0;            //  !<- 0 if start
    var nextPropertyID: UID = 0;            //  !<- 0 if end

    
    public init() {
        
