//tree : false,
public string xtype;
- public JSON.Object json_project_data;
-
+ public Json.Object json_project_data;
+ public Palete.RooDatabase roo_database;
bool is_scanned;
public Project (string path) {
this.name = GLib.Path.get_basename(path); // default..
- this.json_project_data = new JSON.Object();
+ this.json_project_data = new Json.Object();
this.is_scanned = false;
this.paths = new Gee.HashMap<string,string>();
if (path.length > 0) {
this.paths.set(path, "dir");
}
+ // dummy roo database...
+ this.initRooDatabase();
}
-
-
+ public void initRooDatabase()
+ {
+
+ this.roo_database = new Palete.RooDatabase.from_project(this);
+ }
var proj = factory(xtype, fpath);
-
+
proj.json_project_data = obj; // store the original object...
proj.fn = Path.get_basename(jsonfile).split(".")[0];
paths.foreach_member((sobj, key, val) => {
proj.paths.set(key, "dir");
});
+ proj.initRooDatabase();
+
projects.set(proj.id,proj);
+
+
+
+
}
this.json_project_data.set_string_member("rootURL", this.rootURL);
this.json_project_data.set_string_member("base_template", this.base_template);
this.json_project_data.set_string_member("rootURL", this.rootURL);
-
-
var paths = new Json.Object();
}
}
+ // wrapper around the javascript data...
+ public string get_string_member(string key) {
+
+ if (!this.json_project_data.has_member(key)) {
+ return "";
+ }
+ var ret = this.json_project_data.get_string_member(key);
+ if (ret == null) {
+ return "";
+ }
+ return ret;
+
+ }
}
}