package org.wontovlab.model.TO;

import org.wontovlab.model.Material;


public class MaterialTO {
	private String name;
	private PropertyTO[] properties;
	public String ontologyReference;
	
	
	
	
	
	

	public MaterialTO() {
	}

	public MaterialTO(Material material) {
		this.name = material.getName();
		this.ontologyReference = material.getOntologyReference();
		
		if (material.getProperties() != null) {
			this.properties = new PropertyTO[material.getProperties().size()];
			for (int i=0; i < material.getProperties().size(); i++) {
				properties[i] = new PropertyTO(material.getProperties().get(i));
			}	
		}
		
	}
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public PropertyTO[] getProperties() {
		return properties;
	}
	public void setProperties(PropertyTO[] properties) {
		this.properties = properties;
	}
	
	public String getOntologyReference() {
		return ontologyReference;
	}
	public void setOntologyReference(String ontologyReference) {
		this.ontologyReference = ontologyReference;
	}
	
	

}
