Package org.bigraphs.framework.core
Interface BigraphBuilder.NodeHierarchy<S extends Signature<? extends Control<?,?>>>
- All Known Implementing Classes:
PureBigraphBuilder.Hierarchy
- Enclosing interface:
- BigraphBuilder<S extends Signature<?>>
A
BigraphBuilder.NodeHierarchy
contains a collection of nodes in a tree structure and
is related to the current BigraphBuilder
instance.
It is responsible for keeping nodes together as one atomic unit of the place graph. Several methods are provided for adding nodes and sites.
Can only be used with the BigraphBuilder
instance which created it.
-
Method Summary
Modifier and TypeMethodDescriptionCreates a child node for the current node hierarchy with the given control label and connects it automatically to the given outer name.addChild
(String controlName, BigraphEntity.OuterName outerName) default BigraphBuilder.NodeHierarchy<S>
addSite()
Adds a site to the current parent.down()
Creates a new hierarchy builder where the last created node is the parent of this new hierarchy.top()
Place the cursor to the top most element of the hierarchy.up()
Place the cursor one level up from the current position.
-
Method Details
-
addChild
-
addChild
-
addChild
BigraphBuilder.NodeHierarchy addChild(String controlName, String outerName) throws InvalidConnectionException, LinkTypeNotExistsException Creates a child node for the current node hierarchy with the given control label and connects it automatically to the given outer name. The outer name is automatically created if it doesn't exists.- Parameters:
controlName
- the control of the newly created node.outerName
- the outer name to connect the newly created node- Returns:
- the same node hierarchy instance
- Throws:
InvalidConnectionException
LinkTypeNotExistsException
-
addChild
default BigraphBuilder.NodeHierarchy<S> addChild(Control controlName, String outerName) throws InvalidConnectionException, LinkTypeNotExistsException -
addChild
BigraphBuilder.NodeHierarchy addChild(String controlName, BigraphEntity.OuterName outerName) throws InvalidConnectionException, TypeNotExistsException -
addSite
BigraphBuilder.NodeHierarchy addSite()Adds a site to the current parent.An
ControlIsAtomicException
is thrown if the parent's control is atomic.- Returns:
- adds a site to the current parent
- See Also:
-
down
Creates a new hierarchy builder where the last created node is the parent of this new hierarchy.One can go to the previous hierarchy by calling the
up()
method.- Returns:
- the new hierarchy
- Throws:
ControlIsAtomicException
-
up
Place the cursor one level up from the current position.- Returns:
- the same hierarchy
-
top
Place the cursor to the top most element of the hierarchy.- Returns:
- the same hierarchy
-
createBigraph
-