1<?xml version="1.0"?> 2<object> 3<name>Node</name> 4<id>Node</id> 5<componentType>Node</componentType> 6<description> 7<para> 8A node is the data element of a graph. 9It can have arbitrary dynamic properties that are either set in the editor or simply assigned on run-time. 10Note that dynamic properties are only available after script execution, if they are registered for the node's type. 11</para> 12</description> 13<syntax> 14</syntax> 15<properties> 16<property> 17 <name>id</name> 18 <description> 19 <para>Read and set the unique identifier of this node.</para> 20 </description> 21 <type>int</type> 22</property> 23<property> 24 <name>x</name> 25 <description> 26 <para>Read and set the x-coordinate of the node.</para> 27 </description> 28 <type>real</type> 29</property> 30<property> 31 <name>y</name> 32 <description> 33 <para>Read and set the y-coordinate of the node.</para> 34 </description> 35 <type>real</type> 36</property> 37<property> 38 <name>color</name> 39 <description> 40 <para>Read and set the color string of this node in hex values (e.g., "#ff0000" for red).</para> 41 </description> 42 <type>string</type> 43</property> 44<property> 45 <name>type</name> 46 <description> 47 <para>Read and set the identifier of the node's type. If setting, the node type identifier must exist.</para> 48 </description> 49 <type>string</type> 50</property> 51</properties> 52<methods> 53<method> 54 <name>edges()</name> 55 <description> 56 <para>Return a list of all edges (incoming and outgoing) of this node.</para> 57 </description> 58 <returnType>array</returnType> 59 <parameters> 60 </parameters> 61</method> 62<method> 63 <name>edges(type)</name> 64 <description> 65 <para>Return a list of all edges (incoming and outgoing) of this node of a specified type.</para> 66 </description> 67 <returnType>array</returnType> 68 <parameters> 69 <parameter> 70 <name>type</name> 71 <type>int</type> 72 <info>Identifier of an edge type.</info> 73 </parameter> 74 </parameters> 75</method> 76<method> 77 <name>inEdges()</name> 78 <description> 79 <para>Return a list of incoming edges of this node.</para> 80 </description> 81 <returnType>array</returnType> 82 <parameters> 83 </parameters> 84</method> 85<method> 86 <name>inEdges(type)</name> 87 <description> 88 <para>Return a list of all incoming edges of this node of a specified type.</para> 89 </description> 90 <returnType>array</returnType> 91 <parameters> 92 <parameter> 93 <name>type</name> 94 <type>int</type> 95 <info>Identifier of an edge type.</info> 96 </parameter> 97 </parameters> 98</method> 99<method> 100 <name>outEdges()</name> 101 <description> 102 <para>Return a list of all outgoing edges of this node.</para> 103 </description> 104 <returnType>array</returnType> 105 <parameters> 106 </parameters> 107</method> 108<method> 109 <name>outEdges(type)</name> 110 <description> 111 <para>Return a list of all outgoing edges of this node of a specified type.</para> 112 </description> 113 <returnType>array</returnType> 114 <parameters> 115 <parameter> 116 <name>type</name> 117 <type>int</type> 118 <info>Identifier of an edge type.</info> 119 </parameter> 120 </parameters> 121</method> 122<method> 123 <name>neighbors()</name> 124 <description> 125 <para>Return list all nodes connected to this node. This method respects if edges are directed.</para> 126 </description> 127 <returnType>array</returnType> 128 <parameters> 129 </parameters> 130</method> 131<method> 132 <name>neighbors(type)</name> 133 <description> 134 <para>Return list all nodes connected to this node via an edge of specified type. This method respects if edges are directed.</para> 135 </description> 136 <returnType>array</returnType> 137 <parameters> 138 <parameter> 139 <name>type</name> 140 <type>int</type> 141 <info>Identifier of an edge type.</info> 142 </parameter> 143 </parameters> 144</method> 145<method> 146 <name>predecessors()</name> 147 <description> 148 <para>Return a list all nodes connected to this node by an incoming edge.</para> 149 </description> 150 <returnType>array</returnType> 151 <parameters> 152 </parameters> 153</method> 154<method> 155 <name>predecessors(type)</name> 156 <description> 157 <para>Return a list all nodes connected to this node by an incoming edge of specified type.</para> 158 </description> 159 <returnType>array</returnType> 160 <parameters> 161 <parameter> 162 <name>type</name> 163 <type>int</type> 164 <info>Identifier of an edge type.</info> 165 </parameter> 166 </parameters> 167</method> 168<method> 169 <name>successors()</name> 170 <description> 171 <para>Return list all nodes connected to this node by an outgoing edge.</para> 172 </description> 173 <returnType>array</returnType> 174 <parameters> 175 </parameters> 176</method> 177<method> 178 <name>successors(type)</name> 179 <description> 180 <para>Return list all nodes connected to this node by an outgoing edge of specified type.</para> 181 </description> 182 <returnType>array</returnType> 183 <parameters> 184 <parameter> 185 <name>type</name> 186 <type>int</type> 187 <info>Identifier of an edge type.</info> 188 </parameter> 189 </parameters> 190</method> 191<method> 192 <name>distance(property, targets)</name> 193 <description> 194 <para>Return list of distances to specified targets in same order.</para> 195 </description> 196 <returnType>array</returnType> 197 <parameters> 198 <parameter> 199 <name>property</name> 200 <type>string</type> 201 <info>Name of edge property that holds the edge length.</info> 202 </parameter> 203 <parameter> 204 <name>targets</name> 205 <type>array</type> 206 <info>List of nodes to that the distances shall be computed.</info> 207 </parameter> 208 </parameters> 209</method> 210</methods> 211</object> 212