story.dbcore.links
Class Via

java.lang.Object
  extended by story.dbcore.links.Via

public class Via
extends java.lang.Object

A class encapsulating a few data fields bound together. Semantically, it represents the "route" via which two nodes are related, for populating a LinkList: the link, the link type, and the nodes on each side of the link. (Those two nodes may be entirely different from the two nodes involved in the overall query, due to inference rules.)

TODO: beef this up to include sub-vias, i.e., explaining how the left and right nodes themselves are relevant.


Constructor Summary
Via(LinkLabelRepository labelRepository, NodeAddress left, LinkType linkType, NodeAddress right, LinkLabelAddress labelAddress, Via leftSubVia, Via rightSubVia)
          Constructor
 
Method Summary
 NodeAddress from()
          Retrieve the left node.
 boolean hasSubVias()
          Retrieve whether there are sub-vias.
 LinkLabel label()
          Retrieve the link label.
 LinkType linkType()
          Retrieve the link type.
 java.lang.StringBuffer render()
          Version of render whose includeLabel defaults to true.
 java.lang.StringBuffer render(boolean includeLabel)
          Render the Via to a StringBuffer.
 NodeAddress to()
          Retrieve the right node.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Via

public Via(LinkLabelRepository labelRepository,
           NodeAddress left,
           LinkType linkType,
           NodeAddress right,
           LinkLabelAddress labelAddress,
           Via leftSubVia,
           Via rightSubVia)
    throws Scheherexception
Constructor

Parameters:
left - The node on the left side of the relevant link.
linkType - The type of the relevant link.
right - The node on the right side of the relevant link.
labelAddress - The label for the relevant link.
Throws:
Scheherexception
Method Detail

hasSubVias

public boolean hasSubVias()
Retrieve whether there are sub-vias.


label

public LinkLabel label()
Retrieve the link label.


from

public NodeAddress from()
Retrieve the left node.


to

public NodeAddress to()
Retrieve the right node.


linkType

public LinkType linkType()
Retrieve the link type.


render

public java.lang.StringBuffer render()
                              throws Scheherexception
Version of render whose includeLabel defaults to true.

Throws:
Scheherexception

render

public java.lang.StringBuffer render(boolean includeLabel)
                              throws Scheherexception
Render the Via to a StringBuffer.

Note: this rendering does not end in a newline.

Throws:
Scheherexception


Copyright © 2011 David K. Elson. All Rights Reserved.