package com.example.test.services;

import java.io.InputStream;

import org.springframework.stereotype.Service;

import com.example.test.dtram.Dtram;

@Service
public class ModelHandleService {
	
	private final Dtram dtram;
	
	ModelHandleService(Dtram d){
		dtram = d;
	}
	
	public void openModel(String modelText, String sessionId) {
		dtram.initModel(modelText);
		dtram.startSimulator(sessionId);
	}
	
	public void openModel(InputStream stream, String sessionId) {
		dtram.initModel(stream);
		dtram.startSimulator(sessionId);
	}
	
}
