aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpukkamustard <pukkamustard@posteo.net>2021-06-24 15:31:22 +0200
committerpukkamustard <pukkamustard@posteo.net>2021-06-24 15:31:22 +0200
commita7e6938590a6cd987d3c8fe6965978ec074b8023 (patch)
tree2b270e2d6f08e4b76d9b254eb036d7018a65a0a7
parent784bd5dbe1ba8aa4bf59726cf03d557fcd3f389e (diff)
Rdf_fragment_graph: Add namespace helpers.
-rw-r--r--lib/fragment_graph/rdf_fragment_graph.ml13
-rw-r--r--lib/fragment_graph/rdf_fragment_graph.mli10
2 files changed, 23 insertions, 0 deletions
diff --git a/lib/fragment_graph/rdf_fragment_graph.ml b/lib/fragment_graph/rdf_fragment_graph.ml
index bc2d99e..45a4d35 100644
--- a/lib/fragment_graph/rdf_fragment_graph.ml
+++ b/lib/fragment_graph/rdf_fragment_graph.ml
@@ -211,6 +211,19 @@ module Make(H: HASH) = struct
Fmt.pf ppf "@[<4><lit %a>@]" Rdf.Literal.pp lit
end
+ module Namespace = struct
+ open Rdf.Namespace
+
+ let a =
+ rdf "type"
+ |> Predicate.of_iri
+
+ let value =
+ rdf "value"
+ |> Predicate.of_iri
+
+ end
+
module FragmentMap = Map.Make(String)
module PredicateMap = Map.Make(Predicate)
module ObjectSet = Set.Make(Object)
diff --git a/lib/fragment_graph/rdf_fragment_graph.mli b/lib/fragment_graph/rdf_fragment_graph.mli
index 77dadbf..7277a3a 100644
--- a/lib/fragment_graph/rdf_fragment_graph.mli
+++ b/lib/fragment_graph/rdf_fragment_graph.mli
@@ -76,6 +76,16 @@ module type S = sig
[@@ocaml.toplevel_printer]
end
+ module Namespace : sig
+ (** Namespace helpers *)
+
+ val a : Predicate.t
+ (** rdf:type *)
+
+ val value : Predicate.t
+ (** rdf:value *)
+ end
+
type t
(** Type of a Fragment Graph *)