Class EasyRdf_Serialiser_GraphViz

Description

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.

Located in /EasyRdf/Serialiser/GraphViz.php (line 50)

EasyRdf_Serialiser
   |
   --EasyRdf_Serialiser_GraphViz
Method Summary
string getAttribute (string $name)
string getDotCommand ()
bool getOnlyLabelled ()
bool getUseLabels ()
string serialise (string $graph, string $format)
object EasyRdf_Serialiser_GraphViz setAttribute (string $name, string $value)
object EasyRdf_Serialiser_GraphViz setOnlyLabelled ( $onlyLabelled, bool $useLabels)
Variables

Inherited Variables

Inherited from EasyRdf_Serialiser

EasyRdf_Serialiser::$_prefixes
Methods
Constructor __construct (line 62)

Constructor

  • access: public
getAttribute (line 175)

Get an attribute of the GraphViz graph

  • return: The value of the graph attribute
  • access: public
string getAttribute (string $name)
  • string $name: Attribute name
getDotCommand (line 87)

Get the path to the GraphViz 'dot' command

The default value is simply 'dot'

  • return: The path to the 'dot' command.
  • access: public
string getDotCommand ()
getOnlyLabelled (line 145)

Get the state of the only Only Labelled option

  • return: The current state of the Only Labelled option
  • access: public
bool getOnlyLabelled ()
getUseLabels (line 116)

Get the state of the use labels option

  • return: The current state of the use labels option
  • access: public
bool getUseLabels ()
serialise (line 360)

Serialise an EasyRdf_Graph into a GraphViz dot document.

Supported output format names: dot, gif, png, svg

  • return: The RDF in the new desired format.
  • access: public
string serialise (string $graph, string $format)
  • string $graph: An EasyRdf_Graph object.
  • string $format: The name of the format to convert to.
setAttribute (line 163)

Set an attribute on the GraphViz graph

Example: $serialiser->setAttribute('rotate', 90);

See the GraphViz tool documentation for information about the available attributes.

  • access: public
object EasyRdf_Serialiser_GraphViz setAttribute (string $name, string $value)
  • string $name: The name of the attribute
  • string $value: The value for the attribute
setDotCommand (line 74)

Set the path to the GraphViz 'dot' command

Default is to search PATH for the command 'dot'.

  • access: public
object EasyRdf_Serialiser_GraphViz setDotCommand (string $cmd)
  • string $cmd: The path to the 'dot' command.
setOnlyLabelled (line 134)

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.

  • access: public
object EasyRdf_Serialiser_GraphViz setOnlyLabelled ( $onlyLabelled, bool $useLabels)
  • bool $useLabels: A boolean value to enable/display only labelled items
  • $onlyLabelled
setUseLabels (line 105)

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.

  • access: public
object EasyRdf_Serialiser_GraphViz setUseLabels (bool $useLabels)
  • bool $useLabels: A boolean value to turn labels on and off

Documentation generated on Wed, 16 Jan 2013 19:16:37 +0000 by phpDocumentor 1.4.4