freemind.modes
Interface MindMapLinkRegistry

All Known Implementing Classes:
LinkRegistryAdapter

public interface MindMapLinkRegistry

Interface for the registry, which manages the ids of nodes and the existing links in a map. Thus, this interface is bound to a map model, because other maps have a different registry.


Nested Class Summary
static interface MindMapLinkRegistry.ID_BasicState
          State parent interface.
static interface MindMapLinkRegistry.ID_Blank
          This state interface expresses the state that a node is blank (i.e.
static interface MindMapLinkRegistry.ID_Registered
          This state interface expresses the state that a node has an ID.
static interface MindMapLinkRegistry.ID_UsedState
          This state interface expresses the state that a node has an ID, but is abstract.
 
Method Summary
 void clearCuttedNodeBuffer()
          Clears the set of recent cutted nodes.
 void cutNode(MindMapNode target)
          Removes links to all nodes beginning from target with its children.
 void deregisterLink(MindMapLink link)
           
 void deregisterLinkTarget(MindMapNode target)
           
 java.lang.String generateUniqueID(java.lang.String proposedID)
          This can be used, if the id has to be known, before a node can be labled.
 java.lang.String generateUniqueLinkID(java.lang.String proposedID)
          This can be used, if the id has to be known, before a link can be labled.
 java.util.Vector getAllLinks(MindMapNode node)
           
 java.util.Vector getAllLinksFromMe(MindMapNode source)
           
 java.util.Vector getAllLinksIntoMe(MindMapNode target)
           
 java.util.Vector getAllSources(MindMapNode target)
          Returns a Vector of Nodes that point to the given node.
 java.util.Vector getCuttedNode(java.lang.String oldTargetID)
           
 java.lang.String getLabel(MindMapNode target)
           
 MindMapLink getLinkForID(java.lang.String ID)
          Reverses the getUniqueID method: searches for a link with the id given as the argument.
 MindMapLinkRegistry.ID_BasicState getState(MindMapNode node)
           
 MindMapNode getTargetForID(java.lang.String ID)
          Reverses the getLabel method: searches for a node with the id given as the argument.
 void registerLink(MindMapLink link)
           
 MindMapLinkRegistry.ID_Registered registerLinkTarget(MindMapNode target)
          The main method.
 MindMapLinkRegistry.ID_Registered registerLinkTarget(MindMapNode target, java.lang.String proposedID)
          The second variant of the main method.
 

Method Detail

registerLinkTarget

public MindMapLinkRegistry.ID_Registered registerLinkTarget(MindMapNode target)
The main method. Registeres a node with a new (or an existing) node-id. If the state of the id is pending, then it is set to registered again.


registerLinkTarget

public MindMapLinkRegistry.ID_Registered registerLinkTarget(MindMapNode target,
                                                            java.lang.String proposedID)
The second variant of the main method. The difference is that here an ID is proposed, but has not to be taken, though.


deregisterLinkTarget

public void deregisterLinkTarget(MindMapNode target)
                          throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

getState

public MindMapLinkRegistry.ID_BasicState getState(MindMapNode node)

getLabel

public java.lang.String getLabel(MindMapNode target)

generateUniqueID

public java.lang.String generateUniqueID(java.lang.String proposedID)
This can be used, if the id has to be known, before a node can be labled.


getTargetForID

public MindMapNode getTargetForID(java.lang.String ID)
Reverses the getLabel method: searches for a node with the id given as the argument.


generateUniqueLinkID

public java.lang.String generateUniqueLinkID(java.lang.String proposedID)
This can be used, if the id has to be known, before a link can be labled.


getLinkForID

public MindMapLink getLinkForID(java.lang.String ID)
Reverses the getUniqueID method: searches for a link with the id given as the argument.


cutNode

public void cutNode(MindMapNode target)
Removes links to all nodes beginning from target with its children.


clearCuttedNodeBuffer

public void clearCuttedNodeBuffer()
Clears the set of recent cutted nodes.


getCuttedNode

public java.util.Vector getCuttedNode(java.lang.String oldTargetID)
Returns:
returns all links that have been cutted out recently.

registerLink

public void registerLink(MindMapLink link)

deregisterLink

public void deregisterLink(MindMapLink link)

getAllSources

public java.util.Vector getAllSources(MindMapNode target)
Returns a Vector of Nodes that point to the given node.


getAllLinks

public java.util.Vector getAllLinks(MindMapNode node)
Returns:
returns all links from or to this node.

getAllLinksIntoMe

public java.util.Vector getAllLinksIntoMe(MindMapNode target)
Returns:
returns all links to this node.

getAllLinksFromMe

public java.util.Vector getAllLinksFromMe(MindMapNode source)
Returns:
returns all links from this node.