protected function EasyRdf_Serialiser_GraphViz::nodeName

Convert an EasyRdf object into a GraphViz node identifier

@ignore

1 call to EasyRdf_Serialiser_GraphViz::nodeName()
EasyRdf_Serialiser_GraphViz::serialiseDot in drupal/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/GraphViz.php
Internal function to serialise an EasyRdf_Graph into a DOT formatted string

File

drupal/core/vendor/easyrdf/easyrdf/lib/EasyRdf/Serialiser/GraphViz.php, line 185

Class

EasyRdf_Serialiser_GraphViz
Class to serialise an EasyRdf_Graph to GraphViz

Code

protected function nodeName($entity) {
  if ($entity instanceof EasyRdf_Resource) {
    if ($entity
      ->isBnode()) {
      return "B" . $entity
        ->getUri();
    }
    else {
      return "R" . $entity
        ->getUri();
    }
  }
  else {
    return "L" . $entity;
  }
}