Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## es.upm.gib.mappingAPI2
Class FormatEncoder

    java.lang.Object
      es.upm.gib.mappingAPI2.FormatEncoder

All Implemented Interfaces:
  java.io.Serializable

    public class FormatEncoder

extends java.lang.Object
implements java.io.Serializable

This class could transform a MappingApi2 object to XML file or string and vice versa

See Also:
  Serialized Form

Constructor Summary
`FormatEncoder()`
`FormatEncoder(MappingApi2 api2, java.io.File file)`

Method Summary
`MappingApi2` | `readFromString(java.lang.String model)` This method read a string in XML format and create the mapping api model from it
`MappingApi2` | `readFromXML(java.lang.String path)` This method read an XML file and create the mapping api model from it
`java.lang.String` | `stringXML()` This method returns the mapping in XML format through one string
`void` | `submitXML()` This method create the XML file of the model

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

Constructor Detail

### FormatEncoder

    public FormatEncoder(MappingApi2 api2,
                         java.io.File file)

### FormatEncoder

    public FormatEncoder()
                  throws java.io.IOException

Throws:
  `java.io.IOException`

Method Detail

### stringXML

    public java.lang.String stringXML()

  This method returns the mapping in XML format through one string

  Returns:
    XML string

### submitXML

    public void submitXML()

  This method create the XML file of the model

### readFromXML

    public MappingApi2 readFromXML(java.lang.String path)
                            throws org.jdom.JDOMException,
                                   java.io.IOException,
                                   java.text.ParseException

  This method read an XML file and create the mapping api model from it

  Parameters:
    `path` -
  Returns:
    the mappingApi2 object
  Throws:
    `org.jdom.JDOMException`
    `java.io.IOException`
    `java.text.ParseException`

### readFromString

    public MappingApi2 readFromString(java.lang.String model)
                               throws org.jdom.JDOMException,
                                      java.io.IOException,
                                      java.text.ParseException

  This method read a string in XML format and create the mapping api model from it

  Parameters:
    `model` -
  Returns:
  Throws:
    `org.jdom.JDOMException`
    `java.io.IOException`
    `java.text.ParseException`

Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD