|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectstory.dbcore.links.RelatedNodes
public class RelatedNodes
A class representing one node's relationships with other nodes
under a certain link type. Contains both data for one node's
immediate links of some type to other nodes, as well as logic for
traversing graphs and compiling LinkSets, which are essentially
query results. Instances of this class may be passed around as
results to searches or whenever a node's related nodes must be
communicated. Thus it is read-only.
High-level classes shouldn't try to construct instances of this
class. Ask your DBCoreInterface for one instead.
The difference between RelatedNodes and LinkSet is that
RelatedNodes always reflects the underlying data while LinkSet is a
snapshot. (Also see numberOfLinks and numRelatedNodes functions).
The difference between RelatedNodes and LinkTable/LinkTableSet is
that the latter two provide a data structure for RelatedNodes to
store the link data, and RelatedNodes then applies logic.
Method Summary | |
---|---|
LinkLabelAddress |
findLinkLabelAddress(GenericNode relatedNode,
LinkLabel label)
Searches to see if the node is related to some particular node by a particular label, and if so, returns the LinkLabelAddress of that label. |
LinkSet |
getLinkSet(boolean overrideInference)
Compile and reveal a LinkSet of nodes related to this node. |
boolean |
isDirectlyRelatedTo(GenericNode relatedNode)
Determines whether or not the related nodes include a particular node, regardless of particular labeling. |
boolean |
isDirectlyRelatedTo(GenericNode relatedNode,
LinkLabelAddress labelAddress)
Determines whether or not the related nodes includes a particular node and a particular label. |
boolean |
isIndirectlyRelatedTo(GenericNode relatedNode)
Determines whether or not the related nodes include a particular node, regardless of particular labeling. |
int |
numberOfLinks()
Return the number of total links associated with this node, including multiple links for the same related node. |
int |
numRelatedNodes()
Return the number nodes directly related to this node, matter how many labels are associated with each node. |
java.lang.StringBuffer |
render()
Version of render whose overrideInference parameter defaults to false. |
java.lang.StringBuffer |
render(boolean overrideInference)
Render the data structure as a text table. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public boolean isDirectlyRelatedTo(GenericNode relatedNode, LinkLabelAddress labelAddress) throws Scheherexception
relatedNode
- The possibly related node you're curious about.label
- The exact label that the related node would have.
Scheherexception
public LinkLabelAddress findLinkLabelAddress(GenericNode relatedNode, LinkLabel label) throws Scheherexception
relatedNode
- The possibly related node you're curious about.label
- The exact label that the related node would have.
Scheherexception
public boolean isDirectlyRelatedTo(GenericNode relatedNode) throws Scheherexception
relatedNode
- The possibly related node you're curious about.
Scheherexception
public boolean isIndirectlyRelatedTo(GenericNode relatedNode) throws Scheherexception
relatedNode
- The possibly related node you're curious about.
Scheherexception
public int numRelatedNodes()
public int numberOfLinks()
public java.lang.StringBuffer render(boolean overrideInference) throws Scheherexception
overrideInference
- Set to true if you want to override
the rules of inference associated with the link type and only
render the nodes which are directly related (i.e., not by 2 or
more degrees).
Scheherexception
public java.lang.StringBuffer render() throws Scheherexception
Scheherexception
public LinkSet getLinkSet(boolean overrideInference) throws Scheherexception
overrideInference
- Set to true if you want to override
the rules of inference associated with the link type and only
compile the nodes which are directly related (i.e., not by 2 or
more degrees).
Scheherexception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |