@@ -0,0 +1,1504 @@
+package dr.evomodelxml.tree;%0D%0A%0D%0Aimport dr.evolution.tree.Tree;%0D%0Aimport dr.evomodel.tree.TreeHeightStatistic;%0D%0Aimport dr.evomodel.tree.TreeModel;%0D%0Aimport dr.inference.model.Statistic;%0D%0Aimport dr.xml.*;%0D%0A%0D%0A/**%0D%0A * Joseph Heled%0D%0A */%0D%0Apublic class TreeHeightStatisticParser extends AbstractXMLObjectParser %7B%0D%0A%0D%0A    public static final String TREE_HEIGHT_STATISTIC = %22treeHeightStatistic%22;%0D%0A%0D%0A        public String getParserName() %7B%0D%0A            return TREE_HEIGHT_STATISTIC;%0D%0A        %7D%0D%0A%0D%0A        public Object parseXMLObject(XMLObject xo) throws XMLParseException %7B%0D%0A%0D%0A            final String name = xo.getAttribute(Statistic.NAME, xo.getId());%0D%0A            final Tree tree = (Tree) xo.getChild(Tree.class);%0D%0A%0D%0A            return new TreeHeightStatistic(name, tree);%0D%0A        %7D%0D%0A%0D%0A        //************************************************************************%0D%0A        // AbstractXMLObjectParser implementation%0D%0A        //************************************************************************%0D%0A%0D%0A        public String getParserDescription() %7B%0D%0A            return %22A statistic that returns the height of the tree%22;%0D%0A        %7D%0D%0A%0D%0A        public Class getReturnType() %7B%0D%0A            return TreeHeightStatistic.class;%0D%0A        %7D%0D%0A%0D%0A        public XMLSyntaxRule%5B%5D getSyntaxRules() %7B%0D%0A            return rules;%0D%0A        %7D%0D%0A%0D%0A        private final XMLSyntaxRule%5B%5D rules = %7B%0D%0A                AttributeRule.newStringRule(Statistic.NAME, true),%0D%0A                new ElementRule(TreeModel.class),%0D%0A        %7D;%0D%0A%7D

Make tree height statistic available