package org.wontovlab.model.TO;

import org.wontovlab.model.Step;


public class StepTO{
	private String id;
	private String description;
	private String applicationOntologyReference;
	private MaterialTO[] materials;

	
	

	
	public StepTO() {
		
	}
	
	public StepTO(Step step) {
		this.id = step.getId();
		this.description = step.getDescription();
		this.applicationOntologyReference = step.getApplicationOntologyReference();
		
		materials = new MaterialTO[step.getMaterials().size()];
		
		if (step.getMaterials() != null) {
			for (int i=0; i < step.getMaterials().size(); i++) {
				this.materials[i] = new MaterialTO(step.getMaterials().get(i));
			}
		}
	}
	
	public StepTO(TaskTO task) {
		this.description = task.getDescription();
		this.applicationOntologyReference = task.getApplicationOntologyReference();
		this.materials = task.getMaterials();
	}

	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	
	public String getApplicationOntologyReference() {
		return applicationOntologyReference;
	}

	public void setApplicationOntologyReference(String applicationOntologyReference) {
		this.applicationOntologyReference = applicationOntologyReference;
	}


	public MaterialTO[] getMaterials() {
		return materials;
	}

	public void setMaterials(MaterialTO[] materials) {
		this.materials = materials;
	}
	

	
}
