Debian Codegraph @

src/dr/evomodel/alloppnet/parsers/MulMSCoalescentParser.java

raw symbols SCIP
1
2 /*
3 * MulMSCoalescentParser.java
4 *
5 * Copyright (c) 2002-2017 Alexei Drummond, Andrew Rambaut and Marc Suchard
6 *
7 * This file is part of BEAST.
8 * See the NOTICE file distributed with this work for additional
9 * information regarding copyright ownership and licensing.
10 *
11 * BEAST is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License as
13 * published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
15 *
16 * BEAST is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License for more details.
20 *
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with BEAST; if not, write to the
23 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
24 * Boston, MA 02110-1301 USA
25 */
26
27 package dr.evomodel.alloppnet.parsers;
28
29 import dr.evomodel.alloppnet.speciation.MulMSCoalescent;
30 import dr.evomodel.alloppnet.speciation.MulSpeciesBindings;
31 import dr.evomodel.alloppnet.speciation.MulSpeciesTreeModel;
32 import dr.xml.*;
33
34 /**
35 *
36 * @author Graham Jones
37 * Date: 20/12/2011
38 */
39 public class MulMSCoalescentParser extends AbstractXMLObjectParser {
40 public static final String MUL_MS_COALESCENT = "mulMSCoalescent";
41
42 public Object parseXMLObject(XMLObject xo) throws XMLParseException {
43 final MulSpeciesBindings sb = (MulSpeciesBindings) xo.getChild(MulSpeciesBindings.class);
44 final MulSpeciesTreeModel tree = (MulSpeciesTreeModel) xo.getChild(MulSpeciesTreeModel.class);
45 return new MulMSCoalescent(sb, tree);
46 }
47
48 public XMLSyntaxRule[] getSyntaxRules() {
49 return new XMLSyntaxRule[]{
50 new ElementRule(MulSpeciesBindings.class),
51 new ElementRule(MulSpeciesTreeModel.class),
52 };
53 }
54
55 public String getParserDescription() {
56 return "Compute coalecent log-liklihood of a set of gene trees embedded inside one species tree.";
57 }
58
59 public Class getReturnType() {
60 return MulMSCoalescent.class;
61 }
62
63 public String getParserName() {
64 return MUL_MS_COALESCENT;
65 }
66 }