story.dbcore.parameters
Class NodesRelatedParameter

java.lang.Object
  extended by story.dbcore.parameters.Parameter
      extended by story.dbcore.parameters.BooleanReturnParameter
          extended by story.dbcore.parameters.NodesRelatedParameter

public class NodesRelatedParameter
extends BooleanReturnParameter

A filter (BooleanReturn) parameter testing whether some two nodes are related by some link type. Works for either previously matched nodes in references or concrete nodes. Also includes a constructor to filter for whether two nodes are the same.


Constructor Summary
NodesRelatedParameter(NodeAddress node1, LinkType linkType, NodeAddress node2, boolean overrideInference)
          Constructor for checking the relationship between two concrete nodes.
NodesRelatedParameter(NodeAddress node1, LinkType linkType, VariableID node2reference, boolean overrideInference)
          Constructor for checking the relationship between one concrete and one previously matched node.
NodesRelatedParameter(VariableID node1reference, LinkType linkType, NodeAddress node2, boolean overrideInference)
          Constructor for checking the relationship between one concrete and one previously matched node.
NodesRelatedParameter(VariableID node1reference, LinkType linkType, VariableID node2reference, boolean overrideInference)
          Constructor for checking the relationship between two previously matched nodes.
NodesRelatedParameter(VariableID node1reference, NodeAddress node2)
          Constructor for checking if a previously matched node is the same as some constant node.
NodesRelatedParameter(VariableID node1reference, VariableID node2reference)
          Constructor for checking if two previously matched nodes are the same.
 
Method Summary
 NodeAddressSet assumedNodes()
          Each concretizing class needs to provide a list of nodes that it assumes exist prior to evaluation, i.e., concrete nodes with which it is constructed.
 LinkType getLinkType()
          Returns the type of link that this parameter concerns.
 NodeAddress getNode1AsAddress()
          Get the address of node 1.
 VariableID getNode1AsReference()
          Get the VariableID of the reference storing node 1 for this parameter.
 NodeAddress getNode2AsAddress()
          Get the address of node 2.
 VariableID getNode2AsReference()
          Get the VariableID of the reference storing node 2 for this parameter.
 boolean getOverrideInference()
          Returns whether relationship inference should be overridden (turned off) for the testing of this parameter.
 boolean getTestingEquality()
          Returns whether the relationship being tested is node equality in particuar.
 Parameter makeCopy()
          All Parameters must include a self-duplication function.
 boolean node1UsesReference()
          Return whether node 1 is accessible by getNode1AsReference or getNode1AsAddress, which depends on which constructor was used.
 boolean node2UsesReference()
          Return whether node 2 is accessible by getNode1AsReference or getNode1AsAddress, which depends on which constructor was used.
 ReferenceReqSet referenceRequirements()
          Each concretizing class needs to provide a ReferenceReqSet of all the references which must be set prior to the parameter's evaluation.
 java.lang.StringBuffer specificRender()
          Render as a StringBuffer
 
Methods inherited from class story.dbcore.parameters.Parameter
makeClone, render
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodesRelatedParameter

public NodesRelatedParameter(VariableID node1reference,
                             LinkType linkType,
                             VariableID node2reference,
                             boolean overrideInference)
Constructor for checking the relationship between two previously matched nodes.


NodesRelatedParameter

public NodesRelatedParameter(VariableID node1reference,
                             LinkType linkType,
                             NodeAddress node2,
                             boolean overrideInference)
Constructor for checking the relationship between one concrete and one previously matched node.


NodesRelatedParameter

public NodesRelatedParameter(NodeAddress node1,
                             LinkType linkType,
                             VariableID node2reference,
                             boolean overrideInference)
Constructor for checking the relationship between one concrete and one previously matched node.


NodesRelatedParameter

public NodesRelatedParameter(NodeAddress node1,
                             LinkType linkType,
                             NodeAddress node2,
                             boolean overrideInference)
Constructor for checking the relationship between two concrete nodes. (Note: this is a constant!)


NodesRelatedParameter

public NodesRelatedParameter(VariableID node1reference,
                             NodeAddress node2)
Constructor for checking if a previously matched node is the same as some constant node.


NodesRelatedParameter

public NodesRelatedParameter(VariableID node1reference,
                             VariableID node2reference)
Constructor for checking if two previously matched nodes are the same.

Method Detail

node1UsesReference

public boolean node1UsesReference()
Return whether node 1 is accessible by getNode1AsReference or getNode1AsAddress, which depends on which constructor was used.


node2UsesReference

public boolean node2UsesReference()
Return whether node 2 is accessible by getNode1AsReference or getNode1AsAddress, which depends on which constructor was used.


getNode1AsReference

public VariableID getNode1AsReference()
                               throws Scheherexception
Get the VariableID of the reference storing node 1 for this parameter. Throws an exception of this parameter was constructed with node 1 as a concrete address.

Throws:
Scheherexception

getNode2AsReference

public VariableID getNode2AsReference()
                               throws Scheherexception
Get the VariableID of the reference storing node 2 for this parameter. Throws an exception of this parameter was constructed with node 2 as a concrete address.

Throws:
Scheherexception

getNode1AsAddress

public NodeAddress getNode1AsAddress()
                              throws Scheherexception
Get the address of node 1. Throws an exception of this parameter was constructed with node 1 as a reference.

Throws:
Scheherexception

getNode2AsAddress

public NodeAddress getNode2AsAddress()
                              throws Scheherexception
Get the address of node 2. Throws an exception of this parameter was constructed with node 2 as a reference.

Throws:
Scheherexception

getOverrideInference

public boolean getOverrideInference()
Returns whether relationship inference should be overridden (turned off) for the testing of this parameter.


getTestingEquality

public boolean getTestingEquality()
Returns whether the relationship being tested is node equality in particuar.


getLinkType

public LinkType getLinkType()
Returns the type of link that this parameter concerns.


specificRender

public java.lang.StringBuffer specificRender()
                                      throws Scheherexception
Render as a StringBuffer

Specified by:
specificRender in class Parameter
Throws:
Scheherexception

referenceRequirements

public ReferenceReqSet referenceRequirements()
Description copied from class: Parameter
Each concretizing class needs to provide a ReferenceReqSet of all the references which must be set prior to the parameter's evaluation.

Specified by:
referenceRequirements in class Parameter

makeCopy

public Parameter makeCopy()
Description copied from class: Parameter
All Parameters must include a self-duplication function.

Specified by:
makeCopy in class Parameter

assumedNodes

public NodeAddressSet assumedNodes()
Description copied from class: Parameter
Each concretizing class needs to provide a list of nodes that it assumes exist prior to evaluation, i.e., concrete nodes with which it is constructed.

Specified by:
assumedNodes in class Parameter


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