| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
package dr.evomodelxml.coalescent; |
| 27 |
|
| 28 |
import dr.evomodel.coalescent.LineageCountStatistic; |
| 29 |
import dr.evomodel.coalescent.OldAbstractCoalescentLikelihood; |
| 30 |
import dr.xml.*; |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
public class LineageCountStatisticParser extends AbstractXMLObjectParser { |
| 35 |
|
| 36 |
public static final String LINEAGE_COUNT_STATISTIC = "lineageCountStatistic"; |
| 37 |
|
| 38 |
|
| 39 |
public String getParserDescription() { |
| 40 |
return ""; |
| 41 |
} |
| 42 |
|
| 43 |
public Class getReturnType() { |
| 44 |
return LineageCountStatistic.class; |
| 45 |
} |
| 46 |
|
| 47 |
public XMLSyntaxRule[] getSyntaxRules() { |
| 48 |
return new XMLSyntaxRule[]{ |
| 49 |
new ElementRule(OldAbstractCoalescentLikelihood.class), |
| 50 |
}; |
| 51 |
} |
| 52 |
|
| 53 |
public Object parseXMLObject(XMLObject xo) throws XMLParseException { |
| 54 |
return new LineageCountStatistic( |
| 55 |
(OldAbstractCoalescentLikelihood) xo.getChild(OldAbstractCoalescentLikelihood.class)); |
| 56 |
} |
| 57 |
|
| 58 |
public String getParserName() { |
| 59 |
return LINEAGE_COUNT_STATISTIC; |
| 60 |
} |
| 61 |
|
| 62 |
} |