Package pal.xml

Class 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
    • Constructor Detail

      • ElementFactory

        public ElementFactory()
    • 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)