de.fhstralsund.vinets.structure
Interface Block

All Superinterfaces:
java.lang.Cloneable, Graph, NetElement, Node, java.io.Serializable

public interface Block
extends Node, Graph

A Block object models a hierarchical HyperGraph. The interface combines the inner view on a Block as a Graph and the outer view on it as a Node in its host Graph. The Links between Blocks may contain an arbitrary large number of Blocks, i.e. they are HyperEdges. The connection between a Link and a Block is mediated by a Port.


Method Summary
 Block createBlock()
          Constructs and returns a new hierarchical Block contained in this.
 Block createBlock(boolean atomar)
          Constructs and returns a new Block contained in this one.
 Block createBlock(java.lang.String name, boolean atomar)
          Constructs and returns a new Block contained in this one.
 Block createBlock(java.lang.String name, java.lang.Object data, boolean atomar)
          Constructs and returns a new Block contained in this one.
 HyperEdge createHyperEdge(java.util.Collection ends)
          Constructs and returns a new HyperEdge.
 HyperEdge createHyperEdge(java.util.Collection ends, java.lang.Object data)
          Constructs and returns a new HyperEdge.
 HyperEdge createHyperEdge(Port[] ends)
          Constructs and returns a new HyperEdge.
 HyperEdge createHyperEdge(Port[] ends, java.lang.Object data)
          Constructs and returns a new HyperEdge.
 Port createPort()
          Constructs and returns a new Port on the boundary of this Block.
 Port createPort(PortType type)
          Constructs and returns a new Port on the boundary of this Block.
 Port createPort(java.lang.String name, java.lang.Object data, PortType type)
          Constructs and returns a new Port on the boundary of this Block.
 Port createPort(java.lang.String name, PortType type)
          Constructs and returns a new Port on the boundary of this Block.
 java.util.Iterator ports()
           
 
Methods inherited from interface de.fhstralsund.vinets.structure.Node
degree, getNodeType, inArcs, incidentEdges, indegree, isAtomar, outArcs, outdegree, undirectedEdges
 
Methods inherited from interface de.fhstralsund.vinets.structure.NetElement
clearLabels, containsLabel, getBooleanLabel, getData, getDoubleLabel, getGeometry, getHost, getID, getIntLabel, getLabel, getLabelKeySet, getName, getOriginal, getRepresentation, removeLabel, setBooleanLabel, setData, setDoubleLabel, setGeometry, setIntLabel, setLabel, setName, setRepresentation
 
Methods inherited from interface de.fhstralsund.vinets.structure.Graph
clone, countEdges, countNodes, createEdge, createEdge, createEdge, createNode, createNode, createNode, edges, edgeSet, getGraphType, isDirected, isHyperGraph, isMixed, isUndirected, nodes, nodeSet, remove
 
Methods inherited from interface de.fhstralsund.vinets.structure.NetElement
clearLabels, containsLabel, getBooleanLabel, getData, getDoubleLabel, getGeometry, getHost, getID, getIntLabel, getLabel, getLabelKeySet, getName, getOriginal, getRepresentation, removeLabel, setBooleanLabel, setData, setDoubleLabel, setGeometry, setIntLabel, setLabel, setName, setRepresentation
 

Method Detail

createBlock

Block createBlock(java.lang.String name,
                  java.lang.Object data,
                  boolean atomar)
Constructs and returns a new Block contained in this one. If the parameter atomar is true, it corresponds to createNode(...).

Parameters:
name - a name used to identify the new Block for the user.
data - external data of any kind that an application may need.
atomar - true if the new Block cannot contain an inner Graph.
Returns:
a new Block instance.

createBlock

Block createBlock(java.lang.String name,
                  boolean atomar)
Constructs and returns a new Block contained in this one. If the parameter atomar is true, it corresponds to createNode(...).

Parameters:
name - a name used to identify the new Block for the user.
atomar - true if the new Block cannot contain an inner Graph.
Returns:
a new Block instance.

createBlock

Block createBlock(boolean atomar)
Constructs and returns a new Block contained in this one. If the parameter atomar is true, the method corresponds to Graph.createNode().

Parameters:
atomar - true if the new Block cannot contain an inner Graph.
Returns:
a new Block instance.

createBlock

Block createBlock()
Constructs and returns a new hierarchical Block contained in this. In order to construct a new atomar Block contained in this one, you should call Graph.createNode() instead of this method.

Returns:
a new Block instance.

createPort

Port createPort(java.lang.String name,
                java.lang.Object data,
                PortType type)
Constructs and returns a new Port on the boundary of this Block.

Parameters:
type - INPUT, OUTPUT or NEUTRAL Port type.
name - a name used to identify this Port for the user.
data - external data of any kind that an application may need.
Returns:
a new Port instance

createPort

Port createPort(java.lang.String name,
                PortType type)
Constructs and returns a new Port on the boundary of this Block.

Parameters:
type - INPUT, OUTPUT or NEUTRAL Port type.
name - a name used to identify this Port for the user.
Returns:
a new Port instance.

createPort

Port createPort(PortType type)
Constructs and returns a new Port on the boundary of this Block.

Parameters:
type - INPUT, OUTPUT or NEUTRAL PortType.
Returns:
a new Port instance.

createPort

Port createPort()
Constructs and returns a new Port on the boundary of this Block.

Returns:
a new DefaultPort instance of type NEUTRAL.

createHyperEdge

HyperEdge createHyperEdge(java.util.Collection ends,
                          java.lang.Object data)
Constructs and returns a new HyperEdge. All Ports should be on the border of a Node with this Block as host or on the border of this Block itself.

Parameters:
ends - the Port set of the new HyperEdge
data - external data of any kind that an application may need
Returns:
a new HyperEdge instance
Throws:
java.lang.IllegalArgumentException - if one of the ports has a wrong host

createHyperEdge

HyperEdge createHyperEdge(java.util.Collection ends)
Constructs and returns a new HyperEdge. All Ports should be on the border of a Node with this Block as host or on the border of this Block itself.

Parameters:
ends - the Port set of the new HyperEdge
Returns:
a new HyperEdge instance
Throws:
java.lang.IllegalArgumentException - if one of the ports has a wrong host

createHyperEdge

HyperEdge createHyperEdge(Port[] ends,
                          java.lang.Object data)
Constructs and returns a new HyperEdge. All Ports should be on the border of a Node with this Block as host or on the border of this Block itself.

Parameters:
ends - the Port set of the new HyperEdge
data - external data of any kind that an application may need
Returns:
a new HyperEdge instance
Throws:
java.lang.IllegalArgumentException - if one of the ports has a wrong host

createHyperEdge

HyperEdge createHyperEdge(Port[] ends)
Constructs and returns a new HyperEdge. All Ports should be on the border of a Node with this Block as host or on the border of this Block itself.

Parameters:
ends - the Port set of the new HyperEdge
Returns:
a new HyperEdge instance
Throws:
java.lang.IllegalArgumentException - if one of the ports has a wrong host

ports

java.util.Iterator ports()
Returns:
an Iterator to traverse all Ports of this Block.