## org.irisa.genouest.logol.utils.model
Class ModelConverter

    java.lang.Object
      org.irisa.genouest.logol.utils.model.ModelConverter

    public class ModelConverter

extends java.lang.Object

Author:
  osallou History : 21/06/09 O. Sallou Fix1380 missing space for multiple models 28/07/09 O. Sallou Fix1397 Add support for negative constraint on views 21/01/10 O. Sallou Fix1551 Analyser does not color correctly path in Designer

Field Summary
`java.util.HashMap<java.lang.String,java.lang.String>` `terminals`

Constructor Summary
`ModelConverter()`

Method Summary
`void` `decode(java.lang.String modelFile, java.lang.String grammarFile)` Writes model grammar file to logol grammar file
`java.lang.String` `encode(java.lang.String model)` Encode a model to a logol representation
`static void` `main(java.lang.String[] args)`
`java.lang.String` `mapSequenceMatch(java.lang.String match, java.lang.String id, java.lang.String outFile)` Maps a Logol Match to the initial model to show the result

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### terminals

    public java.util.HashMap<java.lang.String,java.lang.String> terminals

Constructor Detail

### ModelConverter

    public ModelConverter()

Method Detail

### main

    public static void main(java.lang.String[] args)
                     throws java.lang.Exception

  Parameters:
    `args` -
  Throws:
    `java.lang.Exception`

### mapSequenceMatch

    public java.lang.String mapSequenceMatch(java.lang.String match,
                                             java.lang.String id,
                                             java.lang.String outFile)
                                      throws javax.xml.parsers.ParserConfigurationException,
                                             org.xml.sax.SAXException,
                                             java.io.IOException,
                                             javax.xml.transform.TransformerException,
                                             ModelDefinitionException

  Maps a Logol Match to the initial model to show the result

  Parameters:
    `match` - Result match file path
    `id` - identifier of the match in the file
    `outFile` - output file name
  Returns:
    New diagram file to load in sequence diagram analyser
  Throws:
    `javax.xml.parsers.ParserConfigurationException`
    `java.io.IOException`
    `org.xml.sax.SAXException`
    `javax.xml.transform.TransformerException`
    `ModelDefinitionException`

### encode

    public java.lang.String encode(java.lang.String model)
                            throws javax.xml.parsers.ParserConfigurationException,
                                   org.xml.sax.SAXException,
                                   java.io.IOException,
                                   javax.xml.transform.TransformerException,
                                   ModelDefinitionException

  Encode a model to a logol representation

  Parameters:
    `model` - File path to the model
  Returns:
    Logol String representation
  Throws:
    `javax.xml.parsers.ParserConfigurationException`
    `org.xml.sax.SAXException`
    `java.io.IOException`
    `javax.xml.transform.TransformerException`
    `ModelDefinitionException`

### decode

    public void decode(java.lang.String modelFile,
                       java.lang.String grammarFile)
                throws javax.xml.parsers.ParserConfigurationException,
                       org.xml.sax.SAXException,
                       java.io.IOException,
                       javax.xml.transform.TransformerException,
                       ModelDefinitionException

  Writes model grammar file to logol grammar file

  Parameters:
    `modelFile` - Input path to model file
    `grammarFile` - Output path to logol file
  Throws:
    `javax.xml.parsers.ParserConfigurationException`
    `org.xml.sax.SAXException`
    `java.io.IOException`
    `javax.xml.transform.TransformerException`
    `ModelDefinitionException`