use of dr.evomodel.tree.ExternalLengthStatistic in project beast-mcmc by beast-dev.
the class ExternalLengthStatisticParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
String name = xo.getAttribute(Statistic.NAME, xo.getId());
Tree tree = (Tree) xo.getChild(Tree.class);
TaxonList taxa = (TaxonList) xo.getChild(Taxa.class);
try {
return new ExternalLengthStatistic(name, tree, taxa);
} catch (TreeUtils.MissingTaxonException mte) {
throw new XMLParseException("Taxon, " + mte + ", in " + getParserName() + "was not found in the tree.");
}
}
Aggregations