Class DefaultNode
java.lang.Object
de.iip_ecosphere.platform.configuration.ivml.DefaultGraphElement
de.iip_ecosphere.platform.configuration.ivml.DefaultNode
- All Implemented Interfaces:
IvmlGraphMapper.IvmlGraphElement,IvmlGraphMapper.IvmlGraphNode
- Direct Known Subclasses:
ServiceMeshNode
Default graph node implementation.
getName() is bound against the nested variable
DefaultGraphElement.getNameVarName(). Shall serve for a more generic mapping, to be part of EASY-Producer, thus, customizable.- Author:
- Holger Eichelberger, SSE
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate Stringprivate List<IvmlGraphMapper.IvmlGraphEdge> private List<IvmlGraphMapper.IvmlGraphEdge> private intprivate intprivate intFields inherited from class de.iip_ecosphere.platform.configuration.ivml.DefaultGraphElement
INVALID_POSITION, INVALID_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionDefaultNode(net.ssehub.easy.varModel.confModel.IDecisionVariable var) Creates a graph node. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds an outgoing edge to this node.intReturns the height of the node.protected StringReturns the IVML variable name of the height.getImpl()Returns the configured name the implementing service.private StringReturns the configured name of the implementing service.protected StringReturns the IVML variable name of the service implementation.intReturns the number of edges ending at this node.getName()Returns the name of the element.intReturns the number of edges starting at this node.intgetWidth()Returns the width of the node.protected StringReturns the IVML variable name of the width.intgetXPos()Returns the left position of the node.protected StringReturns the IVML variable name of the horizontal position.intgetYPos()Returns the top position of the node.protected StringReturns the IVML variable name of the vertical position.inEdges()Returns the edges ending at this node.outEdges()Returns the edges starting at this node.voidsetHeight(int height) Changes the height of the node.voidChanges the IVML variable name of the implementing service.voidsetWidth(int width) Changes the width of the node.voidsetXPos(int xPos) Changes the left position of the node.voidsetYPos(int yPos) Changes the top position of the node.Methods inherited from class de.iip_ecosphere.platform.configuration.ivml.DefaultGraphElement
getIntValue, getNameVarName, getStringValue, getVariable, setNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.iip_ecosphere.platform.configuration.ivml.IvmlGraphMapper.IvmlGraphElement
getVariable, setName
-
Field Details
-
inEdges
-
outEdges
-
xPos
private int xPos -
yPos
private int yPos -
width
private int width -
height
private int height -
impl
-
-
Constructor Details
-
DefaultNode
public DefaultNode(net.ssehub.easy.varModel.confModel.IDecisionVariable var) Creates a graph node.- Parameters:
var- the underlying variable
-
-
Method Details
-
getXPos
public int getXPos()Description copied from interface:IvmlGraphMapper.IvmlGraphNodeReturns the left position of the node. May be ignored by the graph reader/writer.- Specified by:
getXPosin interfaceIvmlGraphMapper.IvmlGraphNode- Returns:
- the left position, invalid if negative
-
getXPosVarName
Returns the IVML variable name of the horizontal position.- Returns:
- the variable name
-
getYPos
public int getYPos()Description copied from interface:IvmlGraphMapper.IvmlGraphNodeReturns the top position of the node. May be ignored by the graph reader/writer.- Specified by:
getYPosin interfaceIvmlGraphMapper.IvmlGraphNode- Returns:
- the top position, invalid if negative
-
getYPosVarName
Returns the IVML variable name of the vertical position.- Returns:
- the variable name
-
getWidth
public int getWidth()Description copied from interface:IvmlGraphMapper.IvmlGraphNodeReturns the width of the node. May be ignored by the graph reader/writer.- Specified by:
getWidthin interfaceIvmlGraphMapper.IvmlGraphNode- Returns:
- the width, invalid if negative
-
getWidthVarName
Returns the IVML variable name of the width.- Returns:
- the variable name
-
getHeight
public int getHeight()Description copied from interface:IvmlGraphMapper.IvmlGraphNodeReturns the height of the node. May be ignored by the graph reader/writer.- Specified by:
getHeightin interfaceIvmlGraphMapper.IvmlGraphNode- Returns:
- the height, invalid if negative
-
getHeightVarName
Returns the IVML variable name of the height.- Returns:
- the variable name
-
getName
Description copied from interface:IvmlGraphMapper.IvmlGraphElementReturns the name of the element.- Specified by:
getNamein interfaceIvmlGraphMapper.IvmlGraphElement- Overrides:
getNamein classDefaultGraphElement- Returns:
- the name
-
getImplImpl
Returns the configured name of the implementing service.- Returns:
- the name, may be null
-
getImpl
Description copied from interface:IvmlGraphMapper.IvmlGraphNodeReturns the configured name the implementing service. Fallback if not given isIvmlGraphMapper.IvmlGraphElement.getName().- Specified by:
getImplin interfaceIvmlGraphMapper.IvmlGraphNode- Returns:
- the variable name
-
getImplVarName
Returns the IVML variable name of the service implementation.- Returns:
- the variable name
-
setXPos
public void setXPos(int xPos) Description copied from interface:IvmlGraphMapper.IvmlGraphNodeChanges the left position of the node. May be ignored by the graph reader/writer.- Specified by:
setXPosin interfaceIvmlGraphMapper.IvmlGraphNode- Parameters:
xPos- the left position, invalid if negative
-
setYPos
public void setYPos(int yPos) Description copied from interface:IvmlGraphMapper.IvmlGraphNodeChanges the top position of the node. May be ignored by the graph reader/writer.- Specified by:
setYPosin interfaceIvmlGraphMapper.IvmlGraphNode- Parameters:
yPos- the left position, invalid if negative
-
setWidth
public void setWidth(int width) Description copied from interface:IvmlGraphMapper.IvmlGraphNodeChanges the width of the node. May be ignored by the graph reader/writer.- Specified by:
setWidthin interfaceIvmlGraphMapper.IvmlGraphNode- Parameters:
width- the width of the node, invalid if negative
-
setHeight
public void setHeight(int height) Description copied from interface:IvmlGraphMapper.IvmlGraphNodeChanges the height of the node. May be ignored by the graph reader/writer.- Specified by:
setHeightin interfaceIvmlGraphMapper.IvmlGraphNode- Parameters:
height- the height of the node, invalid if negative
-
setImpl
Description copied from interface:IvmlGraphMapper.IvmlGraphNodeChanges the IVML variable name of the implementing service.- Specified by:
setImplin interfaceIvmlGraphMapper.IvmlGraphNode- Parameters:
impl- changes the variable name
-
inEdges
Description copied from interface:IvmlGraphMapper.IvmlGraphNodeReturns the edges ending at this node.- Specified by:
inEdgesin interfaceIvmlGraphMapper.IvmlGraphNode- Returns:
- the edges
-
outEdges
Description copied from interface:IvmlGraphMapper.IvmlGraphNodeReturns the edges starting at this node.- Specified by:
outEdgesin interfaceIvmlGraphMapper.IvmlGraphNode- Returns:
- the edges
-
getInEdgesCount
public int getInEdgesCount()Description copied from interface:IvmlGraphMapper.IvmlGraphNodeReturns the number of edges ending at this node.- Specified by:
getInEdgesCountin interfaceIvmlGraphMapper.IvmlGraphNode- Returns:
- the number of in-edges
-
getOutEdgesCount
public int getOutEdgesCount()Description copied from interface:IvmlGraphMapper.IvmlGraphNodeReturns the number of edges starting at this node.- Specified by:
getOutEdgesCountin interfaceIvmlGraphMapper.IvmlGraphNode- Returns:
- the number of out-edges
-
addEdge
Adds an outgoing edge to this node.- Specified by:
addEdgein interfaceIvmlGraphMapper.IvmlGraphNode- Parameters:
edge- the edge
-