at.lcm.x2c.scilab.xcos
Class ModelTransformation

java.lang.Object
  extended by at.lcm.x2c.scilab.xcos.ModelTransformation

public class ModelTransformation
extends java.lang.Object

Model transformation from Scilab Xcos diagram to X2C model. This class provides the user end methods to transform Xcos model opened in Scilab/Xcos to a x2c model.

Author:
Martin Hochwallner, Markus Aigner

Method Summary
static java.util.List<java.lang.String> get_open_diagrams_filename()
          Return the file names of all currently open Xcos diagrams.
static java.util.List<java.lang.String> get_open_diagrams_titles()
          Return the names of all currently open Xcos diagrams.
static java.util.List<org.scilab.modules.xcos.graph.XcosDiagram> get_open_diagrams()
          Return references to all currently open Xcos diagrams.
static X2cAdapter_Model transform_diagamWTitle(java.lang.String xcos_diagram_title)
          Transform the Xcos diagrams with the given title to a x2c model.
static java.util.ArrayList<X2cAdapter_Model> transform_open_diagrams()
          Transform all currently open Xcos diagrams to x2c models.
static X2cAdapter_Model transform(com.mxgraph.model.mxGraphModel xcos_model)
           
static X2cAdapter_Model transform(com.mxgraph.model.mxGraphModel xcos_model, java.lang.String modelIdentification)
          Transform the given Xcos model to a x2c model.
static X2cAdapter_Model transform(java.lang.String xcos_diagram_filename)
          Transform the Xcos diagrams with the given filename to a x2c model.
static X2cAdapter_Model transform(org.scilab.modules.xcos.graph.XcosDiagram xcos_diagram)
           
static X2cAdapter_Model transform(org.scilab.modules.xcos.graph.XcosDiagram xcos_diagram, java.lang.String modelIdentification)
          Transform the given Xcos diagrams to x2c a model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

get_open_diagrams_titles

public static java.util.List<java.lang.String> get_open_diagrams_titles()
                                                                 throws java.lang.Exception
Return the names of all currently open Xcos diagrams.

Returns:
list of the names of all currently open Xcos diagrams
Throws:
java.lang.Exception

get_open_diagrams_filename

public static java.util.List<java.lang.String> get_open_diagrams_filename()
                                                                   throws java.lang.Exception
Return the file names of all currently open Xcos diagrams.

Returns:
list of the file names of all currently open Xcos diagrams
Throws:
java.lang.Exception

get_open_diagrams

public static java.util.List<org.scilab.modules.xcos.graph.XcosDiagram> get_open_diagrams()
                                                                                   throws java.lang.Exception
Return references to all currently open Xcos diagrams.

Returns:
list of references to all currently open Xcos diagrams
Throws:
java.lang.Exception

transform_open_diagrams

public static java.util.ArrayList<X2cAdapter_Model> transform_open_diagrams()
                                                                     throws java.lang.Exception
Transform all currently open Xcos diagrams to x2c models.

Returns:
x2c models
Throws:
java.lang.Exception

transform

public static X2cAdapter_Model transform(org.scilab.modules.xcos.graph.XcosDiagram xcos_diagram)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

transform

public static X2cAdapter_Model transform(org.scilab.modules.xcos.graph.XcosDiagram xcos_diagram,
                                         java.lang.String modelIdentification)
                                  throws java.lang.Exception
Transform the given Xcos diagrams to x2c a model.

Parameters:
xcos_diagram -
Returns:
x2c model
Throws:
java.lang.Exception

transform

public static X2cAdapter_Model transform(java.lang.String xcos_diagram_filename)
                                  throws java.lang.Exception
Transform the Xcos diagrams with the given filename to a x2c model.

Parameters:
xcos_diagram_filename -
Returns:
x2c model
Throws:
java.lang.Exception

transform_diagamWTitle

public static X2cAdapter_Model transform_diagamWTitle(java.lang.String xcos_diagram_title)
                                               throws java.lang.Exception
Transform the Xcos diagrams with the given title to a x2c model.

Parameters:
xcos_diagram_title -
Returns:
x2c model
Throws:
java.lang.Exception

transform

public static X2cAdapter_Model transform(com.mxgraph.model.mxGraphModel xcos_model)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

transform

public static X2cAdapter_Model transform(com.mxgraph.model.mxGraphModel xcos_model,
                                         java.lang.String modelIdentification)
                                  throws java.lang.Exception
Transform the given Xcos model to a x2c model. This method reads a given Xcos model and transforms it to a x2c model. If the labels of the blocks in the Xcos model are not unique a number is appended to the label. When a label was altered the xcos_model will be adapted too.

Parameters:
xcos_model -
Returns:
x2c model
Throws:
java.lang.Exception


Copyright 2013 LCM. All rights reserved.