/*
 * BranchSpecificSubstitutionModel.java
 *
 * Copyright (c) 2002-2018 Alexei Drummond, Andrew Rambaut and Marc Suchard
 *
 * This file is part of BEAST.
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership and licensing.
 *
 * BEAST is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 *  BEAST is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with BEAST; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
 * Boston, MA  02110-1301  USA
 */

package dr.evomodel.branchratemodel;

import dr.evomodel.branchmodel.BranchSpecificBranchModel;
import dr.evomodel.substmodel.SubstitutionModel;
import dr.evomodel.tree.TreeModel;

/**
 * @author Marc A. Suchard
 * @author Xiang Ji
 */
public class BranchSpecificSubstitutionModel extends BranchSpecificBranchModel {

    public BranchSpecificSubstitutionModel(TreeModel treeModel, SubstitutionModel rootSubstitutionModel) {
        super(treeModel, rootSubstitutionModel);
    }
}

@@ -1058,51 +1058,58 @@
 .evo
-model.branchmodel.BranchSpecificBranchModel
+lution.tree.NodeRef;%0Aimport dr.evolution.tree.Tree
 ;%0Aim
@@ -1158,43 +1158,8 @@
 del;
-%0Aimport dr.evomodel.tree.TreeModel;
 %0A%0A/*
@@ -1222,13 +1222,17 @@
 lic 
-class
+interface
  Bra
@@ -1263,110 +1263,234 @@
 odel
- extends BranchSpecificBranchModel %7B%0A%0A    public BranchSpecificSubstitutionModel(TreeModel treeModel, 
+%7B%0A%0A    SubstitutionModel getSubstitutionModel(final Tree tree, final NodeRef node);%0A%0A    class None implements BranchSpecificSubstitutionModel %7B%0A%0A        private final SubstitutionModel substitutionModel;%0A%0A        public None(
 Subs
@@ -1503,21 +1503,17 @@
 onModel 
-rootS
+s
 ubstitut
@@ -1536,30 +1536,186 @@
     
-super(treeModel, rootS
+    this.substitutionModel = substitutionModel;%0A        %7D%0A%0A        @Override%0A        public SubstitutionModel getSubstitutionModel(Tree tree, NodeRef node) %7B%0A            return s
 ubst
@@ -1730,15 +1730,25 @@
 odel
-)
 ;%0A    
-%7D
+    %7D%0A    %7D%0A
 %0A%7D%0A

change to interface with different class realizations