Package pal.xml
Class ElementFactory
java.lang.Object
pal.xml.ElementFactory
- All Implemented Interfaces:
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic ElementcreateAlignmentElement(Alignment a, Document document) static ElementcreateAttributeElement(Attribute a, Document document) static ElementcreateDemographicModelElement(DemographicModel demo, Document document) Creates an XML element representing a demographic model.static ElementcreateEdgeNodeElement(Node node, Document document) static ElementcreateFrequenciesElement(double[] frequencies, Document d) Creates a DOM element associated with the given document representing the given equilibrium frequencies of a rate matrix.static ElementcreateMutationRateModelElement(MutationRateModel muModel, Document document) Creates an XML element representing a mutation rate model.static ElementcreateNodeElement(Node node, Document document) static ElementcreateNodeElement(Node node, Document document, boolean includeEdges) static ElementcreateParameterElement(String name, double value, Document document) Creates an XML element representing a parameter.static ElementcreateRateMatrixElement(RateMatrix matrix, Document d) static ElementcreateSequenceElement(Identifier id, String sequence, Document document) static ElementcreateTimeDataElement(TimeOrderCharacterData tocd, Document document) static ElementcreateTreeElement(Tree tree, Document document, boolean includeEdges)
-
Constructor Details
-
ElementFactory
public ElementFactory()
-
-
Method Details
-
createAlignmentElement
-
createAttributeElement
- Returns:
- a DOM element describing an attribute element.
-
createDemographicModelElement
Creates an XML element representing a demographic model. -
createEdgeNodeElement
-
createFrequenciesElement
Creates a DOM element associated with the given document representing the given equilibrium frequencies of a rate matrix. -
createMutationRateModelElement
Creates an XML element representing a mutation rate model. -
createNodeElement
-
createNodeElement
-
createParameterElement
Creates an XML element representing a parameter. -
createRateMatrixElement
-
createSequenceElement
-
createTimeDataElement
-
createTreeElement
-