at.lcm.x2c.scilab.xcos.xcosAdapter
Class XcosExprs

java.lang.Object
  extended by at.lcm.x2c.scilab.xcos.xcosAdapter.XcosExprs

public class XcosExprs
extends java.lang.Object

Utility class to handle Xcos block's "graphics.exprs" field which is used to identify X2C blocks and to store X2C specific properties.

Author:
Martin Hochwallner

Field Summary
static java.lang.String x2cIdentificationString
           
 
Constructor Summary
XcosExprs(org.scilab.modules.types.ScilabType stExprs)
          This constructor can be used when working from java on the java representation of xcos blocks.
XcosExprs(java.lang.String[][] exprs)
          This constructor can be called directly from Scilab using JIMS.
XcosExprs(X2cBlock block)
           
 
Method Summary
 void addParameter(java.lang.String name, java.lang.String value, java.lang.String expression, java.lang.String format)
          Add a parameter at the end of the list.
 java.lang.String getBlockLabel()
          Get the BlockLabel of the block.
 java.lang.String getBlockLabelFull()
          Get the full BlockLabel of the block.
 java.lang.String getComponentName()
          Get the ComponentName of the block.
 java.lang.String[][] getExprs()
          Get Content of the block's "graphics.exprs" field.
 java.lang.String getImplementation()
          Get the modelIdentification of the block.
 java.lang.String getLibraryName()
          Get the library name of the block.
 java.lang.String getModelIdentification()
          Get the modelIdentification of the block.
 X2cBlockParameterSimple getParameter(java.lang.String name)
           
 java.util.List<java.lang.String> getParameterNames()
           
 java.lang.Integer getSampleTimeFactor()
           
 org.scilab.modules.types.ScilabString getScilabTypeExprs()
          Get Content of the block's "graphics.exprs" field.
 boolean hasExactlyThisParamaeters(java.lang.String[] maskPaqramNames)
          Checks whether the exprs has all parameters form maskPaqramNames in the same oder and no additional parameters.
 boolean hasParameter(java.lang.String name)
           
 boolean isFromX2cBlock()
          Returns whether the exprs was from an X2C block.
 void setBlockLabel(java.lang.String blockLabel)
          Set the BlockLabel of the block.
 void setBlockLabelFull(java.lang.String blockLabelFull)
          Set the full BlockLabel of the block.
 void setComponentName(java.lang.String componentName)
          Set the ComponentName of the block.
 void setImplementation(java.lang.String implementation)
          Set the modelIdentification of the block.
 void setLibName(java.lang.String libraryName)
          Set the library name of the block.
 void setModelIdentification(java.lang.String modelIdentification)
          Set the modelIdentification of the block.
 void setSampleTimeFactor(java.lang.Integer sampleTimeFactor)
           
 java.lang.String toString()
           
 void updateParameter(java.lang.String name, java.lang.String value, java.lang.String expression, java.lang.String format)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x2cIdentificationString

public static final java.lang.String x2cIdentificationString
Constructor Detail

XcosExprs

public XcosExprs(java.lang.String[][] exprs)
          throws java.lang.Exception
This constructor can be called directly from Scilab using JIMS.

Parameters:
exprs - Content of the block's "graphics.exprs" field.
Throws:
java.lang.Exception

XcosExprs

public XcosExprs(X2cBlock block)
          throws java.lang.Exception
Throws:
java.lang.Exception

XcosExprs

public XcosExprs(org.scilab.modules.types.ScilabType stExprs)
          throws java.lang.Exception
This constructor can be used when working from java on the java representation of xcos blocks.

Parameters:
stExprs - BasicBlock.getExprs()
Throws:
java.lang.Exception
Method Detail

isFromX2cBlock

public boolean isFromX2cBlock()
Returns whether the exprs was from an X2C block.

Returns:
true if the exprs was from an X2C block

getLibraryName

public java.lang.String getLibraryName()
Get the library name of the block.

Returns:
the library name of the block.

setLibName

public void setLibName(java.lang.String libraryName)
Set the library name of the block.

Parameters:
libraryName - the library name of the block.

getComponentName

public java.lang.String getComponentName()
Get the ComponentName of the block.

Returns:
the componentName

setComponentName

public void setComponentName(java.lang.String componentName)
Set the ComponentName of the block.

Parameters:
componentName - the componentName to set

getBlockLabel

public java.lang.String getBlockLabel()
Get the BlockLabel of the block. BlockLabel is an alias to MaskName.

Returns:
the blockLabel

setBlockLabel

public void setBlockLabel(java.lang.String blockLabel)
Set the BlockLabel of the block. BlockLabel is an alias to MaskName.

Parameters:
blockLabel - the blockLabel to set

getBlockLabelFull

public java.lang.String getBlockLabelFull()
Get the full BlockLabel of the block. BlockLabel is an alias to MaskName with superblock prefix.

Returns:
the blockLabel

setBlockLabelFull

public void setBlockLabelFull(java.lang.String blockLabelFull)
Set the full BlockLabel of the block. BlockLabel is an alias to MaskName with super block prefix.


getModelIdentification

public java.lang.String getModelIdentification()
Get the modelIdentification of the block.

Returns:
the modelIdentification

setModelIdentification

public void setModelIdentification(java.lang.String modelIdentification)
Set the modelIdentification of the block.

Parameters:
modelIdentification - the modelIdentification to set

getImplementation

public java.lang.String getImplementation()
Get the modelIdentification of the block.

Returns:
the implementation

setImplementation

public void setImplementation(java.lang.String implementation)
Set the modelIdentification of the block.

Parameters:
implementation - the implementation to set

addParameter

public void addParameter(java.lang.String name,
                         java.lang.String value,
                         java.lang.String expression,
                         java.lang.String format)
Add a parameter at the end of the list.

Parameters:
name -
value -

getParameter

public X2cBlockParameterSimple getParameter(java.lang.String name)

hasParameter

public boolean hasParameter(java.lang.String name)

getParameterNames

public java.util.List<java.lang.String> getParameterNames()

updateParameter

public void updateParameter(java.lang.String name,
                            java.lang.String value,
                            java.lang.String expression,
                            java.lang.String format)
                     throws java.lang.Exception
Throws:
java.lang.Exception

getExprs

public java.lang.String[][] getExprs()
Get Content of the block's "graphics.exprs" field.

Returns:
Content of the block's "graphics.exprs" field.

getScilabTypeExprs

public org.scilab.modules.types.ScilabString getScilabTypeExprs()
Get Content of the block's "graphics.exprs" field. This can be called directly from Scilab using JIMS and the result can be assigned the block's "graphics.exprs" field.

Returns:
Content of the block's "graphics.exprs" field.

hasExactlyThisParamaeters

public boolean hasExactlyThisParamaeters(java.lang.String[] maskPaqramNames)
Checks whether the exprs has all parameters form maskPaqramNames in the same oder and no additional parameters.

Parameters:
maskPaqramNames -
Returns:
whether the exprs has all parameters form maskPaqramNames in the same oder and no additional parameters.

setSampleTimeFactor

public void setSampleTimeFactor(java.lang.Integer sampleTimeFactor)

getSampleTimeFactor

public java.lang.Integer getSampleTimeFactor()

toString

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


Copyright 2013 LCM. All rights reserved.