Class M2XML


  • public class M2XML
    extends java.lang.Object
    Support translating model from and to XML
    Author:
    David Caruana
    • Constructor Summary

      Constructors 
      Constructor Description
      M2XML()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.Boolean deserialiseBoolean​(java.lang.String booleanString)  
      static java.util.Date deserialiseDate​(java.lang.String date)
      Convert XML date (of the form yyyy-MM-dd) to Date
      static java.lang.String serialiseBoolean​(java.lang.Boolean bool)  
      static java.lang.String serialiseDate​(java.util.Date date)
      Convert date to XML date (of the form yyyy-MM-dd)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • M2XML

        public M2XML()
    • Method Detail

      • deserialiseDate

        public static java.util.Date deserialiseDate​(java.lang.String date)
                                              throws java.text.ParseException
        Convert XML date (of the form yyyy-MM-dd) to Date
        Parameters:
        date - the xml representation of the date
        Returns:
        the date
        Throws:
        java.text.ParseException
      • serialiseDate

        public static java.lang.String serialiseDate​(java.util.Date date)
        Convert date to XML date (of the form yyyy-MM-dd)
        Parameters:
        date - the date
        Returns:
        the xml representation of the date
      • deserialiseBoolean

        public static java.lang.Boolean deserialiseBoolean​(java.lang.String booleanString)
                                                    throws java.text.ParseException
        Throws:
        java.text.ParseException
      • serialiseBoolean

        public static java.lang.String serialiseBoolean​(java.lang.Boolean bool)