|
JGAP | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jgap.xml.XMLManager
public class XMLManager
The XMLManager performs marshalling of genetic entity instances (such as Chromosomes and Genotypes) to XML representations of those entities, as well as unmarshalling. All of the methods in this class are static, so no construction is required (or allowed).
| Method Summary | |
|---|---|
static Chromosome |
getChromosomeFromDocument(Configuration a_activeConfiguration,
org.w3c.dom.Document a_xmlDocument)
Unmarshall a Chromosome instance from a given XML Document representation. |
static Chromosome |
getChromosomeFromElement(Configuration a_activeConfiguration,
org.w3c.dom.Element a_xmlElement)
Unmarshall a Chromosome instance from a given XML Element representation. |
static Gene[] |
getGenesFromElement(Configuration a_activeConfiguration,
org.w3c.dom.Element a_xmlElement)
Unmarshall a Chromosome instance from a given XML Element representation. |
static Genotype |
getGenotypeFromDocument(Configuration a_activeConfiguration,
org.w3c.dom.Document a_xmlDocument)
Unmarshall a Genotype instance from a given XML Document representation. |
static Genotype |
getGenotypeFromElement(Configuration a_activeConfiguration,
org.w3c.dom.Element a_xmlElement)
Unmarshall a Genotype instance from a given XML Element representation. |
static org.w3c.dom.Document |
readFile(java.io.File file)
Reads in an XML file and returns a Document object |
static org.w3c.dom.Document |
representChromosomeAsDocument(IChromosome a_subject)
Deprecated. use XMLDocumentBuilder instead |
static org.w3c.dom.Element |
representChromosomeAsElement(IChromosome a_subject,
org.w3c.dom.Document a_xmlDocument)
Deprecated. use XMLDocumentBuilder instead |
static org.w3c.dom.Element |
representGenesAsElement(Gene[] a_geneValues,
org.w3c.dom.Document a_xmlDocument)
Deprecated. use XMLDocumentBuilder instead |
static org.w3c.dom.Document |
representGenotypeAsDocument(Genotype a_subject)
Deprecated. use XMLDocumentBuilder instead |
static org.w3c.dom.Element |
representGenotypeAsElement(Genotype a_subject,
org.w3c.dom.Document a_xmlDocument)
Deprecated. use XMLDocumentBuilder instead |
static void |
writeFile(org.w3c.dom.Document doc,
java.io.File file)
Writes an XML file from a Document object |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static org.w3c.dom.Document representChromosomeAsDocument(IChromosome a_subject)
a_subject - the chromosome to represent as an XML document
public static org.w3c.dom.Document representGenotypeAsDocument(Genotype a_subject)
a_subject - the genotype to represent as an XML document
public static org.w3c.dom.Element representGenesAsElement(Gene[] a_geneValues,
org.w3c.dom.Document a_xmlDocument)
a_geneValues - the genes to represent as an XML elementa_xmlDocument - a Document instance that will be used to create
the Element instance. Note that the element will NOT be added to the
document by this method
public static org.w3c.dom.Element representChromosomeAsElement(IChromosome a_subject,
org.w3c.dom.Document a_xmlDocument)
a_subject - the chromosome to represent as an XML elementa_xmlDocument - a Document instance that will be used to create
the Element instance. Note that the element will NOT be added to the
document by this method
public static org.w3c.dom.Element representGenotypeAsElement(Genotype a_subject,
org.w3c.dom.Document a_xmlDocument)
a_subject - the genotype to represent as an XML elementa_xmlDocument - a Document instance that will be used to create
the Element instance. Note that the element will NOT be added to the
document by this method
public static Gene[] getGenesFromElement(Configuration a_activeConfiguration,
org.w3c.dom.Element a_xmlElement)
throws ImproperXMLException,
UnsupportedRepresentationException,
GeneCreationException
a_activeConfiguration - current Configuration objecta_xmlElement - the XML Element representation of the Chromosome
ImproperXMLException - if the given Element is improperly
structured or missing data
UnsupportedRepresentationException - if the actively configured
Gene implementation does not support the string representation of the
alleles used in the given XML document
GeneCreationException - if there is a problem creating or populating
an Gene instance
public static Chromosome getChromosomeFromElement(Configuration a_activeConfiguration,
org.w3c.dom.Element a_xmlElement)
throws ImproperXMLException,
InvalidConfigurationException,
UnsupportedRepresentationException,
GeneCreationException
a_activeConfiguration - The current active Configuration object
that is to be used during construction of
the Chromosome.a_xmlElement - The XML Element representation of the Chromosome.
ImproperXMLException - if the given Element is improperly
structured or missing data.
InvalidConfigurationException - if the given Configuration is in
an inconsistent state.
UnsupportedRepresentationException - if the actively configured
Gene implementation does not support the string representation
of the alleles used in the given XML document.
GeneCreationException - if there is a problem creating or
populating an Gene instance.
public static Genotype getGenotypeFromElement(Configuration a_activeConfiguration,
org.w3c.dom.Element a_xmlElement)
throws ImproperXMLException,
InvalidConfigurationException,
UnsupportedRepresentationException,
GeneCreationException
a_activeConfiguration - The current active Configuration object
that is to be used during construction of
the Genotype and Chromosome instances.a_xmlElement - The XML Element representation of the Genotype
ImproperXMLException - if the given Element is improperly
structured or missing data.
InvalidConfigurationException - if the given Configuration is in
an inconsistent state.
UnsupportedRepresentationException - if the actively configured
Gene implementation does not support the string representation
of the alleles used in the given XML document.
GeneCreationException - if there is a problem creating or
populating an Gene instance.
public static Genotype getGenotypeFromDocument(Configuration a_activeConfiguration,
org.w3c.dom.Document a_xmlDocument)
throws ImproperXMLException,
InvalidConfigurationException,
UnsupportedRepresentationException,
GeneCreationException
a_activeConfiguration - The current active Configuration object
that is to be used during construction of
the Genotype and Chromosome instances.a_xmlDocument - The XML Document representation of the Genotype.
ImproperXMLException - if the given Document is improperly
structured or missing data.
InvalidConfigurationException - if the given Configuration is in
an inconsistent state.
UnsupportedRepresentationException - if the actively configured
Gene implementation does not support the string representation
of the alleles used in the given XML document.
GeneCreationException - if there is a problem creating or
populating an Gene instance.
public static Chromosome getChromosomeFromDocument(Configuration a_activeConfiguration,
org.w3c.dom.Document a_xmlDocument)
throws ImproperXMLException,
InvalidConfigurationException,
UnsupportedRepresentationException,
GeneCreationException
a_activeConfiguration - The current active Configuration object
that is to be used during construction of
the Chromosome instances.a_xmlDocument - The XML Document representation of the Chromosome.
ImproperXMLException - if the given Document is improperly
structured or missing data.
InvalidConfigurationException - if the given Configuration is in
an inconsistent state.
UnsupportedRepresentationException - if the actively configured
Gene implementation does not support the string representation
of the alleles used in the given XML document.
GeneCreationException - if there is a problem creating or
populating an Gene instance.
public static org.w3c.dom.Document readFile(java.io.File file)
throws java.io.IOException,
org.xml.sax.SAXException
file - the file to be read in
java.io.IOException
SAXException
public static void writeFile(org.w3c.dom.Document doc,
java.io.File file)
throws java.io.IOException
doc - the Document object to be written to filefile - the file to be written
java.io.IOException
|
JGAP | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||