|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ImmutableNameISTree
This class is responsible for managing specifically for IS nametrees, a tree of ImmutableNames with specific links to the other nodes. Most of the properties are directly managed by the calling class.
A node in a ImmutableNameLinkTree may have to apply some inner properties or some constraints in its links to other nodes of the whole nametree:
- 'Open' is a mandatory node property which has the value 'true' if the node is active, like an open ACS, subACS or Area, which is currently opened in the program, or if the node is a passive one which is the direct or indirect parent of an opened active node.
- 'ExtendedExtendedVisibleSpace' is a mandatory node property which extends the parent children (if ImmutableNameTree.isHubNode is true) and the ImmutableNameTree areas of the node, if any. This property is an ImmutableName/String Map:
the possible String values are ImmutableNameLinkTree constants:
ALL_THE_NAMETREE_SPACE,
ONE_STEP_NODES_SPACE, TWO_STEPS_NODES_SPACE, THREE_STEPS_NODES_SPACE,
DIRECT_CHILDREN_SPACE, INDIRECT_CHILDREN_SPACE,
PARENT_INDIRECT_CHILDREN_SPACE, PARENT_SPACE,
NO_VISIBLE_SPACE,
the first value is the default one.
- 'Alternates' is an optional node property, used only for the Alternate relation, with an ImmutableName/ImmutableName[] Map:
mandatory key: node_name for a ground ACS or subACS;
the values are the names of the alternates for the key (limited to 4).
- 'MandatoryPaths' is an optional node property, used for IS nametrees only, with an ImmutableName/ImmutableName[] Map:
optional key: node_name is the beginning of the path;
value: the optional array of node names is the structurally-mandatory path to go accross, where the structure is a one-item List, or a List
(first_node, second_node, beginning_node, third_node, fourth_node, beginning_node),
which indicates that there are two paths: from beginning_node to second_node,
and from beginning_node to third_node and fourth_node,
and (feature to be implemented) where all the nodes are in the visible space of the beginning node.
- 'Links' is an optional node property, for IS nametrees, with an ImmutableName/String[] map.
Each property may have any format, and is defined by the user of this class.
This Links map is used for IS nametrees, and the ACS factory initializes the ImmutableNameLinkTree links following some specific and complex uses.
All the properties of a ImmutableNameLinkTree are mutually independant. In other words, a node which is opened or closed may have any visible space, any mahdatory paths and any links. Then, before the use of the data about a mandatory path or a link, it is recommanded to see if the relevant node is opened or not. See also 'isActiveNode' and 'isHubNode' properties in the super class ImmutableNameTree.
Method Summary | |
---|---|
java.util.List<ImmutableName> |
getAlternates(ImmutableName _node)
Get the node property for the Alternate relation: mandatory key: node_name; the values are the names of the alternates for the key which is a ground, and (ISFactoryUtilityImpl.IS_ALTERNATE_OF+ground name) for the key which is an alternate. |
java.lang.String |
getExtendedVisibleSpace(ImmutableName _node)
Returns the nodes which are visible. |
java.lang.String[] |
getExtendedVisibleSpaceConstants()
Get the authorized visible spaces. |
java.util.List<ImmutableName> |
getGroundsOfAlternate(ImmutableName _alter)
Get the grounds for which the argument is an Alternate. |
java.lang.String[] |
getLinks(ImmutableName _name)
Gets the optional links for a name, which depends on the ImmutableNameISTree use. |
java.util.List<ImmutableName[]> |
getMandatoryPaths(ImmutableName _node)
Returns the mandatory paths from a node to access to other nodes, if rights allow it. |
boolean |
isChildOfAcsNode(ImmutableName _node)
Gets if a node is the direct or indirect child of at least one node having the type ISImpl.ACS_NODE. |
boolean |
isLinked(ImmutableName _node,
java.lang.String _link)
Test a special link for a node. |
boolean |
isMandatoryPath(ImmutableName _node,
ImmutableName[] _l_path)
Test a path as mandatory path from a node to access to other nodes. |
boolean |
isOpen(ImmutableName _node)
Get the state open/closed of a node. |
boolean |
isParentOfAcsNode(ImmutableName _node)
Get if a node is the direct or indirect parent of at least one node having the type ISImpl.ACS_NODE. |
Methods inherited from interface ARoad0.gBaseInterface.ImmutableNameTree |
---|
equals, getChild, getChildCount, getDepthFirstIndexInNameTree, getIndexInParent, getL_AllChildren, getL_AreaNames, getL_AreasOfNode, getL_DirectChildren, getL_NodesOfArea, getLevel, getM_AreaNodes, getParent, getRoot, getSerialVersionUID, getSubTree, getTreePath, getType, hashCode, isArea, isEmpty, isHubNode, isLeaf, isNode, nbOfLevels, nbOfNodesAndAreas, nodes |
Method Detail |
---|
boolean isOpen(ImmutableName _node)
_node
- is a node in the ImmutableNameLinkTree
java.util.List<ImmutableName> getGroundsOfAlternate(ImmutableName _alter)
_alter
- is a node name or derived from a node name.
java.util.List<ImmutableName> getAlternates(ImmutableName _node)
mandatory key: node_name;
the values are the names of the alternates for the key which is a ground, and (ISFactoryUtilityImpl.IS_ALTERNATE_OF+ground name) for the key which is an alternate.
_node
- is a non-null node name of a ground
java.lang.String[] getExtendedVisibleSpaceConstants()
java.lang.String getExtendedVisibleSpace(ImmutableName _node)
.
_node
- is a non-null node in the ImmutableNameLinkTree
java.util.List<ImmutableName[]> getMandatoryPaths(ImmutableName _node)
(first_node, second_node, beginning_node, third_node, fourth_node, beginning_node),
which indicates that there are two paths: from beginning_node to second_node,
and from beginning_node to third_node and fourth_node,
and where all the nodes are in the visible space of the beginning node
_node
- is a node in the ImmutableNameLinkTree
boolean isMandatoryPath(ImmutableName _node, ImmutableName[] _l_path)
(first_node||second_node||beginning_node||third_node||fourth_node||beginning_node),
which indicates that there are two paths: from beginning_node to second_node,
and from beginning_node to third_node and fourth_node,
and where all the nodes are in the visible space of the beginning node
_node
- is a non-null node in the ImmutableNameLinkTree_l_path
- is the array of the path to test, without _node. Never null.
boolean isLinked(ImmutableName _node, java.lang.String _link)
_node
- is a non-null node in the ImmutableNameLinkTree_link
- is a link to test for the node.
java.lang.String[] getLinks(ImmutableName _name)
_name
- is a node/area name or the association of two node/area names
in the ImmutableNameISTree
boolean isParentOfAcsNode(ImmutableName _node)
_node
- is a node in the ImmutableNameISTree
boolean isChildOfAcsNode(ImmutableName _node)
_node
- is a node or an area in the ImmutableNameISTree
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |