1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980(*********************************************************************************)(* OCaml-Stk *)(* *)(* Copyright (C) 2023-2024 INRIA All rights reserved. *)(* Author: Maxence Guesdon, INRIA Saclay *)(* *)(* This program is free software; you can redistribute it and/or modify *)(* it under the terms of the GNU General Public License as *)(* published by the Free Software Foundation, version 3 of the License. *)(* *)(* This program is distributed in the hope that it will be useful, *)(* but WITHOUT ANY WARRANTY; without even the implied warranty of *)(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *)(* GNU General Public License for more details. *)(* *)(* You should have received a copy of the GNU General Public *)(* License along with this program; if not, write to the Free Software *)(* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA *)(* 02111-1307 USA *)(* *)(* As a special exception, you have permission to link this program *)(* with the OCaml compiler and distribute executables, as long as you *)(* follow the requirements of the GNU GPL in regard to all of the *)(* software in the executable aside from the OCaml compiler. *)(* *)(* Contact: Maxence.Guesdon@inria.fr *)(* *)(*********************************************************************************)(** *)moduleLog=Stk.Logletiri_wrapper=letto_json?with_dociri=`String(Iri.to_stringiri)inletfrom_json?defjson=matchjsonwith|`Strings->(tryIri.of_stringswithe->Log.warn(funm->m"invalid iri %s: %s"s(Printexc.to_stringe));Iri.of_string"")|json->Ocf.invalid_valuejsoninOcf.Wrapper.maketo_jsonfrom_jsonletdefault_ptime=Ptime.epochletptime_wrapper=letto_json?with_doct=`String(Ptime.to_rfc3339t)inletof_json?def=function|`Strings->(matchPtime.(rfc3339_error_to_msg(of_rfc3339s))with|Error(`Msgmsg)->Log.err(funm->m"%s: %s"smsg);Ocf.invalid_value(`Strings)|Ok(t,_,_)->t)|json->Ocf.invalid_valuejsoninOcf.Wrapper.maketo_jsonof_jsonmodulePIri=Stk.Props.Add_prop_type(structtypet=Iri.tletcomparei1i2=Iri.comparei1i2letwrapper=Someiri_wrapperlettransition=Noneend)modulePTerm=Stk.Props.Add_prop_type(structtypet=Rdf.Term.termletcompare=Rdf.Term.compareletwrapper=Nonelettransition=Noneend)