public SimTLModel(ModelType modelType, String modelName, Resource model) throws SimTLException{
this.modelType = modelType;
this.model = model;
listeners = new Vector<IModelChangedListener>();
if(modelType == null){
throw new InterpreterException("No modelType given");
} else if(modelType == ModelType.INPUT_MODEL && modelName == null){
throw new SimTLException("No name given for imported model");
} else if(modelType == ModelType.TEMPLATE_MODEL
&& !(this instanceof ITemplate)){
throw new InterpreterException("TEMPLATE_MODEL can only be built by an ITemplate instance");
}
//modelName
if(modelType == ModelType.TEMPLATE_INSTANCE_MODEL && modelName == null) this.modelName = TEMPLATE_INSTANCE_MODEL_ID;