use of dr.evomodel.tree.CompatibilityStatistic in project beast-mcmc by beast-dev.
the class CompatibilityStatisticParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
String name = xo.getAttribute(Statistic.NAME, xo.getId());
Tree tree1 = (Tree) xo.getChild(Tree.class);
XMLObject cxo = xo.getChild(COMPATIBLE_WITH);
Tree tree2 = (Tree) cxo.getChild(Tree.class);
try {
return new CompatibilityStatistic(name, tree1, tree2);
} catch (TreeUtils.MissingTaxonException mte) {
throw new XMLParseException("Taxon, " + mte + ", in " + getParserName() + "was in the source tree but not the constraints tree.");
}
}
Aggregations