module Rdf_node: sig
.. end
Nodes.
type
literal = {
|
lit_value :string ; |
|
lit_language :string option ; |
|
lit_type :Rdf_uri.uri option ; |
}
Literal nodes contain a value, a optional language and an optional data type URI.
type
blank_id
Type for blank node ids.
type
node =
Various kinds of nodes.
module Ord_type: sig
.. end
type
triple = node * node * node
A RDF triple is just ... a triple of nodes.
val string_of_blank_id : blank_id -> string
Get a string from a blank node id.
val blank_id_of_string : string -> blank_id
Make a blank node id from a string.
val node_of_uri_string : string -> node
Shortcut for Uri (Rdf_uri.uri string)
.
val mk_literal : ?typ:Rdf_uri.uri -> ?lang:string -> string -> literal
Creation of a literal.
val mk_literal_datetime : ?d:float -> unit -> literal
Create a datetime literal with type uri from the given datetime d
.
If no date is given, Unix.time()
is used.
val node_of_datetime : ?d:float -> unit -> node
val datetime_of_literal : literal -> Netdate.t
Parse a literal to get a datetime.
val mk_literal_bool : bool -> literal
Create a boolean literal with type uri from the given boolean.
val node_of_bool : bool -> node
val bool_of_literal : literal -> bool
Parse a literal to get a boolean.
val node_of_literal_string : ?typ:Rdf_uri.uri -> ?lang:string -> string -> node
Shortcut for Literal (mk_literal ?typ ?lang string)
val string_of_node : node -> string
val node_hash : node -> int64
node_hash node
returns an int64 identifiying (hopefully unically)) a given node.