package ua.be.wee.model.nodes;

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 = Activity.class), 
		  @Type(value = AutomatedActivity.class),
		  @Type(value = Artifact.class),
		  @Type(value = FinalNode.class),
		  @Type(value = ForkJoinNode.class),
		  @Type(value = InitialNode.class),
		})
@Entity
public abstract class Node implements NamedElement {

	
	public static final String ACTIVITY_IRI = "http://ua.be/sdo2l/vocabulary/formalisms/pm#Activity";
	public static final String AUTOMATED_ACTIVITY_IRI = "http://ua.be/sdo2l/vocabulary/formalisms/pm#AutomatedActivity";
	public static final String INITIAL_IRI = "http://ua.be/sdo2l/vocabulary/formalisms/pm#Initial";
	public static final String FINAL_IRI = "http://ua.be/sdo2l/vocabulary/formalisms/pm#Final";
	public static final String FORKJOIN_IRI = "http://ua.be/sdo2l/vocabulary/formalisms/pm#ForkJoin";
	public static final String ARTIFACT_IRI = "http://ua.be/sdo2l/vocabulary/formalisms/pm#Artifact";
	public static final String CTRL_INPUT_PORT_IRI = "http://ua.be/sdo2l/vocabulary/formalisms/pm#CtrlInputPort";
	public static final String CTRL_OUTPUT_PORT_IRI = "http://ua.be/sdo2l/vocabulary/formalisms/pm#CtrlOutputPort";
		
	@Id
	private String iri;
	
	private String name;
	
	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;
	}
	
}
