Package uk.ac.starlink.util
Interface XMLEncodeDecode
-
- All Known Implementing Classes:
PrimitiveXMLEncodeDecode
public interface XMLEncodeDecodeInterface for objects that can encode and decode their internal configuration within the content of anElement.Once encoded into an Element such objects can be represented as simple XML and either transmitted and re-created in some other process, or stored permanently in a file.
For an abstract base class that implements lots of useful functions that support this interface see
PrimitiveXMLEncodeDecodeand for one that also supports awt primitives (Fonts and Colors) seeuk.ac.starlink.ast.gui.AbstractPlotControlsModel.- Since:
- $Date$, 26-JUL-2001
- Version:
- $Id$
- Author:
- Peter W. Draper
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddecode(org.w3c.dom.Element rootElement)Decode (ie, restore) the internal state of this object from an Element.voidencode(org.w3c.dom.Element rootElement)Encode the internal state of this object so that it is rooted in the given Element.java.lang.StringgetTagName()Return a name for the Element that will be the parent of any contents that can be encoded and decoded (ie, name of rootElement);
-
-
-
Method Detail
-
encode
void encode(org.w3c.dom.Element rootElement)
Encode the internal state of this object so that it is rooted in the given Element.- Parameters:
rootElement- the Element within which the object should store its configuration.
-
decode
void decode(org.w3c.dom.Element rootElement)
Decode (ie, restore) the internal state of this object from an Element.- Parameters:
rootElement- the element to which a previous object this this type has attached its configuration.
-
getTagName
java.lang.String getTagName()
Return a name for the Element that will be the parent of any contents that can be encoded and decoded (ie, name of rootElement);- Returns:
- the name of the root element.
-
-