net.aerith.misao.database
Interface XmlDBHolder

All Known Implementing Classes:
XmlInformationHolder, XmlMagRecordHolder, XmlRecordHolder

public interface XmlDBHolder

The XmlDBHolder represents a XML element which contains XML elements of the same type.


Method Summary
 void addDBRecord(XmlDBRecord element)
          Adds an XML element.
 XmlDBHolder create()
          Creates an empty XmlDBHolder object.
 XmlDBRecord[] getDBRecords()
          Gets the list of XML elements.
 void read(java.io.Reader in)
          Reads this XML document from the specified reader.
 void write(java.io.Writer out)
          Writes this XML document to the specified writer.
 

Method Detail

create

public XmlDBHolder create()
Creates an empty XmlDBHolder object. This method must be overrided by the subclass.
Returns:
the new empty object.

read

public void read(java.io.Reader in)
          throws java.io.IOException
Reads this XML document from the specified reader.
Parameters:
in - the reader.
Throws:
java.io.IOException - if I/O error occurs.

write

public void write(java.io.Writer out)
           throws java.io.IOException
Writes this XML document to the specified writer.
Parameters:
out - the writer.
Throws:
java.io.IOException - if I/O error occurs.

addDBRecord

public void addDBRecord(XmlDBRecord element)
Adds an XML element.
Parameters:
element - the XML element to add.

getDBRecords

public XmlDBRecord[] getDBRecords()
Gets the list of XML elements.
Returns:
the list of XML elements.