public static void writeBranchRatesModelRef(PartitionClockModel model,XMLWriter writer){
  String tag="";
  String id="";
switch (model.getClockType()) {
case STRICT_CLOCK:
    tag=StrictClockBranchRatesParser.STRICT_CLOCK_BRANCH_RATES;
  id=model.getPrefix() + BranchRateModel.BRANCH_RATES;
break;
case UNCORRELATED:
tag=model.isContinuousQuantile() ? ContinuousBranchRatesParser.CONTINUOUS_BRANCH_RATES : DiscretizedBranchRatesParser.DISCRETIZED_BRANCH_RATES;
id=model.getPrefix() + BranchRateModel.BRANCH_RATES;
break;
case RANDOM_LOCAL_CLOCK:
tag=RandomLocalClockModelParser.LOCAL_BRANCH_RATES;
id=model.getPrefix() + BranchRateModel.BRANCH_RATES;
break;
case FIXED_LOCAL_CLOCK:
tag=LocalClockModelParser.LOCAL_CLOCK_MODEL;
id=model.getPrefix() + BranchRateModel.BRANCH_RATES;
break;
case AUTOCORRELATED:
tag=ACLikelihoodParser.AC_LIKELIHOOD;
throw new UnsupportedOperationException("Autocorrelated relaxed clock model not implemented yet");
default :
throw new IllegalArgumentException("Unknown clock model");
}
writer.writeIDref(tag,id);
}

public static void writeBranchRatesModelRef ( PartitionClockModel model , XMLWriter writer ) { String tag = "" ; String id = "" ; switch ( model . getClockType ( ) ) { case STRICT_CLOCK : tag = StrictClockBranchRatesParser . STRICT_CLOCK_BRANCH_RATES ; id = model . getPrefix ( ) + BranchRateModel . BRANCH_RATES ; break ; case UNCORRELATED : tag = model . isContinuousQuantile ( ) ? ContinuousBranchRatesParser . CONTINUOUS_BRANCH_RATES : DiscretizedBranchRatesParser . DISCRETIZED_BRANCH_RATES ; id = model . getPrefix ( ) + BranchRateModel . BRANCH_RATES ; break ; case RANDOM_LOCAL_CLOCK : tag = RandomLocalClockModelParser . LOCAL_BRANCH_RATES ; id = model . getPrefix ( ) + BranchRateModel . BRANCH_RATES ; break ; case FIXED_LOCAL_CLOCK : tag = LocalClockModelParser . LOCAL_CLOCK_MODEL ; id = model . getPrefix ( ) + BranchRateModel . BRANCH_RATES ; break ; case AUTOCORRELATED : tag = ACLikelihoodParser . AC_LIKELIHOOD ; throw new UnsupportedOperationException ( "Autocorrelated relaxed clock model not implemented yet" ) ; default : throw new IllegalArgumentException ( "Unknown clock model" ) ; } writer . writeIDref ( tag , id ) ; }
write the branch rates model reference .
