} } Display { 'type' => { ..'uri' => { (Major) 'state' => folded? ..'uri' => { (Minor) 'relation' => relation type. } } } } }*/ $triplesArray = $g->toArcTriples(); $objects = array(); foreach ($triplesArray as $i => $triple) { $tripesArrray[$i]['s'] = substr($tripesArrray[$i]['s'], -40, 40); $tripesArrray[$i]['p'] = substr($tripesArrray[$i]['p'], -40, 40); $tripesArrray[$i]['o'] = substr($tripesArrray[$i]['o'], -40, 40); } foreach ($triplesArray as $triple) { $objects[] = $triple['s']; $objects[] = $triple['o']; } $objects = array_unique($objects); $dot = "digraph entireTree {\n\n"; foreach ($objects as $object) { $object = preg_replace("/(\r|\n)*/", "", $object); $dot .= $object . " ;\n";