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:
ConfigurationAas.IipNode
public class DefaultNode extends DefaultGraphElement implements IvmlGraphMapper.IvmlGraphNode
Default graph node implementation.getName()is bound against the nested variableDefaultGraphElement.getNameVarName(). Shall serve for a more generic mapping, to be part of EASY-Producer, thus, customizable.- Author:
- Holger Eichelberger, SSE
-
-
Field Summary
Fields Modifier and Type Field Description private intheightprivate java.lang.Stringimplprivate java.util.List<IvmlGraphMapper.IvmlGraphEdge>inEdgesprivate java.util.List<IvmlGraphMapper.IvmlGraphEdge>outEdgesprivate intwidthprivate intxPosprivate intyPos-
Fields inherited from class de.iip_ecosphere.platform.configuration.ivml.DefaultGraphElement
INVALID_POSITION, INVALID_SIZE
-
-
Constructor Summary
Constructors Constructor Description DefaultNode(net.ssehub.easy.varModel.confModel.IDecisionVariable var)Creates a graph node.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEdge(IvmlGraphMapper.IvmlGraphEdge edge)Adds an outgoing edge to this node.intgetHeight()Returns the height of the node.protected java.lang.StringgetHeightVarName()Returns the IVML variable name of the height.java.lang.StringgetImpl()Returns the configured name the implementing service.private java.lang.StringgetImplImpl()Returns the configured name of the implementing service.protected java.lang.StringgetImplVarName()Returns the IVML variable name of the service implementation.intgetInEdgesCount()Returns the number of edges ending at this node.java.lang.StringgetName()Returns the name of the element.intgetOutEdgesCount()Returns the number of edges starting at this node.intgetWidth()Returns the width of the node.protected java.lang.StringgetWidthVarName()Returns the IVML variable name of the width.intgetXPos()Returns the left position of the node.protected java.lang.StringgetXPosVarName()Returns the IVML variable name of the horizontal position.intgetYPos()Returns the top position of the node.protected java.lang.StringgetYPosVarName()Returns the IVML variable name of the vertical position.java.lang.Iterable<IvmlGraphMapper.IvmlGraphEdge>inEdges()Returns the edges ending at this node.java.lang.Iterable<IvmlGraphMapper.IvmlGraphEdge>outEdges()Returns the edges starting at this node.voidsetHeight(int height)Changes the height of the node.voidsetImpl(java.lang.String impl)Changes 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, setName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.iip_ecosphere.platform.configuration.ivml.IvmlGraphMapper.IvmlGraphElement
getVariable, setName
-
-
-
-
Field Detail
-
inEdges
private java.util.List<IvmlGraphMapper.IvmlGraphEdge> inEdges
-
outEdges
private java.util.List<IvmlGraphMapper.IvmlGraphEdge> outEdges
-
xPos
private int xPos
-
yPos
private int yPos
-
width
private int width
-
height
private int height
-
impl
private java.lang.String impl
-
-
Method Detail
-
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
protected java.lang.String 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
protected java.lang.String 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
protected java.lang.String 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
protected java.lang.String getHeightVarName()
Returns the IVML variable name of the height.- Returns:
- the variable name
-
getName
public java.lang.String getName()
Description copied from interface:IvmlGraphMapper.IvmlGraphElementReturns the name of the element.- Specified by:
getNamein interfaceIvmlGraphMapper.IvmlGraphElement- Overrides:
getNamein classDefaultGraphElement- Returns:
- the name
-
getImplImpl
private java.lang.String getImplImpl()
Returns the configured name of the implementing service.- Returns:
- the name, may be null
-
getImpl
public java.lang.String 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
protected java.lang.String 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
public void setImpl(java.lang.String impl)
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
public java.lang.Iterable<IvmlGraphMapper.IvmlGraphEdge> inEdges()
Description copied from interface:IvmlGraphMapper.IvmlGraphNodeReturns the edges ending at this node.- Specified by:
inEdgesin interfaceIvmlGraphMapper.IvmlGraphNode- Returns:
- the edges
-
outEdges
public java.lang.Iterable<IvmlGraphMapper.IvmlGraphEdge> 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
public void addEdge(IvmlGraphMapper.IvmlGraphEdge edge)
Adds an outgoing edge to this node.- Specified by:
addEdgein interfaceIvmlGraphMapper.IvmlGraphNode- Parameters:
edge- the edge
-
-