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

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    private String
     
    private net.ssehub.easy.varModel.confModel.IDecisionVariable
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    DefaultGraphElement(net.ssehub.easy.varModel.confModel.IDecisionVariable var)
    Creates a graph element.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected int
    getIntValue(String name, int value, int invalid)
    Returns an int value from a nested value of var, giving rise to a local value if not considered invalid.
    Returns the name of the element.
    protected String
    Returns the IVML variable name of the name of the element.
    protected String
    Returns a String value from a nested value of var, giving rise to a local value if not considered invalid (null or empty).
    net.ssehub.easy.varModel.confModel.IDecisionVariable
    Returns the underlying IVML variable.
    void
    Changes the name of the element.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      private String 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

      public String getName()
      Description copied from interface: IvmlGraphMapper.IvmlGraphElement
      Returns the name of the element.
      Specified by:
      getName in interface IvmlGraphMapper.IvmlGraphElement
      Returns:
      the name
    • getNameVarName

      protected String getNameVarName()
      Returns the IVML variable name of the name of the element.
      Returns:
      the variable name
    • setName

      public void setName(String name)
      Description copied from interface: IvmlGraphMapper.IvmlGraphElement
      Changes the name of the element.
      Specified by:
      setName in interface IvmlGraphMapper.IvmlGraphElement
      Parameters:
      name - the new name
    • getVariable

      public net.ssehub.easy.varModel.confModel.IDecisionVariable getVariable()
      Description copied from interface: IvmlGraphMapper.IvmlGraphElement
      Returns the underlying IVML variable.
      Specified by:
      getVariable in interface IvmlGraphMapper.IvmlGraphElement
      Returns:
      the variable
    • getStringValue

      protected String getStringValue(String name, String value)
      Returns a String value from a nested value of var, giving rise to a local value if not considered invalid (null or empty).
      Parameters:
      name - the name of the nested variable of var
      value - the local value
      Returns:
      the value
    • getIntValue

      protected int getIntValue(String name, int value, int invalid)
      Returns an int value from a nested value of var, giving rise to a local value if not considered invalid.
      Parameters:
      name - the name of the nested variable of var
      value - the local value
      invalid - when to consider value as invalid
      Returns:
      the value