Search in sources :

Example 1 with WanderingTaxonLogger

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);
}
Also used : WanderingTaxonLogger(dr.evomodel.tree.WanderingTaxonLogger) Taxon(dr.evolution.util.Taxon)

Aggregations

Taxon (dr.evolution.util.Taxon)1 WanderingTaxonLogger (dr.evomodel.tree.WanderingTaxonLogger)1