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