// Path: aadl-translator/src/main/java/edu/ksu/cis/projects/mdcf/aadltranslator/model/ModelUtil.java
// public static enum ComponentType {
// 	SENSOR, ACTUATOR, CONTROLLER, CONTROLLEDPROCESS, AGGREGATION, TOP
// };
// 
// Path: aadl-translator/src/main/java/edu/ksu/cis/projects/mdcf/aadltranslator/model/ModelUtil.java
// public static enum ProcessType {
// 	PSEUDODEVICE, DISPLAY, LOGIC
// };


import java.util.Map;
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
import edu.ksu.cis.projects.mdcf.aadltranslator.model.ModelUtil.ComponentType;
import edu.ksu.cis.projects.mdcf.aadltranslator.model.ModelUtil.ProcessType;
package edu.ksu.cis.projects.mdcf.aadltranslator.model;




public class DeviceModel extends DevOrProcModel {
	
	private HashBiMap<String, String> inToOutPortNames = HashBiMap.create();
	
	public DeviceModel(){
		super();
		processType = ProcessType.PSEUDODEVICE;
	}
	
	public void setComponentType(String componentType){
		this.componentType = ComponentType.valueOf(componentType.toUpperCase());
	}
	
	private void addOutPortName(String inPortName, String outPortName){
		inToOutPortNames.put(inPortName, outPortName);
	}
	
	public BiMap<String, String> getOutPortNames(){
		return inToOutPortNames;
	}
	
	public BiMap<String, String> getInPortNames(){
		return inToOutPortNames.inverse();
	}
	
	@Override
	public void addFeature(FeatureModel fm) {
		if(!(fm instanceof PortModel)){
			ports.put(fm.getName(), fm);
			return;
		}
// Path: aadl-translator/src/main/java/edu/ksu/cis/projects/mdcf/aadltranslator/model/ModelUtil.java
// public static enum ComponentType {
// 	SENSOR, ACTUATOR, CONTROLLER, CONTROLLEDPROCESS, AGGREGATION, TOP
// };
// 
// Path: aadl-translator/src/main/java/edu/ksu/cis/projects/mdcf/aadltranslator/model/ModelUtil.java
// public static enum ProcessType {
// 	PSEUDODEVICE, DISPLAY, LOGIC
// };


// Path: aadl-translator/src/main/java/edu/ksu/cis/projects/mdcf/aadltranslator/model/DeviceModel.java
import java.util.Map;
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
import edu.ksu.cis.projects.mdcf.aadltranslator.model.ModelUtil.ComponentType;
import edu.ksu.cis.projects.mdcf.aadltranslator.model.ModelUtil.ProcessType;

package edu.ksu.cis.projects.mdcf.aadltranslator.model;




public class DeviceModel extends DevOrProcModel {
	
	private HashBiMap<String, String> inToOutPortNames = HashBiMap.create();
	
	public DeviceModel(){
		super();
		processType = ProcessType.PSEUDODEVICE;
	}
	
	public void setComponentType(String componentType){
		this.componentType = ComponentType.valueOf(componentType.toUpperCase());
	}
	
	private void addOutPortName(String inPortName, String outPortName){
		inToOutPortNames.put(inPortName, outPortName);
	}
	
	public BiMap<String, String> getOutPortNames(){
		return inToOutPortNames;
	}
	
	public BiMap<String, String> getInPortNames(){
		return inToOutPortNames.inverse();
	}
	
	@Override
	public void addFeature(FeatureModel fm) {
		if(!(fm instanceof PortModel)){
			ports.put(fm.getName(), fm);
			return;
		}
		PortModel pm = (PortModel) fm;