X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fmathql_interpreter%2Frelation.ml;h=57b89122e1922132a0e09d84fc48acec16c4aa32;hb=856dc227c9781439a31d03f5b68d32a41db63ab9;hp=94dc10870475c468bdcfc8701c675a96a7d098ea;hpb=ba64642ca7771cd9cc7b9f73476c8f608ffeeda5;p=helm.git diff --git a/helm/ocaml/mathql_interpreter/relation.ml b/helm/ocaml/mathql_interpreter/relation.ml index 94dc10870..57b89122e 100644 --- a/helm/ocaml/mathql_interpreter/relation.ml +++ b/helm/ocaml/mathql_interpreter/relation.ml @@ -39,7 +39,7 @@ open Utility;; let get_prop_id propl = - let prop = List.hd propl in + let prop = fst propl in if prop="refObj" then "F" else if prop="backPointer" then "B" else assert false @@ -47,8 +47,6 @@ let get_prop_id propl = let relation_ex rop path rset attl = - if path = [] then [] - else let usek = get_prop_id path in let vvar = if attl = [] then "position" else List.hd attl @@ -61,7 +59,7 @@ let relation_ex rop path rset attl = let res = c#exec qq in (List.map (function - [uri;context] -> [(uri,[[(vvar,[context])]])] + [uri;context] -> [(uri,[[((vvar, []),[context])]])] | _ -> assert false ) res#get_list) @ acc ) @@ -103,20 +101,18 @@ let tofname uri = let rec rsetl uril vvar = match uril with | uri::tl -> let scuri = (*tofname*) uri in - [(scuri, [[(vvar, [(List.hd tl)])]])]::(rsetl (List.tl tl) vvar) + [(scuri, [[((vvar, []), [(List.hd tl)])]])]::(rsetl (List.tl tl) vvar) | [] -> [] (* prende una resource e una vvar e restituisce la lista delle resource in relazione (refObj o backPointer in base al parametro "path") con tale resource e associa alla proprieta' il nome della vvar contenuto in "attl" *) let muse path attl r = - if path = [] then [] - else let vvar = if attl = [] then "position" else List.hd attl in let uri = fst r in let furi = tofname uri in - let dtag = List.hd path in + let dtag = fst path in let dir = match dtag with "refObj" -> "/projects/helm/metadata/create4/forward"