de.fu_berlin.ties.xml.io
Interface XMLStorable

All Known Implementing Classes:
ExternalClassifier, MetaClassifier, MultiBinaryClassifier, OneAgainstTheRestClassifier, TrainableClassifier, UltraconservativeWinnow, Winnow

public interface XMLStorable

Classes implementing this interface support serialization in a human-readable XML-based format.

Non-abstract implementations of this interface must support deserialization by providing a public constructor that accepts a Element as single parameter that reads all relevant field values from the XML element. There is no way to enforce this convention (as interfaces cannot contain constructors), but deserialization via ObjectElement.createObject(org.dom4j.Element, Class) will fail when it is violated. Deserialization is based on a constructor instead of a "restore" or "init" method to allow the deserialization of immutable objects (whose fields cannot be changed after construction).

Version:
$Revision: 1.1 $, $Date: 2004/12/06 18:00:41 $, $Author: siefkes $
Author:
Christian Siefkes

Method Summary
 ObjectElement toElement()
          Stores all relevant fields of this object in an XML element for serialization.
 

Method Detail

toElement

ObjectElement toElement()
Stores all relevant fields of this object in an XML element for serialization. An equivalent object can be created by calling ObjectElement.createObject(org.dom4j.Element, Class) on the created element.

Returns:
the created XML element


Copyright © 2003-2004 Christian Siefkes. All Rights Reserved.