1 (* Copyright (C) 2000, HELM Team.
3 * This file is part of HELM, an Hypertextual, Electronic
4 * Library of Mathematics, developed at the Computer Science
5 * Department, University of Bologna, Italy.
7 * HELM is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
12 * HELM is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with HELM; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
22 * For details, see the HELM World-Wide-Web page,
23 * http://cs.unibo.it/helm/.
35 * implementazione della funzione NAME
39 let i = Str.search_forward (Str.regexp "[^/]*\.") value 0 in
40 let s = Str.matched_string value in
41 let retVal = Str.string_before s ((String.length s) - 1) in
50 let func_theory value =
55 * implementazione delle funzioni dublin core
57 let func_dc (value, name) =
59 and p = helm_property_id name in
60 pgresult_to_string (c#exec ("select t" ^ p ^ ".att1 from t" ^ p ^ " where " ^ "t" ^ p ^ ".att0 = '" ^ value ^ "'"))
66 let apply_func f value =
68 MQName -> func_name value
69 | MQTheory -> func_theory value
70 | MQTitle -> func_dc (value, "title")
71 | MQContributor -> func_dc (value, "contributor")
72 | MQCreator -> func_dc (value, "creator")
73 | MQPublisher -> func_dc (value, "publisher")
74 | MQSubject -> func_dc (value, "subject")
75 | MQDescription -> func_dc (value, "description")
76 | MQDate -> func_dc (value, "date")
77 | MQType -> func_dc (value, "type")
78 | MQFormat -> func_dc (value, "format")
79 | MQIdentifier -> func_dc (value, "identifier")
80 | MQLanguage -> func_dc (value, "language")
81 | MQRelation -> func_dc (value, "relation")
82 | MQSource -> func_dc (value, "source")
83 | MQCoverage -> func_dc (value, "coverage")
84 | MQRights -> func_dc (value, "rights")
85 | MQInstitution -> func_dc (value, "institution")
86 | MQContact -> func_dc (value, "contact")
87 | MQFirstVersion -> func_dc (value, "firstversion")
88 | MQModified -> func_dc (value, "modified")