Class DefaultGraphElement
java.lang.Object
de.iip_ecosphere.platform.configuration.easyProducer.ivml.DefaultGraphElement
- All Implemented Interfaces:
IvmlGraphMapper.IvmlGraphElement
- Direct Known Subclasses:
DefaultEdge,DefaultGraph,DefaultNode
public abstract class DefaultGraphElement
extends Object
implements IvmlGraphMapper.IvmlGraphElement
Default graph element implementation.
getName() is bound against the nested variable
getNameVarName(). Shall serve for a more generic mapping, to be part of EASY-Producer, thus, customizable.- Author:
- Holger Eichelberger, SSE
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intprivate Stringprivate net.ssehub.easy.varModel.confModel.IDecisionVariable -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefaultGraphElement(net.ssehub.easy.varModel.confModel.IDecisionVariable var) Creates a graph element. -
Method Summary
Modifier and TypeMethodDescriptionprotected intgetIntValue(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.getName()Returns the name of the element.protected StringReturns the IVML variable name of the name of the element.protected StringgetStringValue(String name, 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.IDecisionVariableReturns the underlying IVML variable.voidChanges the name of the element.
-
Field Details
-
INVALID_POSITION
public static final int INVALID_POSITION- See Also:
-
INVALID_SIZE
public static final int INVALID_SIZE- See Also:
-
var
private net.ssehub.easy.varModel.confModel.IDecisionVariable var -
name
-
-
Constructor Details
-
DefaultGraphElement
protected DefaultGraphElement(net.ssehub.easy.varModel.confModel.IDecisionVariable var) Creates a graph element.- Parameters:
var- the underlying decision variable
-
-
Method Details
-
getName
Description copied from interface:IvmlGraphMapper.IvmlGraphElementReturns the name of the element.- Specified by:
getNamein interfaceIvmlGraphMapper.IvmlGraphElement- Returns:
- the name
-
getNameVarName
Returns the IVML variable name of the name of the element.- Returns:
- the variable name
-
setName
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
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
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
-