Package pal.xml

Class ElementFactory

java.lang.Object
pal.xml.ElementFactory
All Implemented Interfaces:
XMLConstants

public class ElementFactory extends 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 Details

    • ElementFactory

      public ElementFactory()
  • Method Details

    • createAlignmentElement

      public static Element createAlignmentElement(Alignment a, Document document)
    • createAttributeElement

      public static Element createAttributeElement(Attribute a, Document document)
      Returns:
      a DOM element describing an attribute element.
    • createDemographicModelElement

      public static Element createDemographicModelElement(DemographicModel demo, Document document)
      Creates an XML element representing a demographic model.
    • createEdgeNodeElement

      public static Element createEdgeNodeElement(Node node, Document document)
    • createFrequenciesElement

      public static Element createFrequenciesElement(double[] frequencies, Document d)
      Creates a DOM element associated with the given document representing the given equilibrium frequencies of a rate matrix.
    • createMutationRateModelElement

      public static Element createMutationRateModelElement(MutationRateModel muModel, Document document)
      Creates an XML element representing a mutation rate model.
    • createNodeElement

      public static Element createNodeElement(Node node, Document document)
    • createNodeElement

      public static Element createNodeElement(Node node, Document document, boolean includeEdges)
    • createParameterElement

      public static Element createParameterElement(String name, double value, Document document)
      Creates an XML element representing a parameter.
    • createRateMatrixElement

      public static Element createRateMatrixElement(RateMatrix matrix, Document d)
    • createSequenceElement

      public static Element createSequenceElement(Identifier id, String sequence, Document document)
    • createTimeDataElement

      public static Element createTimeDataElement(TimeOrderCharacterData tocd, Document document)
    • createTreeElement

      public static Element createTreeElement(Tree tree, Document document, boolean includeEdges)