|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectstory.dbcore.links.RelatedNodes
story.dbcore.links.WritableRelatedNodes
public class WritableRelatedNodes
Extension of RelatedNodes that supports write operations and thus should not be passed around out of the LinkRepository.
Constructor Summary | |
---|---|
WritableRelatedNodes(GenericNode newOriginNode,
LinkType newLinkType,
LinkDirection direction,
LinkRepository linkRepository,
boolean simple)
Public constructor. |
Method Summary | |
---|---|
void |
add(GenericNode newRelatedNode,
LinkLabelAddress newLabelAddress)
Add a new related node. |
void |
clearAllRelations()
Clear all links to all nodes. |
void |
remove(GenericNode deadRelatedNode)
Remove all links to a particular node. |
void |
remove(GenericNode deadRelatedNode,
LinkLabelAddress deadLabelAddress)
Remove a particular link to a particular node. |
Methods inherited from class story.dbcore.links.RelatedNodes |
---|
findLinkLabelAddress, getLinkSet, isDirectlyRelatedTo, isDirectlyRelatedTo, isIndirectlyRelatedTo, numberOfLinks, numRelatedNodes, render, render |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WritableRelatedNodes(GenericNode newOriginNode, LinkType newLinkType, LinkDirection direction, LinkRepository linkRepository, boolean simple)
newOriginNode
- The node to which this object's set of
nodes are to be relatednewLinkType
- The type of link to which this object's set of
nodes are to be related to newOriginNodeparentLR
- The LinkRepository of which we will be a member.direction
- The semantic distinction: are these nodes
related From or To the originNode?linkProperties
- A LinkProperties objectMethod Detail |
---|
public void add(GenericNode newRelatedNode, LinkLabelAddress newLabelAddress) throws Scheherexception
newRelatedNode
- The new related node to add. (This will
add blindly without any circularity checks, type checks, etc.
That all happens in LinkRepository.)newLabel
- Label to attach to the new link to the related node.
Scheherexception
public void remove(GenericNode deadRelatedNode, LinkLabelAddress deadLabelAddress) throws Scheherexception
deadRelatedNode
- The node you'd like to remove a particular link to.deadLabel
- The label of the particular link you'd like to remove.
Sceheherexception
- Throws an error if the node is not connected with that particular label.
Scheherexception
public void remove(GenericNode deadRelatedNode) throws Scheherexception
deadRelatedNode
- The node you'd like to remove all links to.
Scheherexception
public void clearAllRelations()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |