Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Ldp.Types
SourceBase types and utilities.
type meta = {
iri : Iri.t;
IRI of the resource
*)acl : Iri.t option;
Optional IRI of the ACL (access control list) of the resource.
*)meta : Iri.t option;
Optional IRI of meta information about the resource.
*)user : string option;
Optional used identifier when resource was retrieved.
*)websocket : Iri.t option;
Optional IRI of a websocket tunnel for the resource.
*)editable : Cohttp.Code.meth list;
Allowed HTTP methods on the resource.
*)exists : bool;
Whether the resource exists.
*)info : Cohttp.Response.t * Cohttp_lwt.Body.t;
Original HTTP response and body.
*)}
Information about a resource.
val meta :
?acl:Iri.t ->
?meta:Iri.t ->
?user:string ->
?websocket:Iri.t ->
?editable:Cohttp.Code.meth list ->
?exists:bool ->
Cohttp.Response.t ->
Cohttp_lwt.Body.t ->
Iri.t ->
meta
meta resp body
creates a meta
structure. Optional fields have default value None
. Default editable
is []
. Default exists
is true
.
Returns a string representation of a Types.meta
, mainly for debugging purpose;
A RDF resource contains meta information on the resource, its graph, content-type and original contents as a string.
A Non-rdf resource contains meta information on the resource, its content-type and its original contents as a string.
A resource may be a container, another RDF resource or a non-RDF resource.
container_children g
returns the IRIs of the children of the given container. Container IRI is the name of the graph. Its children are retrieved by looking for the triples with the name of the graph as subjects and the Rdf.Ldp.contains
relation.
The error type, with constructors added by other modules.
register_string_of_error f
registers f as printer for errors. f
takes the previous printer function, to use it as fallback for errors not handled.
content_type_of_string str
parses str
as content-type, using Ldp.Ct.of_string
. If parsing fails and fail
is true
(which is the default), raises Failure
with the error message, else return the default content-type Ldp.Ct.default
.
split_string string chars
splits the given string
on any of the chars
. Optional argument keep_empty
(default is false
) indicates whether empty strings must be returned too.
methods_of_string str
returns the list of HTTP methods from the given string str
, where they may be separated by characters ','
, ' '
or '\t'
.