| 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.inferencexml.hmc; |
| 27 |
|
| 28 |
import dr.inference.hmc.LFMLoadingsPotentialDerivative; |
| 29 |
import dr.inference.model.LatentFactorModel; |
| 30 |
import dr.xml.*; |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
public class LFMLoadingsPotentialDerivativeParser extends AbstractXMLObjectParser { |
| 36 |
public final static String LFM_LOADINGS_DERIVATIVE = "LFMLoadingsPotentialDerivative"; |
| 37 |
|
| 38 |
@Override |
| 39 |
public String getParserName() { |
| 40 |
return LFM_LOADINGS_DERIVATIVE; |
| 41 |
} |
| 42 |
|
| 43 |
@Override |
| 44 |
public Object parseXMLObject(XMLObject xo) throws XMLParseException { |
| 45 |
LatentFactorModel lfm = (LatentFactorModel) xo.getChild(LatentFactorModel.class); |
| 46 |
|
| 47 |
return new LFMLoadingsPotentialDerivative(lfm); |
| 48 |
} |
| 49 |
|
| 50 |
@Override |
| 51 |
public XMLSyntaxRule[] getSyntaxRules() { |
| 52 |
return rules; |
| 53 |
} |
| 54 |
|
| 55 |
private final XMLSyntaxRule[] rules = { |
| 56 |
new ElementRule(LatentFactorModel.class), |
| 57 |
}; |
| 58 |
|
| 59 |
@Override |
| 60 |
public String getParserDescription() { |
| 61 |
return null; |
| 62 |
} |
| 63 |
|
| 64 |
@Override |
| 65 |
public Class getReturnType() { |
| 66 |
return LFMLoadingsPotentialDerivative.class; |
| 67 |
} |
| 68 |
} |
| 69 |
|