Package pal.xml
Class ElementFactory
- java.lang.Object
-
- pal.xml.ElementFactory
-
- All Implemented Interfaces:
XMLConstants
public class ElementFactory extends java.lang.Object implements XMLConstants
This class provides static methods for creating DOM Elements from PAL Objects. Arguably each object in PAL should be allowed to generate a DOM Element representation itself -- however I have decided to restrict the PAL's dependence on the DOM specification to this package only.- Version:
- $Id: ElementFactory.java,v 1.9 2003/07/20 04:52:42 matt Exp $
- Author:
- Alexei Drummond
-
-
Field Summary
-
Fields inherited from interface pal.util.XMLConstants
A_TO_C, A_TO_G, A_TO_T, ALIGNMENT, ALPHA, ANCESTRAL_MU_RATE, ANCESTRAL_POP_SIZE, ATTRIBUTE, BACKWARDS, BLOSUM62, C_TO_G, C_TO_T, COALESCENT, CONST_EXP_CONST, CONST_EXP_GROWTH, CONSTANT_MUTATION_RATE, CONSTANT_POPULATION, CPREV, CURRENT_POP_SIZE_DURATION, DATA_TYPE, DATA_TYPE_ID, DAYHOFF, DAYS, DEMOGRAPHIC_MODEL, DIRECTION, EDGE, EXPANDING_POPULATION, EXPONENTIAL_GROWTH, F81, F84, FREQUENCIES, G_TO_T, GAMMA_ALPHA, GAMMA_DISTRIBUTION, GENERATIONS, GROWTH_PHASE_DURATION, GROWTH_RATE, GTR, HEIGHT, HKY, ID, JC, JTT, KAPPA, LENGTH, MISSING, MODEL, MONTHS, MTREV24, MU_STEP_TIME, MUTATION_RATE, MUTATION_RATE_MODEL, MUTATIONS, NAME, NODE, NUMBER_CATEGORIES, OMEGA, ORIGIN, PARAMETER, POPULATION_SIZE, PYRIMIDINE_PURINE_RATIO, RATE_DISTRIBUTION, RATE_MATRIX, SEQUENCE, SPACES_PER_LEVEL, STEPPED_MUTATION_RATE, TIME, TIME_DATA, TN, TREE, TS_TV_RATIO, TWO_STATE, TYPE, UNIFORM, UNIFORM_RATE_DISTRIBUTION, UNITS, UNKNOWN, VALUE, VT, WAG, YANG_CODON_MODEL, YEARS
-
-
Constructor Summary
Constructors Constructor Description ElementFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.w3c.dom.ElementcreateAlignmentElement(Alignment a, org.w3c.dom.Document document)static org.w3c.dom.ElementcreateAttributeElement(Attribute a, org.w3c.dom.Document document)static org.w3c.dom.ElementcreateDemographicModelElement(DemographicModel demo, org.w3c.dom.Document document)Creates an XML element representing a demographic model.static org.w3c.dom.ElementcreateEdgeNodeElement(Node node, org.w3c.dom.Document document)static org.w3c.dom.ElementcreateFrequenciesElement(double[] frequencies, org.w3c.dom.Document d)Creates a DOM element associated with the given document representing the given equilibrium frequencies of a rate matrix.static org.w3c.dom.ElementcreateMutationRateModelElement(MutationRateModel muModel, org.w3c.dom.Document document)Creates an XML element representing a mutation rate model.static org.w3c.dom.ElementcreateNodeElement(Node node, org.w3c.dom.Document document)static org.w3c.dom.ElementcreateNodeElement(Node node, org.w3c.dom.Document document, boolean includeEdges)static org.w3c.dom.ElementcreateParameterElement(java.lang.String name, double value, org.w3c.dom.Document document)Creates an XML element representing a parameter.static org.w3c.dom.ElementcreateRateMatrixElement(RateMatrix matrix, org.w3c.dom.Document d)static org.w3c.dom.ElementcreateSequenceElement(Identifier id, java.lang.String sequence, org.w3c.dom.Document document)static org.w3c.dom.ElementcreateTimeDataElement(TimeOrderCharacterData tocd, org.w3c.dom.Document document)static org.w3c.dom.ElementcreateTreeElement(Tree tree, org.w3c.dom.Document document, boolean includeEdges)
-
-
-
Method Detail
-
createAlignmentElement
public static org.w3c.dom.Element createAlignmentElement(Alignment a, org.w3c.dom.Document document)
-
createAttributeElement
public static org.w3c.dom.Element createAttributeElement(Attribute a, org.w3c.dom.Document document)
- Returns:
- a DOM element describing an attribute element.
-
createDemographicModelElement
public static org.w3c.dom.Element createDemographicModelElement(DemographicModel demo, org.w3c.dom.Document document)
Creates an XML element representing a demographic model.
-
createEdgeNodeElement
public static org.w3c.dom.Element createEdgeNodeElement(Node node, org.w3c.dom.Document document)
-
createFrequenciesElement
public static org.w3c.dom.Element createFrequenciesElement(double[] frequencies, org.w3c.dom.Document d)Creates a DOM element associated with the given document representing the given equilibrium frequencies of a rate matrix.
-
createMutationRateModelElement
public static org.w3c.dom.Element createMutationRateModelElement(MutationRateModel muModel, org.w3c.dom.Document document)
Creates an XML element representing a mutation rate model.
-
createNodeElement
public static org.w3c.dom.Element createNodeElement(Node node, org.w3c.dom.Document document)
-
createNodeElement
public static org.w3c.dom.Element createNodeElement(Node node, org.w3c.dom.Document document, boolean includeEdges)
-
createParameterElement
public static org.w3c.dom.Element createParameterElement(java.lang.String name, double value, org.w3c.dom.Document document)Creates an XML element representing a parameter.
-
createRateMatrixElement
public static org.w3c.dom.Element createRateMatrixElement(RateMatrix matrix, org.w3c.dom.Document d)
-
createSequenceElement
public static org.w3c.dom.Element createSequenceElement(Identifier id, java.lang.String sequence, org.w3c.dom.Document document)
-
createTimeDataElement
public static org.w3c.dom.Element createTimeDataElement(TimeOrderCharacterData tocd, org.w3c.dom.Document document)
-
createTreeElement
public static org.w3c.dom.Element createTreeElement(Tree tree, org.w3c.dom.Document document, boolean includeEdges)
-
-