1 | <?php |
||
5 | class GraphNode { |
||
6 | private $id; |
||
7 | private $parent = []; |
||
8 | private $label; |
||
9 | |||
10 | /** |
||
11 | * @var string $id : Node ID including namespace |
||
12 | */ |
||
13 | 3 | public function __construct( $id ) { |
|
16 | |||
17 | 1 | public function getID() { |
|
20 | |||
21 | /** |
||
22 | * @var string $predicate : the "predicate" linking an object to a subject |
||
23 | * @var srting $object : the object, linked to this node |
||
24 | */ |
||
25 | 1 | public function addParentNode( $predicate, $object ) { |
|
31 | |||
32 | /** |
||
33 | * @return array Of parent nodes |
||
34 | */ |
||
35 | 1 | public function getParentNode() { |
|
38 | |||
39 | /** |
||
40 | * @param string $label : a label, e.g. Display Title, used instead of $id. |
||
41 | */ |
||
42 | 1 | public function setLabel($label){ |
|
45 | |||
46 | 1 | public function getLabel() { |
|
49 | |||
50 | } |
||
51 |