X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Focaml%2Fmathql_interpreter_galax%2F2use.ml;fp=helm%2Focaml%2Fmathql_interpreter_galax%2F2use.ml;h=0000000000000000000000000000000000000000;hb=37939472ad665d3c071bf53bf4f484744d6453e0;hp=9a69db2f9c2c6b5e6ed4bc97610f73fe5d70966e;hpb=500627d36e789bb09eada3988afe8dffd4e8e4de;p=helm.git diff --git a/helm/ocaml/mathql_interpreter_galax/2use.ml b/helm/ocaml/mathql_interpreter_galax/2use.ml deleted file mode 100644 index 9a69db2f9..000000000 --- a/helm/ocaml/mathql_interpreter_galax/2use.ml +++ /dev/null @@ -1,62 +0,0 @@ -open Mathql_semantics;; - - -(* prende una lista di uri (contenente alternativamente uri e pos) e costruisce una lista di attributed_uri *) -let rec attl uril svar = - - match uril with - | head::tail -> - let suri = List.hd uril in - - let uril_tl = List.tl uril in - - - {uri = suri; attributes = [(svar, (List.hd - uril_tl))]; extra = ""} :: attl (List.tl uril_tl) svar (* - NON SONO SICURO DI AVER COSTRUITO BENE LA STRUTTURA DATI!!!!*) - | [] -> [] - - - - - -(* prende un attributed_uri e una svar e restituisce la lista degli -attributed_uri (backward o forward in base al parametro "d") associando -la posizione alla var passata *) - -let muse svar d path = - let dir = - match d with - "F" -> "/home/projects/helm/metadata/create4/forward" - | _ -> "/home/projects/helm/metadata/create4/backward" - in - let dtag = - match d with - "F" -> "refObj" - | _ -> "backPointer" in - - let xq ="namespace h=\"http://www.cs.unibo.it/helm/schemas/mattone.rdf#\" - namespace rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" - for $i in document(" ^ "\"" ^ dir ^ path.uri ^ "\"" ^ - ")//rdf:RDF//h:Object//h:" ^ dtag ^ "//h:Occurrence - return ($i//h:occurrence, $i//h:position)" - - in - print_endline xq; - let uril = Toputils.eval_query_string xq in (* e' una lista di liste di stringhe*) - let hd_uril = List.hd uril in(*prendo l'elemento in testa che e' quello - che contiene la lista di uri*) - - attl hd_uril svar (* adesso dalla lista di uri(hd_uril) costruisco una lista di attributed_uri*) - - - - -(* prende una lista di uri (Mathql_semantics.result), una variabile (a cui -associare la posizione), e la direzione (forward o backward) e per ogni uri chiama la muse *) -let use_ex ulist svar d = - List.concat (List.map (muse svar d) ulist) -;; - - -