Module Rdf_dot

module Rdf_dot: sig .. end
Dump in graphviz format.

val apply_namespaces : (string * string) list -> string -> string * string
apply_namespaces ns uri return a pair (prefix, suffix) representing the given uri and using one of the namespaces ns, of the form (prefix, uri). If a namespace (pref, uri) exists such that uri is a prefix of uri2, then apply_namespaces ns uri2 = (prefix, rel), with rel being the suffix of uri2 relative to uri.
val build_namespaces : ?namespaces:(Rdf_uri.uri * string) list ->
Rdf_graph.graph -> (string * string) list
build_namespaces graph returns the list namespaces of the graph, as a list of pairs (prefix, uri) usable by Rdf_dot.apply_namespaces.
namespaces : is used to specify additional namespaces.
val dot_of_graph : ?namespaces:(Rdf_uri.uri * string) list ->
?href:(Rdf_node.node -> string option) -> Rdf_graph.graph -> string
dot_of_graph graph returns the Graphviz code to represent the given graph.
namespaces : is used so specified namespaces in the form (uri, name); in this case, the abbreviated form ns:suffix is used in labels of URI nodes, when possible. The namespaces of the graph are also used anyway.
href : can specify a function to call on each node, which can return an url (as a string), to add a href attribute to the node in the graphviz code. This is useful to provide clickable nodes in SVG output, for example.
val dot_of_uri : ?namespaces:(Rdf_uri.uri * string) list ->
?href:(Rdf_node.node -> string option) ->
Rdf_graph.graph -> Rdf_uri.uri -> string
Same as Rdf_dot.dot_of_graph but return code to represent only the triples having the given URI as subject or object.