|
JGAP | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jgap.data.DocumentBuilderBase
org.jgap.xml.XMLDocumentBuilder
public class XMLDocumentBuilder
Class building an XML file. Can be used to persist objects like Genotype, Chromosome or Gene (or a list of them) to an XML file.
| Constructor Summary | |
|---|---|
XMLDocumentBuilder()
|
|
| Method Summary | |
|---|---|
java.lang.Object |
buildDocument(IDataCreators a_document)
Convenience method to build an XML document from a generic input structure (of type IDataCreators) |
protected java.lang.Object |
createElement(java.lang.Object a_doc,
java.lang.Object a_xmlElement,
java.lang.String a_tagName)
Creates an element with help for a given document. |
protected java.lang.Object |
documentAppendChild(java.lang.Object a_xmlDocument,
java.lang.Object a_element)
Append a child to a given document. |
protected java.lang.Object |
elementAppendChild(java.lang.Object a_xmlElement,
java.lang.Object a_element)
Append a child to a given element. |
protected void |
setAttribute(java.lang.Object a_xmlElement,
java.lang.String a_key,
java.lang.String a_value)
Sets an attribute for a given Element. |
| Methods inherited from class org.jgap.data.DocumentBuilderBase |
|---|
buildDocument |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMLDocumentBuilder()
| Method Detail |
|---|
protected void setAttribute(java.lang.Object a_xmlElement,
java.lang.String a_key,
java.lang.String a_value)
DocumentBuilderBase
setAttribute in class DocumentBuilderBasea_xmlElement - the Element to set an attribute for
(e.g. org.w3c.com.Element)a_key - the key of the attributea_value - the value of the attribute
protected java.lang.Object documentAppendChild(java.lang.Object a_xmlDocument,
java.lang.Object a_element)
DocumentBuilderBase
documentAppendChild in class DocumentBuilderBasea_xmlDocument - to append element on (e.g. org.w3c.dom.Document)a_element - to append to document (e.g. org.w3c.com.Element)
protected java.lang.Object elementAppendChild(java.lang.Object a_xmlElement,
java.lang.Object a_element)
DocumentBuilderBase
elementAppendChild in class DocumentBuilderBasea_xmlElement - to append childElement on (e.g. org.w3c.com.Element)a_element - to append to rootElement (e.g. org.w3c.com.Element)
protected java.lang.Object createElement(java.lang.Object a_doc,
java.lang.Object a_xmlElement,
java.lang.String a_tagName)
DocumentBuilderBase
createElement in class DocumentBuilderBasea_doc - could be used as factory to create the element witha_xmlElement - null or existing element as templatea_tagName - name of tag to create for the element
public java.lang.Object buildDocument(IDataCreators a_document)
throws java.lang.Exception
a_document - the input structure holding the data to be represented
as XML document
java.lang.Exception
|
JGAP | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||