Difference between revisions of "Template:ListEdgesWIP"

From AtlasWiki
Jump to: navigation, search
(Extra whitespace is due to the output starting with a table, and cannot be avoided (it is automatically added by mediawiki), reverting)
(experimental work to list inherited edges)
Line 2: Line 2:
  
 
Currently lists just the node/edge pairs that point explicitly to/from this kind of node, ignoring superkinds.
 
Currently lists just the node/edge pairs that point explicitly to/from this kind of node, ignoring superkinds.
</noinclude>{{#ask: [[edge to {{FULLPAGENAME}}::+]]
+
</noinclude>{{#ask: [[edge to {{PAGENAME}}::+]]
| ?edge to {{FULLPAGENAME}}
+
| ?edge to {{PAGENAME}}
 
| format=array
 
| format=array
 
| headers=hide
 
| headers=hide
Line 23: Line 23:
 
{{!}}-
 
{{!}}-
 
{{!}}{{#arrayprint:inEdges|{{!}}-
 
{{!}}{{#arrayprint:inEdges|{{!}}-
{{!}}|var|[[{{#explode:var|$SEP$|0}}]] {{!}}{{!}} [[{{#explode:var|$SEP$|1}}]] {{!}}{{!}} {{#explode:var|$SEP$|2}} {{!}}{{!}} {{#explode:var|$SEP$|3}} }}
+
{{!}}|var|[[{{#explode:var|$SEP$|0}}]] {{!}}{{!}} [[{{#explode:var|$SEP$|1}}]] {{!}}{{!}} {{#explode:var|$SEP$|2}} {{!}}{{!}} {{ReconstructLinks|{{#explode:var|$SEP$|3}}}} }}
 
{{!}}}  
 
{{!}}}  
 
}}<noinclude><!--
 
}}<noinclude><!--
 +
 +
Now we need to find, then print inherited edges, starting with one step up the inheritance hierarchy:
 +
 +
--></noinclude>{| class="xcsgtable"
 +
|-
 +
! Inherited From!! In Edge  !! Predecessor (Comes From) !! Multiplicity !! Description
 +
{{InheritEdgesTo|{{#show:{{PAGENAME}}|?extends}}}}
 +
{{InheritEdgesTo|{{#show:extends.{{PAGENAME}}|?extends}}}}
 +
|}<noinclude><!--
  
 
Next we get the out edges:
 
Next we get the out edges:
  
--></noinclude>{{#ask: [[edge from {{FULLPAGENAME}}::+]]
+
--></noinclude>{{#ask: [[edge from {{PAGENAME}}::+]]
| ?edge from {{FULLPAGENAME}}
+
| ?edge from {{PAGENAME}}
 
| format=array
 
| format=array
 
| headers=hide
 
| headers=hide
Line 50: Line 59:
 
{{!}}-
 
{{!}}-
 
{{!}}{{#arrayprint:outEdges|{{!}}-
 
{{!}}{{#arrayprint:outEdges|{{!}}-
{{!}}|var|[[{{#explode:var|$SEP$|0}}]] {{!}}{{!}} [[{{#explode:var|$SEP$|1}}]] {{!}}{{!}} {{#explode:var|$SEP$|2}} {{!}}{{!}} {{#explode:var|$SEP$|3}} }}
+
{{!}}|var|[[{{#explode:var|$SEP$|0}}]] {{!}}{{!}} [[{{#explode:var|$SEP$|1}}]] {{!}}{{!}} {{#explode:var|$SEP$|2}} {{!}}{{!}} {{ReconstructLinks|{{#explode:var|$SEP$|3}}}} }}
 
{{!}}}  
 
{{!}}}  
 
}}
 
}}

Revision as of 12:52, 21 April 2014

For use on node kind pages; will eventually automatically lists all known kinds of in and out edges to/from this kind of node, and the kinds of nodes those edges come from.

Currently lists just the node/edge pairs that point explicitly to/from this kind of node, ignoring superkinds.

Inherited From In Edge Predecessor (Comes From) Multiplicity Description