| 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.evoxml; |
| 27 |
|
| 28 |
import dr.evolution.datatype.OldHiddenNucleotides; |
| 29 |
import dr.xml.*; |
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
@Deprecated |
| 35 |
public class OldHiddenNucleotideParser extends AbstractXMLObjectParser { |
| 36 |
|
| 37 |
public static final String HIDDEN_NUCLEOTIDES = "hiddenNucleotides"; |
| 38 |
public static final String HIDDEN_CLASS_COUNT = "classCount"; |
| 39 |
|
| 40 |
public String getParserName() { |
| 41 |
return HIDDEN_NUCLEOTIDES; |
| 42 |
} |
| 43 |
|
| 44 |
public Object parseXMLObject(XMLObject xo) throws XMLParseException { |
| 45 |
|
| 46 |
int hiddenClassCount = xo.getIntegerAttribute(HIDDEN_CLASS_COUNT); |
| 47 |
return new OldHiddenNucleotides(hiddenClassCount); |
| 48 |
} |
| 49 |
|
| 50 |
public String getParserDescription() { |
| 51 |
return "A nucleotide data type that allows hidden substitution classes"; |
| 52 |
} |
| 53 |
|
| 54 |
public Class getReturnType() { |
| 55 |
return OldHiddenNucleotides.class; |
| 56 |
} |
| 57 |
|
| 58 |
public XMLSyntaxRule[] getSyntaxRules() { |
| 59 |
return new XMLSyntaxRule[]{AttributeRule.newIntegerRule(HIDDEN_CLASS_COUNT)}; |
| 60 |
} |
| 61 |
} |