|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectstory.dbcore.links.LinkRepository
public class LinkRepository
This class is the root of the class hierarchy for the storage and
management of links between nodes.
Note: this is only meant to be instantiated within a Document and
other methods are only to be called from the Document. If you
want to manage links, do it through the DBCoreInterface.
Constructor Summary | |
---|---|
LinkRepository(Document parentDocument,
LinkProperties linkProperties)
Constructor. |
Method Summary | |
---|---|
LinkLabelAddress |
addLink(GenericNode from,
LinkType linkType,
GenericNode to,
LinkLabel label)
Associate two nodes with a link. |
LinkLabelAddress |
addLinkWithExtantLabel(GenericNode from,
LinkType linkType,
GenericNode to,
LinkLabelAddress labelAddress)
Associate two nodes with a link and annotate it with a label already in the system. |
boolean |
areRelatedDirectly(GenericNode from,
LinkType linkType,
GenericNode to)
|
boolean |
areRelatedIndirectly(GenericNode from,
LinkType linkType,
GenericNode to)
|
LinkLabelAddress |
findLinkLabelAddress(GenericNode from,
LinkType linkType,
GenericNode to,
LinkLabel label)
Search to see if two nodes are linked by a LinkLabel equivalent to a given one and, if so, return the address of the matching LinkLabel. |
LinkProperties |
getLinkProperties()
|
RelatedNodes |
getLinksFromNode(GenericNode from,
LinkType linkType)
Get a RelatedNodes of nodes and labels that occur on the right side of a given link from a given node. |
RelatedNodes |
getLinksOfNode(GenericNode node,
LinkType linkType,
LinkDirection direction)
Get a RelatedNodes of nodes and labels that occur on a given side of a given link to a given node. |
RelatedNodes |
getLinksOfNode(NodeAddress node,
LinkType linkType,
LinkDirection direction)
Version of getLinksOfNode that accepts a NodeAddress and will have the Document find the GenericNode. |
RelatedNodes |
getLinksToNode(GenericNode to,
LinkType linkType)
Get a RelatedNodes of nodes and labels that occur on the left side of a given link to a given node. |
ViaSet |
getLinkVias(GenericNode from,
LinkType linkType,
GenericNode to)
Get the Vias of the links between two nodes. |
CommandReturn |
isolateNode(GenericNode node,
LinkType linkType)
Remove all links of a certain type to and from a node. |
void |
removeLink(GenericNode from,
LinkType linkType,
GenericNode to,
LinkLabelAddress labelAddress)
Remove a particular link between two nodes. |
void |
removeLinkLabel(LinkLabelAddress labelAddress)
|
CommandReturn |
removeLinks(GenericNode from,
LinkType linkType,
GenericNode to)
Remove all direct links of a particular type between two nodes. |
void |
validateLinkInstancings()
Go through all the links to instancings and make sure this instancings still validate. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LinkRepository(Document parentDocument, LinkProperties linkProperties)
Method Detail |
---|
public LinkProperties getLinkProperties()
public RelatedNodes getLinksFromNode(GenericNode from, LinkType linkType) throws Scheherexception
from
- The node on the left side of the relationlinkType
- The type of link the nodes will be related as
Scheherexception
public RelatedNodes getLinksToNode(GenericNode to, LinkType linkType) throws Scheherexception
to
- The node on the right side of the relationlinkType
- The type of link the nodes will be related as
Scheherexception
public RelatedNodes getLinksOfNode(GenericNode node, LinkType linkType, LinkDirection direction) throws Scheherexception
node
- The node on the right side of the relationlinkType
- The type of link the nodes will be related asdirection
- The appropriate LinkDirection:
From for nodes that occur on the right side of the
given node; To for nodes on the left side.
Scheherexception
public RelatedNodes getLinksOfNode(NodeAddress node, LinkType linkType, LinkDirection direction) throws Scheherexception
Scheherexception
public LinkLabelAddress addLink(GenericNode from, LinkType linkType, GenericNode to, LinkLabel label) throws Scheherexception
from
- The node on the left side of the link.linkType
- The type of link with which to associate the nodes.to
- The node on the right side of the link.label
- The label for the link.
Scheherexception
- For any error including those listed above.public LinkLabelAddress addLinkWithExtantLabel(GenericNode from, LinkType linkType, GenericNode to, LinkLabelAddress labelAddress) throws Scheherexception
Scheherexception
public void removeLink(GenericNode from, LinkType linkType, GenericNode to, LinkLabelAddress labelAddress) throws Scheherexception
from
- The node on the left side of the link.linkType
- The type of link with which to associate the nodes.to
- The node on the right side of the link.label
- The label of the link to remove.
Scheherexception
- For any error including those listed above.public CommandReturn removeLinks(GenericNode from, LinkType linkType, GenericNode to) throws Scheherexception
from
- The node on the left side of the link.linkType
- The type of link with which to associate the nodes.to
- The node on the right side of the link.
Scheherexception
- For any error including those listed above.public LinkLabelAddress findLinkLabelAddress(GenericNode from, LinkType linkType, GenericNode to, LinkLabel label) throws Scheherexception
Scheherexception
public void removeLinkLabel(LinkLabelAddress labelAddress) throws Scheherexception
Scheherexception
public CommandReturn isolateNode(GenericNode node, LinkType linkType) throws Scheherexception
Scheherexception
public ViaSet getLinkVias(GenericNode from, LinkType linkType, GenericNode to) throws Scheherexception
Scheherexception
public void validateLinkInstancings() throws Scheherexception
Scheherexception
public boolean areRelatedDirectly(GenericNode from, LinkType linkType, GenericNode to) throws Scheherexception
Scheherexception
public boolean areRelatedIndirectly(GenericNode from, LinkType linkType, GenericNode to) throws Scheherexception
Scheherexception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |