Graphviz is a general purpose graph vizualization library. Its home-page
is http://www.graphviz.org/ This module translates an RDF graph
represented as a list of
rdf(S,P,O) into a .dot file.
- gviz_write_rdf(+Stream, +Graph, +Options) is det
- Write the graph Triples to Stream in
dotcompatible format. Options:
- Additional overall graphs attributes for dot. Each
attribute is of the format Name(Value) and written
as Name="Value". The term
size(W,H)is accepted as well.
- Truncate labels to Len characters. Default is 25.
infto print the full label.
- Lang is the language used for the labels. See resource_label/4.
- Smash networks connected by one of the given properties. Currently only [owl:sameAs].
- How to handle bags. Values are
- Show as normal nodes (i.e. handles as normal RDF)
- merge(Shape, Max)
- Put the members in a dot node using Shape. Only place the first Max members and add a note stating '... showing N of M' to indicate the actual number
true) do not put href atributes on edges.
- If present, URLs of the graph are replaced with the
call(Goal, URL0, URL)
- Called to define the shape of a resource as
call(Goal, URI, Shape). Shape is a list of Name(Value) terms. See shape/3.
- Called to define the shape parameters for a bag (Table).
call(Goal, Members, Shape)Shape is a list of Name(Value) terms.
- Called to define the label of a resource as
call(Goal, URI, Language, MaxLength, Label). Label is an atom.
- If present, add target=Target to all attribute lists that
- Display the language of literal nodes, defaults to true.
- write_graph_attributes(+List, +Out)[private]
- Write attributes for the graph as a whole
- combine_bags(+Graph, -Triples, -Bags, +Options) is det[private]
- Seperate the bags from the graph. Triples represent the remaining graph (in which a bag is a single node) and Bags is an assoc BagID-Members storing the members of the bags.
- bagid_property(+P, -I) is semidet[private]
- True if P is of the format
_:N, where N is a non-negative integer.
- smash_graph(+GraphIn, -GraphOut, +Options)[private]
- Smash networks of equivalent properties.
- smash_on_property(+P, +GraphIn, -GraphOut)[private]
- Merge owl:sameAs nodes, replacing the node with a bag.
- gv_write_edges(+Graph, -Done, +Stream, +Options) is det[private]
- Write the edges of an RDF graph in
dotformat. It invents a dot identifier for each node as it processes the nodes. The mapping from node to dot identifier is returned in the assoc Done.
- gv_write_nodes(+Nodes:list(pair), +Stream, +Options)[private]
- Write information about the nodes, defining the share and label of the node.
- write_node_attributes(+RDF, +Stream, +Options) is det[private]
- Write attributes for an RDF node. The node identifier matching the declared edges is alreadu written to Stream.
- bag_label(+Members, +Max, -Label, +Options) is det[private]
- Create an HTML description for describing a bag of objects.
- write_image_node(+ImgAttrs, +Attrs, +Stream, +Options) is det[private]
- Render a node using an image. The image location is either an
external URL or a local file specification using the notation
icons(File), a term that must resolve in an image file using absolute_file_name/3. In the default setup, this means that the image must be in the directory
web/iconsof a package.
- resource_label(+Resource, -Label:atom, +Options) is det[private]
- Label is the textual label to show for Resource. Process the
- write_attributes(+Attributes:list, +Out:stream) is det[private]
- Write attribute values. We define some special attributes:
- Emit as label=<HTML>
- filter_attributes(+AllAttrs, +Element, -ForElement, -Rest) is det[private]
- gv_attr(?AttrName, ?Element, ?Type) is nondet[private]
- Name and type-declarations for GraphViz attributes. Types are defined my must_be/2.
- Create a C-string. Normally
dotappears to be using UTF-8 encoding. Would there be a safer way to transport non-ascii characters, such as \uXXXX?
- bag_shape(+Members, -BagShape, +Options) is det[private]
- Compute parameters for a bag of resources.
- shape(+Resource, -Attributes, +Options) is det[private]
- Shape is the shape of the node to use for Resource. Shapes
can be modified in two ways:
- through the option
shape_hook(Closure), which must return a valid Attributes list for GraphViz
- By addings sub-properties of graphviz:styleParameter to the class of the resource. The value of this property defines the attribute value, while the label defines the attribute-name.
- through the option
- HTTP handler to serve an image we have included in an SVG file.