|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectstory.dbcore.links.LinkSet
public class LinkSet
A flat (non-hierarchical) container for nodes and link metadata.
More specifically, it is in instances of this class that
RelatedNodes compiles lists of nodes to answer "what nodes are
related" queries. 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.
It holds a set of NodeAddresses, which semantically
represent the nodes to which some other node (unknown by this
class) links according to some query. For each node, the LinkSet
also holds one or more Via objects. Each Via
object represents one "route" to the GenericNode: what the
relevant label is, and what nodes the link involves. (The link may
not be between the unseen origin node and the GenericNode;
there may have been inference.)
Unlike RelatedNodes, instances of this class are
static, and will not change as the underlying data does. Always
query a RelatedNodes or Document for a fresh LinkSet whenever
current query results are needed.
Constructor Summary | |
---|---|
LinkSet()
|
Method Summary | |
---|---|
boolean |
contains(NodeAddress node)
Determines whether the LinkSet contains a particular node (regardless of the number of Vias it is linked by) . |
ViaSet |
getAllVias()
Get a ViaSet of all the Vias for all linked nodes. |
ViaSet |
getAllVias(NodeAddress node)
Get a ViaSet of all the Vias for a particular node. |
NodeAddress |
getFirstLinkedNode()
Get the first linked node. |
Via |
getFirstVia()
Get the first Via of the first linked node. |
Via |
getFirstVia(NodeAddress node)
Get the first Via for a particular node |
java.util.Enumeration |
getImmutableLinkedNodes()
Get an Enumeration of NodeAddresses of linked nodes by first copying the list. |
java.util.Enumeration |
getLinkedNodes()
Get an Enumeration of NodeAddresses of linked nodes. |
int |
numberOfLinks()
Gives the number of links among all linked nodes |
int |
numLinkedNodes()
Gives the number of linked nodes in the LinkSet |
java.lang.StringBuffer |
render()
Render the LinkSet to a StringBuffer. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LinkSet()
Method Detail |
---|
public java.lang.StringBuffer render() throws Scheherexception
Scheherexception
public boolean contains(NodeAddress node)
node
- The node you'd like to know about.public java.util.Enumeration getLinkedNodes()
public java.util.Enumeration getImmutableLinkedNodes()
public int numberOfLinks()
public int numLinkedNodes()
public NodeAddress getFirstLinkedNode() throws Scheherexception
Scheherexception
public Via getFirstVia()
public Via getFirstVia(NodeAddress node)
public ViaSet getAllVias(NodeAddress node) throws Scheherexception
Scheherexception
public ViaSet getAllVias() throws Scheherexception
Scheherexception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |