module N: Rdf_node
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.
val compare : node -> node -> int
module Ord_type: sig
.. end
module NSet: Set.S
with type elt = node
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 mk_literal_int : int -> literal
Create an integer literal.
val mk_literal_double : float -> literal
Create a double literal.
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 node_of_int : int -> node
Shortcut for Literal (mk_literal ~typ: Rdf_rdf.xsd_integer int)
val node_of_double : float -> node
Shortcut for Literal (mk_literal ~typ: Rdf_rdf.xsd_double float)
val node_of_bool : bool -> node
val quote_str : string -> string
quote_str str
returns the given string str
between quotes, with
correct literal string escapes.
val string_of_literal : literal -> string
Create a string from the given RDF literal, using turtle syntax.
val string_of_node : node -> string
val node_hash : node -> int64
node_hash node
returns an int64 identifiying (hopefully unically)) a given node.
val lit_true : literal
Literal "true" with according type.
val lit_false : literal
Literal "false" with according type.