class EasyRdf_Serialiser_GraphViz extends EasyRdf_Serialiser
Class to serialise an EasyRdf_Graph to GraphViz
Depends upon the GraphViz 'dot' command line tools to render images.
See http://www.graphviz.org/ for more information.
Methods
object |
__construct()
Constructor |
|
string |
serialise(EasyRdf_Graph $graph, string $format, array $options = array())
Serialise an EasyRdf_Graph into a GraphViz dot document. |
|
object |
setDotCommand(string $cmd)
Set the path to the GraphViz 'dot' command |
|
string |
getDotCommand()
Get the path to the GraphViz 'dot' command |
|
object |
setUseLabels(bool $useLabels)
Turn on/off the option to display labels instead of URIs. |
|
bool |
getUseLabels()
Get the state of the use labels option |
|
object |
setOnlyLabelled(bool $onlyLabelled)
Turn on/off the option to only display nodes and edges with labels |
|
bool |
getOnlyLabelled()
Get the state of the only Only Labelled option |
|
object |
setAttribute(string $name, string $value)
Set an attribute on the GraphViz graph |
|
string |
getAttribute(string $name)
Get an attribute of the GraphViz graph |
|
renderImage($graph, $format = 'png')
Internal function to render a graph into an image |
Details
at line 61
public object
__construct()
Constructor
at line 375
public string
serialise(EasyRdf_Graph $graph, string $format, array $options = array())
Serialise an EasyRdf_Graph into a GraphViz dot document.
Supported output format names: dot, gif, png, svg
at line 73
public object
setDotCommand(string $cmd)
Set the path to the GraphViz 'dot' command
Default is to search PATH for the command 'dot'.
at line 86
public string
getDotCommand()
Get the path to the GraphViz 'dot' command
The default value is simply 'dot'
at line 104
public object
setUseLabels(bool $useLabels)
Turn on/off the option to display labels instead of URIs.
When this option is turned on, then labels for resources will be displayed instead of the full URI of a resource. This makes it simpler to create friendly diagrams that non-technical people can understand.
This option is turned off by default.
at line 115
public bool
getUseLabels()
Get the state of the use labels option
at line 133
public object
setOnlyLabelled(bool $onlyLabelled)
Turn on/off the option to only display nodes and edges with labels
When this option is turned on, then only nodes (resources and literals) and edges (properties) will only be displayed if they have a label. You can use this option, to create concise, diagrams of your data, rather than the RDF.
This option is turned off by default.
at line 144
public bool
getOnlyLabelled()
Get the state of the only Only Labelled option
at line 162
public object
setAttribute(string $name, string $value)
Set an attribute on the GraphViz graph
Example: $serialiser->setAttribute('rotate', 90);
See the GraphViz tool documentation for information about the available attributes.
at line 174
public string
getAttribute(string $name)
Get an attribute of the GraphViz graph
at line 353
public
renderImage($graph, $format = 'png')
Internal function to render a graph into an image