package ua.be.wee.model.nodes.ports;

import javax.persistence.Entity;
import javax.persistence.Id;

import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonSubTypes.Type;
import com.fasterxml.jackson.annotation.JsonTypeInfo;

import ua.be.wee.model.NamedElement;

@JsonTypeInfo(
		  use = JsonTypeInfo.Id.NAME, 
		  include = JsonTypeInfo.As.PROPERTY, 
		  property = "type")
@JsonSubTypes({ 
		  @Type(value = ControlInputPort.class), 
		  @Type(value = ControlOutputPort.class),
		  @Type(value = DataInputPort.class),
		  @Type(value = DataOutputPort.class)
		})
@Entity
public abstract class Port implements NamedElement {
	
	private String name;
	
	@Id
	private String iri;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getIri() {
		return iri;
	}

	public void setIri(String iri) {
		this.iri = iri;
	}

}
