/*
 * Copyright (c) 2010 University of Tartu
 */
package org.jpmml.manager;

import org.dmg.pmml.*;

public class ModelManagerFactory {

	protected boolean alternateImplementation = false;

	protected ModelManagerFactory(){
	}

	public ModelManager<? extends Model> getModelManager(PMML pmml, Model model){

		if(model instanceof RegressionModel){
			return new RegressionModelManager(pmml, (RegressionModel)model);
		} else

		if(model instanceof TreeModel){
			return new TreeModelManager(pmml, (TreeModel)model);
		} else

		if(model instanceof NeuralNetwork){
			return new NeuralNetworkManager(pmml, (NeuralNetwork)model);
		} else

		if(model instanceof MiningModel){
			return new MiningModelManager(pmml, (MiningModel)model);
		}

		throw new UnsupportedFeatureException(model);
	}

	static
	public ModelManagerFactory getInstance(){
		return new ModelManagerFactory();
	}

	public void setAlternateImplementation(boolean alternateImplementation) {
		this.alternateImplementation = alternateImplementation;
	}
}
@@ -301,24 +301,25 @@
 odel)%7B%0A%0A%09%09if
+ 
 (model insta
@@ -334,32 +334,32 @@
 gressionModel)%7B%0A
-
 %09%09%09return new Re
@@ -416,32 +416,33 @@
 ;%0A%09%09%7D else%0A%0A%09%09if
+ 
 (model instanceo
@@ -517,32 +517,33 @@
 ;%0A%09%09%7D else%0A%0A%09%09if
+ 
 (model instanceo
@@ -638,16 +638,17 @@
 se%0A%0A%09%09if
+ 
 (model i
@@ -719,24 +719,133 @@
 MiningModel)
+ model);%0A%09%09%7D else%0A%0A%09%09if (model instanceof Scorecard) %7B%0A%09%09%09return new ScoreCardModelManager(pmml, (Scorecard) 
 model);%0A%09%09%7D%0A

Add MiningModel and Scorecard to ModelManagerFactory.