use of dr.evomodel.tree.WanderingTaxonLogger in project beast-mcmc by beast-dev.
the class WanderingTaxonLoggerParser method parseXMLObject.
public Object parseXMLObject(XMLObject xo) throws XMLParseException {
String name = xo.getAttribute(NAME, xo.getId());
WanderingTaxonLogger.Relative relative = WanderingTaxonLogger.Relative.SISTER;
if (xo.getAttribute(WanderingTaxonLogger.RELATIVE, "sister").equalsIgnoreCase("parent")) {
relative = WanderingTaxonLogger.Relative.PARENT;
}
Taxon taxon = (Taxon) xo.getChild(Taxon.class);
return new WanderingTaxonLogger(name, taxon, relative);
}
Aggregations