aboutsummaryrefslogtreecommitdiff
path: root/lib/core/rdf.mli
diff options
context:
space:
mode:
Diffstat (limited to 'lib/core/rdf.mli')
-rw-r--r--lib/core/rdf.mli30
1 files changed, 17 insertions, 13 deletions
diff --git a/lib/core/rdf.mli b/lib/core/rdf.mli
index 90983fe..4ec8f21 100644
--- a/lib/core/rdf.mli
+++ b/lib/core/rdf.mli
@@ -227,6 +227,12 @@ module Graph : sig
val empty : t
(** [empty] is the empty graph. *)
+ val singleton : Triple.t -> t
+ (** [singleton triple] returns a graph containg only [triple]. *)
+
+ val union : t -> t -> t
+ (** [union a b] returns the union of the graphs. *)
+
val add : t -> Triple.t -> t
(** [add graph triple] returns a new graph containing [triple] (and everything in [graph]).*)
@@ -234,22 +240,20 @@ module Graph : sig
(** [add_seq graph triples] returns a new graph containing all triples in the
sequence [triples]. *)
- val remove_triple : t -> Triple.t -> t
+ val remove: t -> Triple.t -> t
(** [remove_triple graph triple] removes [triple] from [graph]. *)
- val union : t -> t -> t
- (** [union a b] returns the union of the graphs. *)
-
- val difference : t -> t -> t
- (** [difference a b] returns the difference of the graphs. *)
+ val subjects : t -> Term.t Seq.t
+ (** [subjects graph] returns a sequence of subjects that appear in the graph. *)
- val intersection : t -> t -> t
- (** [intersection a b] returns the intersection of the graphs. *)
+ val to_triples: t -> Triple.t Seq.t
+ (** [to_triples graph] returns a sequence of triples in [graph].*)
- val member_subject : t -> Triple.Subject.t -> bool
- (** [member_subject graph subject] returns true if [subject] appears in
- [graph].*)
+ val to_triples_s : t -> Term.t -> Triple.t Seq.t
+ (** [to_seq_s graph subject] returns a sequence of triples in [graph] with
+ [subject] in subject position.*)
- val to_list: t -> Triple.t list
- (** [to_list graph] returns a sequence of triples in [graph].*)
+ val to_triples_sp : t -> Term.t -> Term.t -> Triple.t Seq.t
+ (** [to_seq_sp graph subject predicate] returns a sequence of triples in [graph] with
+ [subject] in subject position and [predicate] in predicate position.*)
end