001    package edu.nrao.sss.util;
002    
003    /**
004     * An <code>XmlSerializable</code> is an object that can read and write its
005     * state in an XML format.
006     * <p>
007     * <b>CVS Info:</b>
008     * <table style="margin-left:2em">
009     *   <tr><td>$Revision: 161 $</td>
010     *   <tr><td>$Date: 2006-12-15 11:48:34 -0700 (Fri, 15 Dec 2006) $</td>
011     *   <tr><td>$Author: btruitt $</td>
012     * </table></p>
013     * 
014     * @author David M. Harland
015     * @since 2006-02-23
016     */
017    public interface XmlSerializable
018    {
019      /**
020       * Returns an XML representation of this object.
021       * 
022       * @return an XML representation of this object.
023       */
024      public String toXml();
025      
026      /**
027       * Sets the state of this object based on the contents of the
028       * <code>xml</code> parameter.
029       * 
030       * @param xml an XML representation of this object.
031       */
032      public void fromXml(String xml);
033    }