Class DefaultGraphElement
- java.lang.Object
-
- de.iip_ecosphere.platform.configuration.ivml.DefaultGraphElement
-
- All Implemented Interfaces:
IvmlGraphMapper.IvmlGraphElement
- Direct Known Subclasses:
DefaultEdge,DefaultGraph,DefaultNode
public abstract class DefaultGraphElement extends java.lang.Object implements IvmlGraphMapper.IvmlGraphElement
Default graph element implementation.getName()is bound against the nested variablegetNameVarName(). 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 static intINVALID_POSITIONstatic intINVALID_SIZEprivate java.lang.Stringnameprivate net.ssehub.easy.varModel.confModel.IDecisionVariablevar
-
Constructor Summary
Constructors Modifier Constructor Description protectedDefaultGraphElement(net.ssehub.easy.varModel.confModel.IDecisionVariable var)Creates a graph element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intgetIntValue(java.lang.String name, int value, int invalid)Returns an int value from a nested value ofvar, giving rise to a local value if not considered invalid.java.lang.StringgetName()Returns the name of the element.protected java.lang.StringgetNameVarName()Returns the IVML variable name of the name of the element.protected java.lang.StringgetStringValue(java.lang.String name, java.lang.String value)Returns a String value from a nested value ofvar, giving rise to a local value if not considered invalid (null or empty).net.ssehub.easy.varModel.confModel.IDecisionVariablegetVariable()Returns the underlying IVML variable.voidsetName(java.lang.String name)Changes the name of the element.
-
-
-
Field Detail
-
INVALID_POSITION
public static final int INVALID_POSITION
- See Also:
- Constant Field Values
-
INVALID_SIZE
public static final int INVALID_SIZE
- See Also:
- Constant Field Values
-
var
private net.ssehub.easy.varModel.confModel.IDecisionVariable var
-
name
private java.lang.String name
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:IvmlGraphMapper.IvmlGraphElementReturns the name of the element.- Specified by:
getNamein interfaceIvmlGraphMapper.IvmlGraphElement- Returns:
- the name
-
getNameVarName
protected java.lang.String getNameVarName()
Returns the IVML variable name of the name of the element.- Returns:
- the variable name
-
setName
public void setName(java.lang.String name)
Description copied from interface:IvmlGraphMapper.IvmlGraphElementChanges the name of the element.- Specified by:
setNamein interfaceIvmlGraphMapper.IvmlGraphElement- Parameters:
name- the new name
-
getVariable
public net.ssehub.easy.varModel.confModel.IDecisionVariable getVariable()
Description copied from interface:IvmlGraphMapper.IvmlGraphElementReturns the underlying IVML variable.- Specified by:
getVariablein interfaceIvmlGraphMapper.IvmlGraphElement- Returns:
- the variable
-
getStringValue
protected java.lang.String getStringValue(java.lang.String name, java.lang.String value)Returns a String value from a nested value ofvar, giving rise to a local value if not considered invalid (null or empty).- Parameters:
name- the name of the nested variable ofvarvalue- the local value- Returns:
- the value
-
getIntValue
protected int getIntValue(java.lang.String name, int value, int invalid)Returns an int value from a nested value ofvar, giving rise to a local value if not considered invalid.- Parameters:
name- the name of the nested variable ofvarvalue- the local valueinvalid- when to considervalueas invalid- Returns:
- the value
-
-