*
* output: string; id interno associato alla proprieta'
*)
-let helm_property_id p =
- let c = pgc () in
+let helm_property_id handle p =
+ let c = MQIConn.pgc handle in
let q1 = "select att0 from namespace where att1='http://www.cs.unibo.it/helm/schemas/mattone.rdf#'" in
let ns = pgresult_to_string (c#exec q1) in
let q2 = ("select att0 from property where att2='" ^ p ^ "' and att1=" ^ ns) in
let retval = pgresult_to_string (c#exec q2) in
- (*let _ = print_endline ("utility:q2: " ^ q2 ^ " : " ^ retval) in*)
+ (*let _ = prerr_endline ("utility:q2: " ^ q2 ^ " : " ^ retval) in*)
retval
;;
*
* output: string; id interno associato alla classe
*)
-let helm_class_id cl =
- let c = pgc () in
+let helm_class_id handle cl =
+ let c = MQIConn.pgc handle in
let ns = pgresult_to_string (c#exec ("select att0 from namespace where att1='http://www.cs.unibo.it/helm/schemas/mattone.rdf#'")) in
pgresult_to_string (c#exec ("select att0 from class where att2='" ^ cl ^ "' and att1=" ^ ns))
;;