docs: function(config){
      // This json contains the constraints defined for a specific instance
      // Each constraint is identified by a unique id (the key in the json details)
      // so that we can remove/change. The uniqueID is a simple incremental,
      // so the __uniqueID__ is used internally as the "next unique id", while the constrains details are in the details json,
      // with the uniqueID as key
      this._constrains = { __uniqueID__ : 0,
          details : {}};
  
      // If config is not defined, set default Values
      if (!config || _.isUndefined(config)){
          config = {};
      }
  
      // Should we load from dict or directly from config obj?
      if (_.isObject(config) && (!config.type)){
          this._name = config.name || config._name || "Undef";
          var prim = config.prim || config._prim;
          (prim)?this._prim = prim.toUpperCase():this._prim = Primitive.UNDEF;
          this._desc = config.desc || config._desc ||"";
  
          // Constraints can be alreay a json or a string
          var contrs = config.constrains || config._constrains || { __uniqueID__ : 0,
              details : {}, type: Constraints.UNDEF};
          this.addConstraint(contrs);
  
      }else{ // the config is a string or has the type field
          var name = "Undef";
          var oid = "Undef";
          var el = null;
          var prim = null;
          var constr = null;
          if (config.type){
              // Load from registry
              el = Element.getFromName(config.type);
              oid = config.type;
              name = config.name || config._name || config.type || "Undef";
  		try{
              		prim = el.prim.toUpperCase() || el._prim.toUpperCase() || Primitive.UNDEF;
  		}catch(e){
  			console.log("-- *************************************");
  			console.log(e);
  			console.log(config);
  			console.log(prim);
  			console.log(el)
  			console.log("-- *************************************");
  		}
              constr = config.constraints;
          }else{
              //Create the element from the registry
              if (!_.isString(config)){
                  throw new Error("mPlane Element : to create an Element from registry please provide a valid string:"+config);
              }
              var el = Element.getFromName(config);
              name = el.name || el._name || "Undef";
              oid = config;
              prim = el.prim.toUpperCase() || el._prim.toUpperCase() || Primitive.UNDEF;
              // In this form we cannot have constraints directly in the config
              constr = { __uniqueID__ : 0,
                  details : {}};
          }// config is a string
  
          this._name = name;
          this._prim = prim;
          this._desc = el.desc || el._desc || "";
  
          // Constraints can be alreay a json or a string
          if (_.isString(constr))
              this._constrains = Constraints.parse_constraint(this._prim , constr);
          else
              this._constrains = constr;
      }
  }