Index: trunk/extensions/SemanticResultFormats/GraphViz/SRF_Graph.php |
— | — | @@ -15,37 +15,40 @@ |
16 | 16 | */ |
17 | 17 | class SRFGraph extends SMWResultPrinter { |
18 | 18 | public static $NODE_SHAPES = array( |
19 | | - 'box', 'rect', 'rectangle', |
20 | | - 'none', 'plaintext', |
21 | | - 'polygon', |
22 | | - 'ellipse', |
| 19 | + 'box', |
| 20 | + 'box3d', |
23 | 21 | 'circle', |
24 | | - 'point', |
25 | | - 'egg', |
26 | | - 'triangle', |
| 22 | + 'component', |
27 | 23 | 'diamond', |
28 | | - 'trapezium', |
29 | | - 'parallelogram', |
30 | | - 'house', |
31 | | - 'pentagon ', |
32 | | - 'hexagon', |
33 | | - 'septagon', |
34 | | - 'octagon', |
35 | 24 | 'doublecircle', |
36 | 25 | 'doubleoctagon', |
37 | | - 'tripleoctagon', |
| 26 | + 'egg', |
| 27 | + 'ellipse', |
| 28 | + 'folder', |
| 29 | + 'hexagon', |
| 30 | + 'house', |
| 31 | + 'invhouse', |
| 32 | + 'invtrapezium', |
38 | 33 | 'invtriangle', |
39 | | - 'invtrapezium', |
40 | | - 'invhouse', |
| 34 | + 'Mcircle', |
41 | 35 | 'Mdiamond', |
42 | 36 | 'Msquare', |
43 | | - 'Mcircle', |
| 37 | + 'none', |
| 38 | + 'note', |
| 39 | + 'octagon', |
| 40 | + 'parallelogram', |
| 41 | + 'pentagon ', |
| 42 | + 'plaintext', |
| 43 | + 'point', |
| 44 | + 'polygon', |
| 45 | + 'rect', |
| 46 | + 'rectangle', |
| 47 | + 'septagon', |
44 | 48 | 'square', |
45 | | - 'note', |
46 | 49 | 'tab', |
47 | | - 'folder', |
48 | | - 'box3d', |
49 | | - 'component', |
| 50 | + 'trapezium', |
| 51 | + 'triangle', |
| 52 | + 'tripleoctagon', |
50 | 53 | ); |
51 | 54 | |
52 | 55 | protected $m_graphName = 'QueryResult'; |
— | — | @@ -226,6 +229,14 @@ |
227 | 230 | return $graphInput; |
228 | 231 | } |
229 | 232 | |
| 233 | + /** |
| 234 | + * (non-PHPdoc) |
| 235 | + * @see SMWResultPrinter::getName() |
| 236 | + */ |
| 237 | + public function getName() { |
| 238 | + return wfMsg( 'srf-printername-graph' ); |
| 239 | + } |
| 240 | + |
230 | 241 | public function getParameters() { |
231 | 242 | return array( |
232 | 243 | array( 'name' => 'graphname', 'type' => 'string', 'description' => wfMsg( 'srf_paramdesc_graphname' ) ), |
— | — | @@ -234,7 +245,10 @@ |
235 | 246 | array( 'name' => 'graphlabel', 'type' => 'enumeration', 'description' => wfMsg( 'srf_paramdesc_graphlabel' ), 'values'=> array( 'yes', 'no' ) ), |
236 | 247 | array( 'name' => 'rankdir', 'type' => 'string', 'description' => wfMsg( 'srf_paramdesc_rankdir' ) ), |
237 | 248 | array( 'name' => 'graphlink', 'type' => 'enumeration', 'description' => wfMsg( 'srf_paramdesc_graphlink' ), 'values'=> array( 'yes', 'no' ) ), |
238 | | - array( 'name' => 'graphcolor', 'type' => 'enumeration', 'description' => wfMsg( 'srf_paramdesc_graphcolor' ), 'values'=> array( 'yes', 'no' ) ) |
| 249 | + array( 'name' => 'graphcolor', 'type' => 'enumeration', 'description' => wfMsg( 'srf_paramdesc_graphcolor' ), 'values'=> array( 'yes', 'no' ) ), |
| 250 | + array( 'name' => 'nodeshape', 'type' => 'enumeration', 'description' => wfMsg( 'srf-paramdesc-graph-nodeshape' ), 'values'=> self::$NODE_SHAPES ), |
| 251 | + array( 'name' => 'nameproperty', 'type' => 'text', 'description' => wfMsg( 'srf-paramdesc-graph-nameprop' ) ), |
| 252 | + array( 'name' => 'relation', 'type' => 'enumeration', 'description' => wfMsg( 'srf-paramdesc-graph-relation' ), 'values'=> array( 'parent', 'child' ) ), |
239 | 253 | ); |
240 | 254 | } |
241 | 255 | |
Index: trunk/extensions/SemanticResultFormats/SRF_Messages.php |
— | — | @@ -100,6 +100,10 @@ |
101 | 101 | 'srf_paramdesc_hashname' => 'If given and the HashTables extension is available this will create an hash with the specified name', |
102 | 102 | |
103 | 103 | // format "graph" |
| 104 | + 'srf-printername-graph' => 'Graph', |
| 105 | + 'srf-paramdesc-graph-relation' => 'Are the subjects or nameproperties parents or childs?', |
| 106 | + 'srf-paramdesc-graph-nameprop' => 'Allows setting a property that will be used as subject instead of the actual subject', |
| 107 | + 'srf-paramdesc-graph-nodeshape' => 'The shape of each node on the graph', |
104 | 108 | 'srf_paramdesc_graphname' => 'Title', |
105 | 109 | 'srf_paramdesc_graphsize' => 'Graph size (in px)', |
106 | 110 | 'srf_paramdesc_graphlegend' => 'Show graph legend or not', |