org.openmodelica.simulation.core.models.modelica
Class ModelicaProperty

java.lang.Object
  extended by org.openmodelica.simulation.core.models.modelica.ModelicaProperty
Direct Known Subclasses:
ModelicaInputVariable, ModelicaOutputVariable, ModelicaParameter, ModelicaVariable

public abstract class ModelicaProperty
extends java.lang.Object

Represents a Modelica property this could be variable, parameter, input or output variable A Property has a name and a comment. A Property can be plotted on a view during an simulation or non.

Author:
EADS Innovation Works, Parham Vasaiely, Parham.Vasaiely@gmx.de

Constructor Summary
ModelicaProperty(java.lang.String name, java.lang.String modelicaType, java.lang.String comment)
          Use this constructor as default.
 
Method Summary
 java.lang.String getComment()
          Returns the comment of the Modelica property
 java.lang.Boolean getDisplay()
          Returns the flag if a property should being displayed in a plot or not
 java.lang.Number getMaxValue()
          Gets the max value if the Modelica Property is from the type ModelicaReal or ModelicaInteger.
 java.lang.Number getMinValue()
          Gets the min value if the Modelica Property is from the type ModelicaReal or ModelicaInteger.
 java.lang.String getName()
          Returns the full qualified name of the Modelica property
 java.lang.Object getPrimitiveValue()
          returns the value of the primitive type Double = ModelicaReal Integer = ModelicaInteger String = ModelicaString Boolean = ModelicaBoolean
 java.lang.String getType()
          Returns the type of the Modelica property Modelica Types: Real, Integer, String, Boolean
 void setDisplay(java.lang.Boolean display)
          Set the flag if a property should being displayed or not
 void setMaxValue(java.lang.Number maxValue)
          Sets the max value if the Modelica Property is from the type ModelicaReal or ModelicaInteger.
 void setMinValue(java.lang.Number minValue)
          Sets the min value if the Modelica Property is from the type ModelicaReal or ModelicaInteger.
 void setPrimitiveValue(java.lang.Object value)
          Sets the value of the primitive type Double = ModelicaReal Integer = ModelicaInteger String = ModelicaString Boolean = ModelicaBoolean
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ModelicaProperty

public ModelicaProperty(java.lang.String name,
                        java.lang.String modelicaType,
                        java.lang.String comment)
Use this constructor as default.

Parameters:
name - Name of the modelica variable
modelicaType - Type of the Modelica primitive data type (Real, Integer, String, Boolean)
comment - Specific comment at the instance declaration
Method Detail

getName

public java.lang.String getName()
Returns the full qualified name of the Modelica property

Returns:
full qualified name as String

getComment

public java.lang.String getComment()
Returns the comment of the Modelica property

Returns:
comment as String

getType

public java.lang.String getType()
Returns the type of the Modelica property Modelica Types: Real, Integer, String, Boolean

Returns:
type as String

getDisplay

public java.lang.Boolean getDisplay()
Returns the flag if a property should being displayed in a plot or not

Returns:
true if it should be displayed false if not

setDisplay

public void setDisplay(java.lang.Boolean display)
Set the flag if a property should being displayed or not

Parameters:
display -

getPrimitiveValue

public java.lang.Object getPrimitiveValue()
returns the value of the primitive type Double = ModelicaReal Integer = ModelicaInteger String = ModelicaString Boolean = ModelicaBoolean

Returns:
The value of the Modelica primitive value will be returned. Its type could be: Double, Integer, String or Boolean

setPrimitiveValue

public void setPrimitiveValue(java.lang.Object value)
                       throws java.lang.Exception
Sets the value of the primitive type Double = ModelicaReal Integer = ModelicaInteger String = ModelicaString Boolean = ModelicaBoolean

Parameters:
value - have to be from the types: Double, Integer, String or Boolean
Throws:
java.lang.Exception

getMinValue

public java.lang.Number getMinValue()
Gets the min value if the Modelica Property is from the type ModelicaReal or ModelicaInteger. On default the value is "null".

Returns:
Value from type Number and null if the primitive type of the called object is not Number or if it is from the type Number but the max value is "null"

setMinValue

public void setMinValue(java.lang.Number minValue)
Sets the min value if the Modelica Property is from the type ModelicaReal or ModelicaInteger. On default the value is "null".

Parameters:
minValue - from the type Double or Integer, if the type does not match with the type of the PrimitiveDataType the method will do nothing

getMaxValue

public java.lang.Number getMaxValue()
Gets the max value if the Modelica Property is from the type ModelicaReal or ModelicaInteger. On default the value is "null".

Returns:
Value from type Number and null if the primitive type of the called object is not Number or if it is from the type Number but the max value is "null"

setMaxValue

public void setMaxValue(java.lang.Number maxValue)
Sets the max value if the Modelica Property is from the type ModelicaReal or ModelicaInteger. On default the value is "null".

Parameters:
maxValue - from the type Double or Integer, if the type does not match with the type of the PrimitiveDataType the method will do nothing

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object