com.tensegrity.graph.rule
Class NodeRule

java.lang.Object
  extended bycom.tensegrity.graph.rule.AbstractRule
      extended bycom.tensegrity.graph.rule.AbstractGraphObjectRule
          extended bycom.tensegrity.graph.rule.NodeRule
All Implemented Interfaces:
GraphObjectRule, Rule, java.io.Serializable

public class NodeRule
extends AbstractGraphObjectRule
implements java.io.Serializable

Class NodeRule implements the rule template for VisualNode objects. Such a rule contains a set of properties whose combined values, including those defined in GraphObjectRule, define the runtime behavior of those nodes which are associated with the rule.

The attributes supported by the NodeRule are listed below. You can find detailed information about each attribute afterwards.

The minimum-indegree attribute specifies the minimum number of incoming VisualEdges. For the indegree those VisualEdges are counted that are connected with their target end to a VisualPort of a VisualNode.
The value for attribute is restricted to be an integer >= 0.
This attribute is used with user interaction only.
The methods provided by the NodeRule to support the indegree-minimum attribute are listed below:

The maximum-indegree attribute specifies the upper bound for the number of incoming VisualEdges. This means that the maximum number of incoming VisualEdges is calculated by the upper bound minus 1.
For the indegree those VisualEdges are counted that are connected with their target end to a VisualPort of a VisualNode.
The value for attribute is restricted to be an integer >= 0 whereas a value of zero is considered as unlimited.
This attribute is used with user interaction only.
The methods provided by the NodeRule to support the indegree-maximum attribute are listed below:

The minimum-outdegree attribute specifies the minimum number of outgoing VisualEdges. For the outdegree those VisualEdges are counted that are connected with their source end to a VisualPort of a VisualNode.
The value for attribute is restricted to be an integer >= 0.
This attribute is used with user interaction only.
The methods provided by the NodeRule to support the outdegree-minimum attribute are listed below:

The maximum-outdegree attribute specifies the upper bound for the number of outgoing VisualEdges. This means that the maximum number of outgoing VisualEdges is calculated by the upper bound minus 1. the maximum number of outgoing VisualEdges. For the outdegree those VisualEdges are counted that are connected with their source end to a VisualPort of a VisualNode.
The value for attribute is restricted to be an integer >= 0 whereas a value of zero is considered as unlimited.
This attribute is used with user interaction only.
The methods provided by the NodeRule to support the outdegree-maximum attribute are listed below:

The instance-minimum attribute specifies the minimum number of instances for VisualNodes of a certain type. VisualNodes with the same rule are considered to be of the same type.
The value for attribute is restricted to be an integer >= 0.
This attribute is used with user interaction only.
The methods provided by the NodeRule to support the instance-minimum attribute are listed below:

The instance-maximum attribute specifies the upper bound for the number of of instances of VisualNodes of a certain type. This means that the maximum number of such VisualNodes is calculated by the upper bound minus 1.
VisualNodes with the same rule are considered to be of the same type.
The value for attribute is restricted to be an integer >= 0 whereas a value of zero is considered as unlimited.
This attribute is not only used with user interaction but also with API calls.
The methods provided by the NodeRule to support the instance-maximum attribute are listed below:

The draw-ports attribute specifies whether the VisualPorts of the VisualNode, it is assigned to, are highlighted when a VisualEdge is moved with the mouse. This attribute is used with user interaction only.
The methods provided by the NodeRule to support the draw-ports attribute are listed below:

The detach-on-move attribute specifies whether to detach all adjacent VisualEdges from the VisualNode when the location of the VisualNode changes. This attribute is not only used with user interaction but also for API calls.
The methods provided by the NodeRule to support the detach-on-move attribute are listed below:

The cascade-11node-delete attribute specifies whether to take the inbound VisualEdge and the outbound VisualEdge and replace them with a connected replacement VisualEdge that is connected to the same endpoints. This setting can only be applied to so-called 1-1-Nodes. 1-1-Nodes are VisualNodes with an indegree of exactly one and an outdegree of exactly one.
This attribute is not only used with user interaction but also for API calls.
The methods provided by the NodeRule to support the cascade-1To1-node-delete attribute are listed below:

The cascade-delete-edges attribute specifies whether to delete all adjacent VisualEdges when the VisualNode, they are connected to, is removed from a VisualGraph.
This attribute is not only used with user interaction but also for API calls.
The methods provided by the NodeRule to support the cascade-delete-edges attribute are listed below:

The prohibit-edge-split attribute specifies whether edge-split operations are prohibited.
Notice:For further information about edge-split operations please see the documentation of EdgeRule
This attribute is used with user interaction only.
The methods provided by the NodeRule to support the prohibit-edge-split attribute are listed below:

The disallowed-edge-split-nodes attribute specifies a list of VisualNodes that are not allowed to split a VisualEdge. The VisualNode objects are specified by means of a comma-separated list of rule-names that are assigned to the VisualNode.
This attribute is cared only when the VisualNode, it is assigned to, is an instance of a VisualSubgraph.
This attribute is used with user interaction only.
The methods provided by the NodeRule to support the disallowed-edge-split-nodes attribute are listed below:

The accept-loose-nodes-if-subgraph attribute specifies whether the VisualNode, this rule is assigned to, accepts loose VisualNodes inside of it. Loose VisualNodes are those with an indegree and an outdegree of zero.
In the case that a VisualNode is added and it is a loose one but crosses a VisualEdge with enabled edge-insert-mode, the VisualNode is not considered as a loose VisualNode
This attribute is cared only when the VisualNode, it is assigned to, is an instance of a VisualSubgraph.
This attribute is not only used with user interaction but also for API calls.
The methods provided by the NodeRule to support the accept-loose-nodes-if-subgraph attribute are listed below:

The accept-paste-if-subgraph attribute specifies whether the VisualNode, this rule is assigned to, accepts paste operations into it.
This attribute is cared only when the VisualNode, it is assigned to, is an instance of a VisualSubgraph.
This attribute is not only used with user interaction but also for API calls.
The methods provided by the NodeRule to support the accept-paste-if-subgraph attribute are listed below:

The legal-subgraphs attribute specifies a list of VisualSubgraphs that may contain this type of VisualNode. The VisualSubgraphs are specified by means of a coma-separated list of rule names that are assigned to the VisualSubgraphs.
This attribute is used with user interaction only.
The methods provided by the NodeRule to support the legal-subgraphs attribute are listed below:

The node-overlay-edge-creation attribute specifies whether to automatically create a VisualEdge if a VisualNode is positioned over another VisualNode. This means exactly when the union of the bounding boxes of the two VisualNodes is not empty.
The following String values are supported:

ValueDescription
none When the attributes value is set to 'none' node-overlay-edge-creation is disabled.
forward When the attributes value is set to 'forward' a VisualEdge is created from the underlying VisualNode to the above VisualNode.
backward When the attributes value is set to 'backward' a VisualEdge is created from the above VisualNode to the underlying VisualNode.
If a VisualEdge with the desired orientation already exists between the two VisualNodes another VisualEdge will not be created.
This attribute is used with user interaction only.
The methods provided by the NodeRule to support the overlay-edge-creation attribute are listed below:

The node-overlay-indication-handler attribute specifies the name of the VisualNodeOverlayIndicationHandler to invoke when another node is dragged and obscuring (overlaying) the VisualNode that this rule is assigned to.
Normally the VisualNodeOverlayIndicationHandler is used with the overlay-edge-creation in order to display a different overlay-edge-creation-highlight than the GraphAPI provides by default.
It is NOT allowed to perform any operation on a VisualGraph when the VisualNodeOverlayIndicationHandler gets called by the GraphAPI.
For further information about visualnode-overlayindication-handlers please see the documentation of VisualNodeOverlayIndicationHandler
This attribute is only used with user interaction.
The methods provided by the NodeRule to support the overlay-handler-name attribute are listed below:

The node-drop-handler attribute specifies the name of the VisualNodeDropHandler instance to invoke when a VisualNode is dropped on/added to the VisualNode this rule is assigned to.
This attribute is cared only when the VisualNode, it is assigned to, is an instance of a VisualSubgraph.
This attribute is used with user interaction only.
For further information about node-drop-handlers please see the documentation of VisualNodeDropHandler
The methods provided by the NodeRule to support the drop-handler-name attribute are listed below:

The subgraph-remove-handler attribute specifies the name of the VisualSubgraphRemoveHandler instance to invoke when a VisualNode is removed from the VisualNode this rule is assigned to.
This attribute is cared only when the VisualNode, it is assigned to, is an instance of a VisualSubgraph.
This attribute is used with user interaction only.
For further information about remove-handlers please see the documentation of VisualSubgraphRemoveHandler
The methods provided by the NodeRule to support the remove-handler-name attribute are listed below:

The node-moved-in-subgraph-handler attribute specifies the name of the VisualNodeMovedInSubgraphHander instance to invoke when a VisualNode is moved within the VisualNode this rule is assigned to.
This attribute is cared only when the VisualNode, it is assigned to, is an instance of a VisualSubgraph.
This attribute is used with user interaction only.
For further information about visualnode-movedinsubgraph-handlers please see the documentation of VisualNodeMovedInSubgraphHandler
The methods provided by the NodeRule to support the node-moved-in-subgraph-handler attribute are listed below:

Version:
$Id: NodeRule.java,v 1.68 2006/04/28 13:18:18 MichaelKegel Exp $
Author:
Stepan Rutz
See Also:
RuleRegistry, Serialized Form

Constructor Summary
NodeRule(NodeRule rule)
          Copy constructor for a NodeRule.
NodeRule(java.lang.String name)
          Constructs a new node rule.
 
Method Summary
 boolean applyCascadeNodeDeleteHierarchical()
           
 boolean applyDegreesHierarchical()
           
 boolean applyEdgeSplitHierarchical()
           
 Rule deepCopy()
          Returns a deepCopy of this rule.
 boolean equals(java.lang.Object obj)
           
 java.lang.String getDescription()
          Return a string description of this rule.
 java.util.Set getDisallowedEdgeSplitNodes()
          Returns the names of the disallowed edge-split nodes as a Set or null if there are no disallowed edge-split nodes registered which means that all nodes are allowed to split edges.
 java.lang.String getDisallowedEdgeSplitNodesAsString()
          Returns the disallowed edge-split nodes list concatenated into a single string where tokens are delimited by a comma.
 java.lang.String getDisallowEdgeSplitRule()
          Deprecated. make use of either getDisallowedEdgeSplitNodes() or getDisallowedEdgeSplitNodesAsString() instead
 java.lang.String getDropHandlerName()
          Gets the name that identifies the VisualNodeDropHandler for this rule.
 int getIndegreeMaximum()
          Returns the indegreeMaximum value for this rule instance.
 int getIndegreeMinimum()
          Returns the indegreeMinimum value for this rule instance.
 int getInstanceMaximum()
          Returns the instanceMaximum value for this rule instance.
 int getInstanceMinimum()
          Returns the instanceMinimum value for this rule instance.
 java.lang.String getLegalSubgraphsAsString()
          Returns the is-legal-subgraph list concatenated into a single string where tokens are delimited by a comma.
 java.util.Set getLegalSubgraps()
          Returns the names of the legal-subgraphs as a Set or null if there are no legal-subgraphs registered which means that all subgraphs are legal.
 java.lang.String getNodeMovedInSubgraphHandlerName()
          Gets the name that identifies the VisualNodeMovedInSubgraphHandler for this rule.
 int getOutdegreeMaximum()
          Returns the outdegreeMaximum value for this rule instance.
 int getOutdegreeMinimum()
          Returns the outdegreeMinimum value for this rule instance.
 java.lang.String getOverlayEdgeCreation()
          Gets the setting for automatic edge-creation on node overlay.
 java.lang.String getSubgraphRemoveHandlerName()
          Gets the name that identifies the VisualSubgraphRemoveHandler for this rule.
 java.lang.String getVisualNodeOverlayIndicationHandlerName()
          Gets the name that identifies the VisualNodeOverlayIndicationHandler for this rule.
 int hashCode()
           
 boolean isAcceptLooseNodesIfSubgraph()
          Returns the accept-loose-nodes-if-subgraph flag for this rule.
 boolean isAcceptOverlayEdgeCreation()
           
 boolean isAcceptPasteIfSubgraph()
          Returns the accept-paste-if-subgraph flag for this rule.
 boolean isCascade11NodeDelete()
          Returns the cascade 1-1-node deletion flag for this rule.
 boolean isCascadeDeleteEdges()
          Returns the cascade edges deletion flag for this rule.
 boolean isDetachOnMove()
          Returns the detach-on-move flag for this rule.
 boolean isDisallowedToSplitEdges(java.lang.String noderule)
          Returns a flag that indicates whether the node rule name given by noderule is allowed to split an edge or not.
 boolean isDrawPorts()
          Returns the draw-ports flag for this rule.
 boolean isEdgeSplitProhibited()
          Returns the edge-split-prohibited flag for this rule.
 boolean isLegalSubgraph(java.lang.String subgraphrule)
          Returns the is-legal-subgraph flag for this rule.
 void setAcceptLooseNodesIfSubgraph(boolean acceptLooseNodesIfSubgraph)
          Sets the accept-loose-nodes-if-subgraph flag for this rule.
 void setAcceptOverlayEdgeCreation(boolean acceptOverlayEdgeCreation)
           
 void setAcceptPasteIfSubgraph(boolean acceptPasteIfSubgraph)
          Sets the accept-paste-if-subgraph flag for this rule.
 void setApplyCascadeNodeDeleteHierarchical(boolean applyCascadeNodeDeleteHierarchical)
           
 void setApplyDegreesHierarchical(boolean applyDegreesHierarchical)
           
 void setApplyEdgeSplitHierarchical(boolean applyEdgeSplitHierarchical)
           
 void setCascade11NodeDelete(boolean cascade11nodedelete)
          Sets the cascade 1-1-node deletion flag for this rule.
 void setCascadeDeleteEdges(boolean cascadedeleteedges)
          Sets the cascade edge deletion flag for this rule.
 void setDetachOnMove(boolean detachOnMove)
          Sets the detach-on-move flag for this rule.
 void setDisallowedEdgeSplitNodes(java.util.Set disallowedEdgeSplitNodes)
          Sets the disallowed edge-split node rule names (as Strings) for this rule.
 void setDisallowEdgeSplitRule(java.lang.String disallowedEdgeSplitNodes)
          Deprecated. make use of setDisallowedEdgeSplitNodes(Set) instead
 void setDrawPorts(boolean drawports)
          Sets the draw-ports flag for this rule.
 void setDropHandlerName(java.lang.String drophandlername)
          Sets the name that identifies the VisualNodeDropHandler for this rule.
 void setEdgeSplitProhibited(boolean prohibitEdgeSplit)
          Sets the edge-split-prohibited flag for this rule.
 void setIndegreeMaximum(int indegreeMaximum)
          Sets the indegreeMeximum value for this rule instance.
 void setIndegreeMinimum(int indegreeMinimum)
          Sets the indegreeMinimum value for this rule instance.
 void setInstanceMaximum(int instanceMaximum)
          Sets the instanceMaximum value for this rule instance.
 void setInstanceMinimum(int instanceMinimum)
          Sets the instanceMinimum value for this rule instance.
 void setLegalSubgraphs(java.util.Set legalSubgraphRules)
          Sets the is-legal-subgraph rule names (as Strings) for this rule.
 void setNodeMovedInSubgraphHandlerName(java.lang.String nodemovedinsubgraphhandlername)
          Sets the name that identifies the VisualNodeMovedInSubgraphHandler for this rule.
 void setOutdegreeMaximum(int outdegreeMaximum)
          Sets the outdegreeMaximum value for this rule instance.
 void setOutdegreeMinimum(int outdegreeMinimum)
          Sets the outdegreeMinimum value for this rule instance.
 void setOverlayEdgeCreation(java.lang.String overlayEdgeCreation)
          Sets the setting for automatic edge-creation on node overlay.
 void setSubgraphRemoveHandlerName(java.lang.String removehandlername)
          Sets the name that identifies the VisualSubgraphRemoveHandler for this rule.
 void setVisualNodeOverlayIndicationHandlerName(java.lang.String overlayhandlername)
          Sets the name that identifies the VisualNodeOverlayIndicationHandler for this rule.
 java.lang.String toString()
          Return a string representation of this rule.
 
Methods inherited from class com.tensegrity.graph.rule.AbstractGraphObjectRule
getName, isCopyable, isCutable, isDeletable, isMovable, isResizable, isSelectable, setCopyable, setCutable, setDeletable, setMovable, setResizable, setSelectable
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.tensegrity.graph.rule.Rule
getName
 

Constructor Detail

NodeRule

public NodeRule(java.lang.String name)
Constructs a new node rule.

The properties are initialized with the following defaults:

All string-based properties default to null.

Parameters:
name - name of the rule, must not be null.

NodeRule

public NodeRule(NodeRule rule)
Copy constructor for a NodeRule.

Parameters:
rule - the source NodeRule to copy from.
Method Detail

getIndegreeMinimum

public int getIndegreeMinimum()
Returns the indegreeMinimum value for this rule instance.

Returns:
the current minimum value for the indegree-

Find more information in the class documentation


setIndegreeMinimum

public void setIndegreeMinimum(int indegreeMinimum)
Sets the indegreeMinimum value for this rule instance.

Parameters:
indegreeMinimum - The indegreeMinimum value to set, negative values are not allowed and trigger an InvalidArgumentException to be thrown.
Throws:
InvalidArgumentException - thrown if the specified value is negative.

Find more information in the class documentation


getIndegreeMaximum

public int getIndegreeMaximum()
Returns the indegreeMaximum value for this rule instance.

Returns:
the current maximum value for the indegree.

Find more information in the class documentation


setIndegreeMaximum

public void setIndegreeMaximum(int indegreeMaximum)
Sets the indegreeMeximum value for this rule instance.

Parameters:
indegreeMaximum - The indegreeMaximum value to set, negative values are not allowed and trigger an InvalidArgumentException to be thrown.
Throws:
InvalidArgumentException - thrown if the specified value is negative.

Find more information in the class documentation


getOutdegreeMinimum

public int getOutdegreeMinimum()
Returns the outdegreeMinimum value for this rule instance.

Returns:
the current maximum value for the outdegree.

Find more information in the class documentation


setOutdegreeMinimum

public void setOutdegreeMinimum(int outdegreeMinimum)
Sets the outdegreeMinimum value for this rule instance.

Parameters:
outdegreeMinimum - The outdegreeMinimum value to set, negative values are not allowed and trigger an InvalidArgumentException to be thrown.
Throws:
InvalidArgumentException - thrown if the specified value is negative.

Find more information in the class documentation


getOutdegreeMaximum

public int getOutdegreeMaximum()
Returns the outdegreeMaximum value for this rule instance.

Returns:
the current minimum value for the outdegree.

Find more information in the class documentation


setOutdegreeMaximum

public void setOutdegreeMaximum(int outdegreeMaximum)
Sets the outdegreeMaximum value for this rule instance.

Parameters:
outdegreeMaximum - The outdegreeMaximum value to set, negative values are not allowed and cause an InvalidArgumentException to be thrown.
Throws:
InvalidArgumentException - thrown if the specified value is negative.

Find more information in the class documentation


applyDegreesHierarchical

public boolean applyDegreesHierarchical()

setApplyDegreesHierarchical

public void setApplyDegreesHierarchical(boolean applyDegreesHierarchical)

getInstanceMinimum

public int getInstanceMinimum()
Returns the instanceMinimum value for this rule instance.

Returns:
the current minimum value for the instance count.

Find more information in the class documentation


setInstanceMinimum

public void setInstanceMinimum(int instanceMinimum)
Sets the instanceMinimum value for this rule instance.

Parameters:
instanceMinimum - The instanceMinimum value to set, negative values are not allowed and trigger an InvalidArgumentException to be thrown.
Throws:
InvalidArgumentException - thrown if the specified value is negative.

Find more information in the class documentation


getInstanceMaximum

public int getInstanceMaximum()
Returns the instanceMaximum value for this rule instance.

Returns:
the current maximum value for the instance count.

Find more information in the class documentation


setInstanceMaximum

public void setInstanceMaximum(int instanceMaximum)
Sets the instanceMaximum value for this rule instance.

Parameters:
instanceMaximum - The instanceMaximum value to set, negative values are not allowed and trigger an InvalidArgumentException to be thrown.
Throws:
InvalidArgumentException - thrown if the specified value is negative.

Find more information in the class documentation


isDrawPorts

public boolean isDrawPorts()
Returns the draw-ports flag for this rule.

Returns:
true if ports should be drawn.

Find more information in the class documentation


setDrawPorts

public void setDrawPorts(boolean drawports)
Sets the draw-ports flag for this rule.

Parameters:
drawports - true if ports should be drawn.

Find more information in the class documentation


isDetachOnMove

public boolean isDetachOnMove()
Returns the detach-on-move flag for this rule.

Returns:
true if the node is detached if it is moved.

Find more information in the class documentation


setDetachOnMove

public void setDetachOnMove(boolean detachOnMove)
Sets the detach-on-move flag for this rule.

Parameters:
detachOnMove - true if the node is detached if it is moved.

Find more information in the class documentation


isCascade11NodeDelete

public boolean isCascade11NodeDelete()
Returns the cascade 1-1-node deletion flag for this rule.

Returns:
true if the rule cascades 1-1-node deletions.

Find more information in the class documentation


setCascade11NodeDelete

public void setCascade11NodeDelete(boolean cascade11nodedelete)
Sets the cascade 1-1-node deletion flag for this rule.

Parameters:
cascade11nodedelete - true if the rule cascades 1-1-node deletions.

Find more information in the class documentation


applyCascadeNodeDeleteHierarchical

public boolean applyCascadeNodeDeleteHierarchical()

setApplyCascadeNodeDeleteHierarchical

public void setApplyCascadeNodeDeleteHierarchical(boolean applyCascadeNodeDeleteHierarchical)

isCascadeDeleteEdges

public boolean isCascadeDeleteEdges()
Returns the cascade edges deletion flag for this rule.

Returns:
true if the rule cascades deletions for adjacent edges.

Find more information in the class documentation


setCascadeDeleteEdges

public void setCascadeDeleteEdges(boolean cascadedeleteedges)
Sets the cascade edge deletion flag for this rule.

Parameters:
cascadedeleteedges - true if the rule cascades deletions for adjacent edges.

Find more information in the class documentation


isEdgeSplitProhibited

public boolean isEdgeSplitProhibited()
Returns the edge-split-prohibited flag for this rule.

Returns:
true if the node prohibits edges splits.

Find more information in the class documentation


setEdgeSplitProhibited

public void setEdgeSplitProhibited(boolean prohibitEdgeSplit)
Sets the edge-split-prohibited flag for this rule.

Parameters:
prohibitEdgeSplit - true if the node should prohibit edge-splits.

Find more information in the class documentation


applyEdgeSplitHierarchical

public boolean applyEdgeSplitHierarchical()

setApplyEdgeSplitHierarchical

public void setApplyEdgeSplitHierarchical(boolean applyEdgeSplitHierarchical)

getDisallowedEdgeSplitNodesAsString

public java.lang.String getDisallowedEdgeSplitNodesAsString()
Returns the disallowed edge-split nodes list concatenated into a single string where tokens are delimited by a comma. The order of the output is undefined and up to the library. Invokers of this method should not rely on any order of the node rule names.

Returns:
the disallowed edge-split nodes list concatenated into a single string.

Find more information in the class documentation


getDisallowedEdgeSplitNodes

public java.util.Set getDisallowedEdgeSplitNodes()
Returns the names of the disallowed edge-split nodes as a Set or null if there are no disallowed edge-split nodes registered which means that all nodes are allowed to split edges.

Returns:
the disallowed edge-split nodes list in form of a Set or null

Find more information in the class documentation


setDisallowedEdgeSplitNodes

public void setDisallowedEdgeSplitNodes(java.util.Set disallowedEdgeSplitNodes)
Sets the disallowed edge-split node rule names (as Strings) for this rule.
The given Set can be null which means that all nodes are allowed to split edges.

Parameters:
disallowedEdgeSplitNodes - a Set of node rule names that are disallowed to split edges or null.

Find more information in the class documentation


isDisallowedToSplitEdges

public boolean isDisallowedToSplitEdges(java.lang.String noderule)
Returns a flag that indicates whether the node rule name given by noderule is allowed to split an edge or not.
When the given node rule name is null the node is considered to be allowed to split edges. Otherwise the given node rule name has not to be contained in the disallowed edge-split nodes list to be allowed to split edges.

Parameters:
noderule - the name of the node rule to check for.
Returns:
true if the node is disallowed to split edges

Find more information in the class documentation


getDisallowEdgeSplitRule

public java.lang.String getDisallowEdgeSplitRule()
Deprecated. make use of either getDisallowedEdgeSplitNodes() or getDisallowedEdgeSplitNodesAsString() instead

Gets the rule names that identifies which nodes to skip for edge-split operations.

Returns:
the rule name that identifies which nodes to skip for edge-split operations

Find more information in the class documentation


setDisallowEdgeSplitRule

public void setDisallowEdgeSplitRule(java.lang.String disallowedEdgeSplitNodes)
Deprecated. make use of setDisallowedEdgeSplitNodes(Set) instead

Gets the rule names that identifies which nodes to skip for edge split operations.

Parameters:
disallowedEdgeSplitNodes - the rule name that identifies which nodes to skip for edge split operations.

Find more information in the class documentation


isAcceptLooseNodesIfSubgraph

public boolean isAcceptLooseNodesIfSubgraph()
Returns the accept-loose-nodes-if-subgraph flag for this rule.

Returns:
true if the node accepts loose nodes if it is actually a subgraph.

Find more information in the class documentation


setAcceptLooseNodesIfSubgraph

public void setAcceptLooseNodesIfSubgraph(boolean acceptLooseNodesIfSubgraph)
Sets the accept-loose-nodes-if-subgraph flag for this rule.

Parameters:
acceptLooseNodesIfSubgraph - true if the node accepts loose nodes if it is actually a subgraph.

Find more information in the class documentation


isAcceptPasteIfSubgraph

public boolean isAcceptPasteIfSubgraph()
Returns the accept-paste-if-subgraph flag for this rule.

Returns:
true if the node accepts paste operations if it is actually a subgraph.

Find more information in the class documentation


setAcceptPasteIfSubgraph

public void setAcceptPasteIfSubgraph(boolean acceptPasteIfSubgraph)
Sets the accept-paste-if-subgraph flag for this rule.

Parameters:
acceptPasteIfSubgraph - true if the node accepts paste operations if it is actually a subgraph.

Find more information in the class documentation


isAcceptOverlayEdgeCreation

public boolean isAcceptOverlayEdgeCreation()

setAcceptOverlayEdgeCreation

public void setAcceptOverlayEdgeCreation(boolean acceptOverlayEdgeCreation)

getLegalSubgraphsAsString

public java.lang.String getLegalSubgraphsAsString()
Returns the is-legal-subgraph list concatenated into a single string where tokens are delimited by a comma. The order of the output is undefined and up to the library. Invokers of this method should not rely on any order of the subgraph rule names.

Returns:
the is-legal-subgraph list concatenated into a single string.

Find more information in the class documentation


getLegalSubgraps

public java.util.Set getLegalSubgraps()
Returns the names of the legal-subgraphs as a Set or null if there are no legal-subgraphs registered which means that all subgraphs are legal.

Returns:
the is-legal-subgraph list in form of a Set

Find more information in the class documentation


setLegalSubgraphs

public void setLegalSubgraphs(java.util.Set legalSubgraphRules)
Sets the is-legal-subgraph rule names (as Strings) for this rule.
The given Set can be null which means that all subgraphs are legal.

Parameters:
legalSubgraphRules - a Set of names of legal subgraph rules or null.

Find more information in the class documentation


isLegalSubgraph

public boolean isLegalSubgraph(java.lang.String subgraphrule)
Returns the is-legal-subgraph flag for this rule. If no legal subgraphs (either by specifying null or an empty list) is specified then all subgraphs are considered legal.

Parameters:
subgraphrule - the name of the rule to check for.
Returns:
true if the node can be legally placed in the given subgraph (identified by its rule), the argument null is always considered legal.

Find more information in the class documentation


getOverlayEdgeCreation

public java.lang.String getOverlayEdgeCreation()
Gets the setting for automatic edge-creation on node overlay.

Returns:
the setting for automatic edge-creation on node overlay.

Find more information in the class documentation


setOverlayEdgeCreation

public void setOverlayEdgeCreation(java.lang.String overlayEdgeCreation)
Sets the setting for automatic edge-creation on node overlay.

Parameters:
overlayEdgeCreation - the setting for automatic edge-creation

Find more information in the class documentation


getVisualNodeOverlayIndicationHandlerName

public java.lang.String getVisualNodeOverlayIndicationHandlerName()
Gets the name that identifies the VisualNodeOverlayIndicationHandler for this rule.

Returns:
the name that identities the VisualNodeOverlayIndicationHandler for this rule.

Find more information in the class documentation


setVisualNodeOverlayIndicationHandlerName

public void setVisualNodeOverlayIndicationHandlerName(java.lang.String overlayhandlername)
Sets the name that identifies the VisualNodeOverlayIndicationHandler for this rule. If the name does not refer an already registered handler, then it is nevertheless stored inside the rule in case the matching handler is registered at a later point in time.

Parameters:
overlayhandlername - the name that identities the VisualNodeOverlayIndicationHandler for this rule.
Throws:
InvalidArgumentException - if the given name is null.

Find more information in the class documentation


getDropHandlerName

public java.lang.String getDropHandlerName()
Gets the name that identifies the VisualNodeDropHandler for this rule.

Returns:
the name that identities the VisualNodeDropHandler for this rule.

Find more information in the class documentation


setDropHandlerName

public void setDropHandlerName(java.lang.String drophandlername)
Sets the name that identifies the VisualNodeDropHandler for this rule. In case the name refers to a non registered VisualNodeDropHandler the call has no effect until at a later point in time a matching handler is registered at an active instance of VisualNodeDropHandlerRegistry.

Parameters:
drophandlername - the name that identities the VisualNodeDropHandler for this rule.
Throws:
InvalidArgumentException - if the given name is null.

Find more information in the class documentation


getNodeMovedInSubgraphHandlerName

public java.lang.String getNodeMovedInSubgraphHandlerName()
Gets the name that identifies the VisualNodeMovedInSubgraphHandler for this rule.

Returns:
the name that identities the VisualNodeMovedInSubgraphHandler for this rule.

Find more information in the class documentation


setNodeMovedInSubgraphHandlerName

public void setNodeMovedInSubgraphHandlerName(java.lang.String nodemovedinsubgraphhandlername)
Sets the name that identifies the VisualNodeMovedInSubgraphHandler for this rule. If the name does not refer an already registered handler, then it is nevertheless stored inside the rule in case the matching handler is registered at a later point in time.

Parameters:
nodemovedinsubgraphhandlername - the name that identities the VisualNodeMovedInSubgraphHandler for this rule.
Throws:
InvalidArgumentException - if the given name is null.

Find more information in the class documentation


getSubgraphRemoveHandlerName

public java.lang.String getSubgraphRemoveHandlerName()
Gets the name that identifies the VisualSubgraphRemoveHandler for this rule.

Returns:
the name that identities the VisualSubgraphRemoveHandler for this rule.

Find more information in the class documentation


setSubgraphRemoveHandlerName

public void setSubgraphRemoveHandlerName(java.lang.String removehandlername)
Sets the name that identifies the VisualSubgraphRemoveHandler for this rule. If the name does not refer an already registered handler, then it is nevertheless stored inside the rule in case the matching handler is registered at a later point in time.

Parameters:
removehandlername - the name that identities the VisualSubgraphRemoveHandler for this rule.
Throws:
InvalidArgumentException - if the given name is null.

Find more information in the class documentation


toString

public java.lang.String toString()
Return a string representation of this rule.

Overrides:
toString in class AbstractGraphObjectRule
Returns:
string representation of this rule.

getDescription

public java.lang.String getDescription()
Return a string description of this rule.

Specified by:
getDescription in interface Rule
Returns:
description of this rule.

deepCopy

public Rule deepCopy()
Returns a deepCopy of this rule.

Specified by:
deepCopy in interface Rule
Returns:
a deepCopy of this rule.

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class AbstractGraphObjectRule

hashCode

public int hashCode()
Overrides:
hashCode in class AbstractGraphObjectRule


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.