package org.wontovlab.test;

import java.util.ArrayList;
import java.util.List;

import org.wontovlab.model.Experiment;
import org.wontovlab.model.Material;
import org.wontovlab.model.Property;
import org.wontovlab.model.Step;
import org.wontovlab.model.Task;
import org.wontovlab.model.TO.ExperimentTO;
import org.wontovlab.tool.WPF;
import org.wontovlab.tool.Wpfws;

public class Test {

	//If it is desired to access the owl files that are saved on the local computer
	//static MethodsBean methodsBean = new MethodsBean(true, "c:\\docume~1\\admini~1\\meusdo~1\\mydrop~1\\workspace\\WOntoVLab-Plugin\\Ontology\\DomainOntology.owl", "http://www.owl-ontologies.com/Ontology1251833905.owl",
		//"c:\\docume~1\\admini~1\\meusdo~1\\mydrop~1\\workspace\\WOntoVLab-Plugin\\Ontology\\ApplicationOntology\\ApplicationOntology.owl", "http://www.owl-ontologies.com/Ontology1258201595.owl");
	
	//static WPF wpf = new WPF(false, "http://www.dc.ufscar.br/~daniel_cugler/DomainOntology.owl", "http://www.owl-ontologies.com/Ontology1251833905.owl",
	//		"http://www.dc.ufscar.br/~daniel_cugler/ApplicationOntology.owl", "http://www.owl-ontologies.com/Ontology1258201595.owl");
	
	
	static WPF wpf = new WPF(true, "c:\\docume~1\\admini~1\\meusdo~1\\mydrop~1\\workspace\\WOntoVLab-Plugin\\Ontology\\DomainOntology.owl", "http://www.owl-ontologies.com/Ontology1251833905.owl",
	"c:\\docume~1\\admini~1\\meusdo~1\\mydrop~1\\workspace\\WOntoVLab-Plugin\\Ontology\\ApplicationOntology\\ApplicationOntology.owl", "http://www.owl-ontologies.com/Ontology1258201595.owl");

	
	public static void main(String[] args)  {

			try {
				
				Wpfws test = new Wpfws();

/*				MaterialTO materialTO = test.doGetMaterial("http://www.owl-ontologies.com/Ontology1251833905.owl#Cadinho",false, "http://www.dc.ufscar.br/~daniel_cugler/DomainOntology.owl", "http://www.owl-ontologies.com/Ontology1251833905.owl",
								"http://www.dc.ufscar.br/~daniel_cugler/ApplicationOntology.owl", "http://www.owl-ontologies.com/Ontology1258201595.owl");
				
				test.doGetInstancesSimilarTo(materialTO, false, "http://www.dc.ufscar.br/~daniel_cugler/DomainOntology.owl", "http://www.owl-ontologies.com/Ontology1251833905.owl",
						"http://www.dc.ufscar.br/~daniel_cugler/ApplicationOntology.owl", "http://www.owl-ontologies.com/Ontology1258201595.owl");
				*/

				
				/*TaskTO[] taskTO = test.aoGetAllTasks(false, "http://www.dc.ufscar.br/~daniel_cugler/DomainOntology.owl", "http://www.owl-ontologies.com/Ontology1251833905.owl",
						"http://www.dc.ufscar.br/~daniel_cugler/ApplicationOntology.owl", "http://www.owl-ontologies.com/Ontology1258201595.owl");*/

				
				
				//Set<MaterialTO> t = test.doGetAllMaterials(false, "http://www.dc.ufscar.br/~daniel_cugler/DomainOntology.owl", "http://www.owl-ontologies.com/Ontology1251833905.owl",
				//		"http://www.dc.ufscar.br/~daniel_cugler/ApplicationOntology.owl", "http://www.owl-ontologies.com/Ontology1258201595.owl");
				
			
/*				Experiment authorshipExperiment = creatingAuthorshipExperimentExample();
				
				test.creatingAuthorshipWorkflow(new ExperimentTO(authorshipExperiment), "c:\\authorship.xpdl");*/
				
				
								
				Experiment authorshipExperiment = creatingAuthorshipExperimentExample();				
				
				Experiment executionExperiment = creatingExecutionExperimentExample();
				
				wpf.creatingAuthorshipWorkflow(authorshipExperiment, "c:\\authorship.xpdl");
				
				wpf.creatingExecutionWorkflow(executionExperiment, "c:\\execution.xpdl");
				
				wpf.readAuthorshipXPDL("c:\\authorship.xpdl");
				
				wpf.readExecutionXPDL("c:\\execution.xpdl");
				
				wpf.comparingWorkflows();
				
				
				
				
			} catch (Exception e) {
				System.out.println("EXCEPTION: " + e.getMessage());
			}

	}

	
	
	
	public static Experiment creatingAuthorshipExperimentExample() {
		List<Material> materials = wpf.doGetAllMaterials();
		Experiment experiment = new Experiment();
		List<Step> steps = new ArrayList<Step>();
		
		//Simulating a teacher creating an experiment
		experiment.setExperimentId(new Long(1));
		experiment.setName("Extracao de DNA");
		experiment.setDescription("Este experimento destina-se à realização de extração de DNA");
		
		System.out.println();
		System.out.println("Processo descritivo do projetista criando o experimento \"Extração de DNA\". Utilizando os métodos fornecidos pelo WPF");
		System.out.println();
		
		
		//Criando passo 1 
		Step step1 = new Step();
		step1.setId("Step_1");
		step1.setDescription("Colocar tecido no cadinho");
		
		List<Material> materialsStep1 = new ArrayList<Material>();
		
		printExperimentHeader(step1);
		
		materialsStep1.add(findMaterialObjectFromString("Cadinho", materials));
		materialsStep1.add(findMaterialObjectFromString("Tecido", materials));
		step1.setMaterials(materialsStep1);
		
		List<Task> aoTasks = wpf.aoGetAllTasks();
		
		step1.setApplicationOntologyReference(getApplicationOntologyReferenceFromTaskLabel("Coletar Material", aoTasks, "http://www.owl-ontologies.com/Ontology1258201595.owl#Coletar_Material_Metodo1"));
		steps.add(step1);
		

		
		//Criando passo 2 
		Step step2 = new Step();
		step2.setId("Step_2");
		step2.setDescription("Adicionar nitrogenio liquido ao cadinho");
		
		List<Material> materialsStep2 = new ArrayList<Material>();
		
		printExperimentHeader(step2);
		
		
		materialsStep2.add(findMaterialObjectFromString("Cadinho", materials));
		
		Material liquidNitrogen = findMaterialObjectFromString("Nitrogênio Líquido", materials);
		liquidNitrogen.getProperties().get(0).setValue("1");
		liquidNitrogen.getProperties().get(1).setValue("40");
		printFilledMaterialProperties(liquidNitrogen);
		materialsStep2.add(liquidNitrogen);
		
		step2.setMaterials(materialsStep2);
		
		step2.setApplicationOntologyReference(getApplicationOntologyReferenceFromTaskLabel("Adicionar Nitrogenio Liquido", aoTasks, "http://www.owl-ontologies.com/Ontology1258201595.owl#Adicionar_Nitrogenio_Liquido_Metodo1"));
		steps.add(step2);
		
		
		//Criando passo 3 
		Step step3 = new Step();
		step3.setId("Step_3");
		step3.setDescription("Fragmentar conteudo do cadinho utilizando bastao de louça");
		
		List<Material> materialsStep3 = new ArrayList<Material>();
		
		printExperimentHeader(step3);
		
		materialsStep3.add(findMaterialObjectFromString("Cadinho", materials));
		materialsStep3.add(findMaterialObjectFromString("Bastão de Louça", materials));
		step3.setMaterials(materialsStep3);
		
		step3.setApplicationOntologyReference(getApplicationOntologyReferenceFromTaskLabel("Fragmentar Tecido", aoTasks, "http://www.owl-ontologies.com/Ontology1258201595.owl#Fragmentar_Tecido_Metodo1"));
		steps.add(step3);

		
		//Criando passo 4 
		Step step4 = new Step();
		step4.setId("Step_4");
		step4.setDescription("Adicionar à mistura 5ml de solucao de digestao");
		
		List<Material> materialsStep4 = new ArrayList<Material>();
		
		printExperimentHeader(step4);
		
		
		materialsStep4.add(findMaterialObjectFromString("Cadinho", materials));
		
		Material solucaoDeDigestao = findMaterialObjectFromString("Solução de Digestão", materials);
		solucaoDeDigestao.getProperties().get(0).setValue("1");
		solucaoDeDigestao.getProperties().get(1).setValue("5");
		printFilledMaterialProperties(solucaoDeDigestao);
		materialsStep4.add(solucaoDeDigestao);
		
		step4.setMaterials(materialsStep4);
		
		step4.setApplicationOntologyReference(getApplicationOntologyReferenceFromTaskLabel("Adicionar Solucao de Digestao", aoTasks, "http://www.owl-ontologies.com/Ontology1258201595.owl#Adicionar_Solucao_de_Digestao_Metodo1"));
		steps.add(step4);
		
		
		//Criando passo 5 
		Step step5 = new Step();
		step5.setId("Step_5");
		step5.setDescription("Transferir o conteudo do cadinho para um tubo plastico");
		
		List<Material> materialsStep5 = new ArrayList<Material>();
		
		printExperimentHeader(step5);
		
		materialsStep5.add(findMaterialObjectFromString("Cadinho", materials));
		materialsStep5.add(findMaterialObjectFromString("Tubo de ensaio de plástico", materials));
		step5.setMaterials(materialsStep5);
		
		step5.setApplicationOntologyReference(getApplicationOntologyReferenceFromTaskLabel("Transferir conteudo do cadinho para tubo plastico", aoTasks, "http://www.owl-ontologies.com/Ontology1258201595.owl#Transferir_Conteudo_do_Cadinho_para_Tubo_Plastico_Metodo1"));
		steps.add(step5);

		
		//Criando passo 6 
		Step step6 = new Step();
		step6.setId("Step_6");
		step6.setDescription("Levar conteudo do material em banho maria");
		
		List<Material> materialsStep6 = new ArrayList<Material>();
		
		printExperimentHeader(step6);
		
		
		materialsStep6.add(findMaterialObjectFromString("Tubo de ensaio de plástico", materials));
		
		Material banhoMariaNacional = findMaterialObjectFromString("Banho Maria Nacional", materials);
		banhoMariaNacional.getProperties().get(0).setValue("42");
		banhoMariaNacional.getProperties().get(1).setValue("240");
		printFilledMaterialProperties(banhoMariaNacional);
		materialsStep6.add(solucaoDeDigestao);
		
		step6.setMaterials(materialsStep6);
		
		step6.setApplicationOntologyReference(getApplicationOntologyReferenceFromTaskLabel("Levar em Banho Maria", aoTasks, "http://www.owl-ontologies.com/Ontology1258201595.owl#Levar_em_Banho_Maria_Metodo1"));
		steps.add(step6);
		
		
		//Criando passo 7 
		Step step7 = new Step();
		step7.setId("Step_7");
		step7.setDescription("Adicionar fenol/cloroformio/Alcool Isoamilico");
		
		List<Material> materialsStep7 = new ArrayList<Material>();
		
		printExperimentHeader(step7);
		
		
		materialsStep7.add(findMaterialObjectFromString("Tubo de ensaio de plástico", materials));
		
		Material fenolCloroformioAlcoolIsoamilico = findMaterialObjectFromString("Fenol Clorofórmio Alcool Isoamílico", materials);
		fenolCloroformioAlcoolIsoamilico.getProperties().get(0).setValue("1");
		fenolCloroformioAlcoolIsoamilico.getProperties().get(1).setValue("100");
		printFilledMaterialProperties(fenolCloroformioAlcoolIsoamilico);
		materialsStep7.add(solucaoDeDigestao);
		
		step7.setMaterials(materialsStep7);
		
		step7.setApplicationOntologyReference(getApplicationOntologyReferenceFromTaskLabel("Adicionar Fenol Cloroformio Alcool isoamilico 50:48:2", aoTasks, "http://www.owl-ontologies.com/Ontology1258201595.owl#Adicionar_Fenol_Cloroformio_Alcool_isoamilico_50-48-2_Metodo1"));
		steps.add(step7);
		
		
		//Criando passo 8 
		Step step8 = new Step();
		step8.setId("Step_8");
		step8.setDescription("Agitar tubo em temperatura ambiente");
		
		List<Material> materialsStep8 = new ArrayList<Material>();
		
		printExperimentHeader(step8);
		
		
		materialsStep8.add(findMaterialObjectFromString("Tubo de ensaio de plástico", materials));
		
		Material agitadorShaker = findMaterialObjectFromString("Agitador Shaker", materials);
		agitadorShaker.getProperties().get(0).setValue("30");
		printFilledMaterialProperties(agitadorShaker);
		materialsStep8.add(solucaoDeDigestao);
		
		step8.setMaterials(materialsStep8);
		
		step8.setApplicationOntologyReference(getApplicationOntologyReferenceFromTaskLabel("Agitar Tubo", aoTasks, "http://www.owl-ontologies.com/Ontology1258201595.owl#Agitar_Tubo_Metodo1"));
		steps.add(step8);
		
		
		//Criando passo 9 
		Step step9 = new Step();
		step9.setId("Step_9");
		step9.setDescription("Levar o tubo à centrífuga");
		
		List<Material> materialsStep9 = new ArrayList<Material>();
		
		printExperimentHeader(step9);
		
		
		materialsStep9.add(findMaterialObjectFromString("Tubo de ensaio de plástico", materials));
		
		Material centrifuga = findMaterialObjectFromString("Centrífuga GE", materials);
		centrifuga.getProperties().get(0).setValue("10");
		centrifuga.getProperties().get(1).setValue("1000");
		printFilledMaterialProperties(centrifuga);
		materialsStep9.add(solucaoDeDigestao);
		
		step9.setMaterials(materialsStep9);
		
		step9.setApplicationOntologyReference(getApplicationOntologyReferenceFromTaskLabel("Centrifugar Tubo de ensaio", aoTasks, "http://www.owl-ontologies.com/Ontology1258201595.owl#Centrifugar_Tubo_de_ensaio_Metodo1"));
		steps.add(step9);
		
		
		//Criando passo 10 
		Step step10 = new Step();
		step10.setId("Step_10");
		step10.setDescription("Coletar a fase aquosa e transferi-la para outro tubo");
		
		List<Material> materialsStep10 = new ArrayList<Material>();
		
		printExperimentHeader(step10);
		
		materialsStep10.add(findMaterialObjectFromString("Tubo de ensaio de plástico", materials));
		materialsStep10.add(findMaterialObjectFromString("Tubo de ensaio de vidro", materials));
		step10.setMaterials(materialsStep10);
		
		step10.setApplicationOntologyReference(getApplicationOntologyReferenceFromTaskLabel("Coletar Fase Aquosa", aoTasks, "http://www.owl-ontologies.com/Ontology1258201595.owl#Coletar_Fase_Aquosa_Metodo1"));
		steps.add(step10);
		
		
		
		//Criando passo 11 
		Step step11 = new Step();
		step11.setId("Step_11");
		step11.setDescription("Acrescentar NaCl(Concentracao final de 1M) e mais 2 volumes de alcool absoluto gelado");
		
		List<Material> materialsStep11 = new ArrayList<Material>();
		
		printExperimentHeader(step11);
		
		
		materialsStep11.add(findMaterialObjectFromString("Tubo de ensaio de vidro", materials));
		
		Material alcoolAbsolutoGelado = findMaterialObjectFromString("Álcool Absoluto Gelado", materials);
		alcoolAbsolutoGelado.getProperties().get(0).setValue("1");
		alcoolAbsolutoGelado.getProperties().get(1).setValue("2");
		printFilledMaterialProperties(alcoolAbsolutoGelado);
		materialsStep11.add(alcoolAbsolutoGelado);
		
		Material nacl = findMaterialObjectFromString("Sal", materials);
		nacl.getProperties().get(0).setValue("1");
		printFilledMaterialProperties(nacl);
		materialsStep11.add(nacl);
		
		step11.setMaterials(materialsStep11);
		
		step11.setApplicationOntologyReference(getApplicationOntologyReferenceFromTaskLabel("Acrescentar NaCl e Alcool Absoluto Gelado", aoTasks, "http://www.owl-ontologies.com/Ontology1258201595.owl#Acrescentar_NaCL_AlcoolAbsolutoGelado_Metodo1"));
		steps.add(step11);
		
		
		//Criando passo 12 
		Step step12 = new Step();
		step12.setId("Step_12");
		step12.setDescription("Agitar Tubo");
		
		List<Material> materialsStep12 = new ArrayList<Material>();
		
		printExperimentHeader(step12);
		
		
		materialsStep12.add(findMaterialObjectFromString("Tubo de ensaio de vidro", materials));
		
		findMaterialObjectFromString("Agitador Shaker", materials);
		agitadorShaker.getProperties().get(0).setValue("10");
		printFilledMaterialProperties(agitadorShaker);
		materialsStep12.add(agitadorShaker);
		
		step12.setMaterials(materialsStep12);
		
		step12.setApplicationOntologyReference(getApplicationOntologyReferenceFromTaskLabel("Agitar Tubo", aoTasks, "http://www.owl-ontologies.com/Ontology1258201595.owl#Agitar_Tubo_Metodo2"));
		steps.add(step12);
		
		
		//Criando passo 13 
		Step step13 = new Step();
		step13.setId("Step_13");
		step13.setDescription("Centrifugar Tubo");
		
		List<Material> materialsStep13 = new ArrayList<Material>();
		
		printExperimentHeader(step13);
		
		
		materialsStep13.add(findMaterialObjectFromString("Tubo de ensaio de vidro", materials));
		
		findMaterialObjectFromString("Centrífuga GE", materials);
		centrifuga.getProperties().get(0).setValue("5");
		centrifuga.getProperties().get(1).setValue("10000");
		printFilledMaterialProperties(centrifuga);
		materialsStep13.add(centrifuga);
		
		step13.setMaterials(materialsStep13);
		
		step13.setApplicationOntologyReference(getApplicationOntologyReferenceFromTaskLabel("Centrifugar Tubo de ensaio", aoTasks, "http://www.owl-ontologies.com/Ontology1258201595.owl#Centrifugar_Tubo_de_ensaio_Metodo2"));
		steps.add(step13);
		
		
		//Criando passo 14 
		Step step14 = new Step();
		step14.setId("Step_14");
		step14.setDescription("Descartar Sobrenadante");
		
		List<Material> materialsStep14 = new ArrayList<Material>();
		
		printExperimentHeader(step14);
		
		
		materialsStep14.add(findMaterialObjectFromString("Tubo de ensaio de vidro", materials));
		
		step14.setMaterials(materialsStep14);
		
		step14.setApplicationOntologyReference(getApplicationOntologyReferenceFromTaskLabel("Descartar Sobrenadante", aoTasks, "http://www.owl-ontologies.com/Ontology1258201595.owl#Descartar_Sobrenadante_Metodo2"));
		steps.add(step14);
		
		
		
		//Criando passo 15 
		Step step15 = new Step();
		step15.setId("Step_15");
		step15.setDescription("Acrescentar Álcool Etílico");
		
		List<Material> materialsStep15 = new ArrayList<Material>();
		
		printExperimentHeader(step15);
		
		
		materialsStep15.add(findMaterialObjectFromString("Tubo de ensaio de vidro", materials));
		
		Material alcoolEtilico = findMaterialObjectFromString("Álcool Etílico", materials);
		alcoolEtilico.getProperties().get(0).setValue("70");
		alcoolEtilico.getProperties().get(1).setValue("3");
		printFilledMaterialProperties(alcoolEtilico);
		materialsStep15.add(alcoolEtilico);
		
		step15.setMaterials(materialsStep15);
		
		step15.setApplicationOntologyReference(getApplicationOntologyReferenceFromTaskLabel("Acrescentar Alcool Etilico", aoTasks, "http://www.owl-ontologies.com/Ontology1258201595.owl#Acrescentar_Alcool_Etilico_Metodo2"));
		steps.add(step15);
		
		
		
		//Criando passo 16 
		Step step16 = new Step();
		step16.setId("Step_16");
		step16.setDescription("Descartar volume de alcool, vertendo o tubo sobre papel absorvente");
		
		List<Material> materialsStep16 = new ArrayList<Material>();
		
		printExperimentHeader(step16);
		
		
		materialsStep16.add(findMaterialObjectFromString("Tubo de ensaio de vidro", materials));
		materialsStep16.add(findMaterialObjectFromString("Papel Absorvente Folhas Duplas", materials));
		
		step16.setMaterials(materialsStep16);
		
		step16.setApplicationOntologyReference(getApplicationOntologyReferenceFromTaskLabel("Descartar Volume de Alcool", aoTasks, "http://www.owl-ontologies.com/Ontology1258201595.owl#Descartar_Volume_de_Alcool_Metodo4"));
		steps.add(step16);

		
		
		//Criando passo 17 
		Step step17 = new Step();
		step17.setId("Step_17");
		step17.setDescription("Aquecer tubo em estufa");
		
		List<Material> materialsStep17 = new ArrayList<Material>();
		
		printExperimentHeader(step17);
		
		
		materialsStep17.add(findMaterialObjectFromString("Tubo de ensaio de vidro", materials));
		
		Material estufaAnalogica = findMaterialObjectFromString("Estufa Analógica", materials);
		estufaAnalogica.getProperties().get(0).setValue("50");
		estufaAnalogica.getProperties().get(1).setValue("37");
		printFilledMaterialProperties(estufaAnalogica);
		materialsStep17.add(estufaAnalogica);
		
		step17.setMaterials(materialsStep17);
		
		step17.setApplicationOntologyReference(getApplicationOntologyReferenceFromTaskLabel("Aquecer tubo de ensaio", aoTasks, "http://www.owl-ontologies.com/Ontology1258201595.owl#Aquecer_Tubo_de_Ensaio_Metodo3"));
		steps.add(step17);
		
		
		//Criando passo 18 
		Step step18 = new Step();
		step18.setId("Step_18");
		step18.setDescription("Eluir o DNA em 2ml de TE");
		
		List<Material> materialsStep18 = new ArrayList<Material>();
		
		printExperimentHeader(step18);
		
		
		materialsStep18.add(findMaterialObjectFromString("Tubo de ensaio de vidro", materials));
		
		Material te = findMaterialObjectFromString("TE", materials);
		te.getProperties().get(0).setValue("1");
		te.getProperties().get(1).setValue("2");
		printFilledMaterialProperties(te);
		materialsStep18.add(te);
		
		step18.setMaterials(materialsStep18);
		
		step18.setApplicationOntologyReference(getApplicationOntologyReferenceFromTaskLabel("Eluir DNA", aoTasks, "http://www.owl-ontologies.com/Ontology1258201595.owl#Eluir_DNA_Metodo2"));
		steps.add(step18);
		
		//Criando passo 19 
		Step step19 = new Step();
		step19.setId("Step_19");
		step19.setDescription("Tratar amostra com RNase (100ug/ml)");
		
		List<Material> materialsStep19 = new ArrayList<Material>();
		
		printExperimentHeader(step19);
		
		
		materialsStep19.add(findMaterialObjectFromString("Tubo de ensaio de vidro", materials));
		
		Material rnase = findMaterialObjectFromString("RNase", materials);
		rnase.getProperties().get(0).setValue("1");
		rnase.getProperties().get(1).setValue("100");
		printFilledMaterialProperties(rnase);
		materialsStep19.add(rnase);
		
		findMaterialObjectFromString("Banho Maria Nacional", materials);
		banhoMariaNacional.getProperties().get(0).setValue("1");
		banhoMariaNacional.getProperties().get(1).setValue("37");
		printFilledMaterialProperties(banhoMariaNacional);
		materialsStep19.add(banhoMariaNacional);
		
		step19.setMaterials(materialsStep19);
		
		step19.setApplicationOntologyReference(getApplicationOntologyReferenceFromTaskLabel("Tratar Amostra com RNase", aoTasks, "http://www.owl-ontologies.com/Ontology1258201595.owl#Tratar_Amostra_com_RNase_Metodo2"));
		steps.add(step19);
		
		
		//Criando passo 20 
		Step step20 = new Step();
		step20.setId("Step_20");
		step20.setDescription("Reestrair DNA com fenol/cloroformio/Alcool Isoamilico");
		
		List<Material> materialsStep20 = new ArrayList<Material>();
		
		printExperimentHeader(step20);
		
		
		materialsStep20.add(findMaterialObjectFromString("Tubo de ensaio de vidro", materials));
		
		findMaterialObjectFromString("Fenol Clorofórmio Alcool Isoamílico", materials);
		fenolCloroformioAlcoolIsoamilico.getProperties().get(0).setValue("1");
		fenolCloroformioAlcoolIsoamilico.getProperties().get(1).setValue("100");
		printFilledMaterialProperties(fenolCloroformioAlcoolIsoamilico);
		materialsStep20.add(fenolCloroformioAlcoolIsoamilico);
		
		step20.setMaterials(materialsStep20);
		
		step20.setApplicationOntologyReference(getApplicationOntologyReferenceFromTaskLabel("Reestrair DNA", aoTasks, "http://www.owl-ontologies.com/Ontology1258201595.owl#Reestrair_DNA_Metodo2"));
		steps.add(step20);
		
		
		//Criando passo 21 
		Step step21 = new Step();
		step21.setId("Step_21");
		step21.setDescription("Acrescentar NaCl(Concentracao final de 1M) e mais 2 volumes de alcool absoluto gelado");
		
		List<Material> materialsStep21 = new ArrayList<Material>();
		
		printExperimentHeader(step21);
		
		
		materialsStep21.add(findMaterialObjectFromString("Tubo de ensaio de vidro", materials));
		
		findMaterialObjectFromString("Sal", materials);
		nacl.getProperties().get(0).setValue("1");
		printFilledMaterialProperties(nacl);
		materialsStep21.add(nacl);
		
		findMaterialObjectFromString("Álcool Absoluto Gelado", materials);
		alcoolAbsolutoGelado.getProperties().get(0).setValue("1");
		alcoolAbsolutoGelado.getProperties().get(1).setValue("2");
		printFilledMaterialProperties(alcoolAbsolutoGelado);
		materialsStep21.add(alcoolAbsolutoGelado);
		
		step21.setMaterials(materialsStep21);
		
		step21.setApplicationOntologyReference(getApplicationOntologyReferenceFromTaskLabel("Acrescentar NaCl e Alcool Absoluto Gelado", aoTasks, "http://www.owl-ontologies.com/Ontology1258201595.owl#Acrescentar_NaCL_AlcoolAbsolutoGelado_Metodo1"));
		steps.add(step21);
		
		
		//Criando passo 22 
		Step step22 = new Step();
		step22.setId("Step_22");
		step22.setDescription("Secar, eluir em TE e armazenar a -20 graus celsius");
		
		List<Material> materialsStep22 = new ArrayList<Material>();
		
		printExperimentHeader(step22);
		
		
		materialsStep22.add(findMaterialObjectFromString("Tubo de ensaio de vidro", materials));
		
		findMaterialObjectFromString("TE", materials);
		te.getProperties().get(0).setValue("1");
		te.getProperties().get(1).setValue("2");
		printFilledMaterialProperties(te);
		materialsStep22.add(te);
		
		Material freezerGE = findMaterialObjectFromString("Freezer GE", materials);
		freezerGE.getProperties().get(0).setValue("45");
		freezerGE.getProperties().get(1).setValue("-20");
		printFilledMaterialProperties(freezerGE);
		materialsStep22.add(freezerGE);
		
		step22.setMaterials(materialsStep22);
		
		step22.setApplicationOntologyReference(getApplicationOntologyReferenceFromTaskLabel("Secar, eluir e armazenar", aoTasks, "http://www.owl-ontologies.com/Ontology1258201595.owl#Secar_Eluir_e_Armazenar_Metodo2"));
		steps.add(step22);
		
		
		//////////////////////////////////		
		experiment.setStepList(steps);
		return experiment;
	}

	public static Experiment creatingExecutionExperimentExample() {
		List<Material> materials = wpf.doGetAllMaterials();
		Experiment experiment = new Experiment();
		List<Step> steps = new ArrayList<Step>();
		
		//Simulating a teacher creating an experiment
		experiment.setExperimentId(new Long(1));
		experiment.setName("Extracao de DNA");
		experiment.setDescription("Este experimento destina-se à realização de extração de DNA");
		
		System.out.println();
		System.out.println("Processo descritivo do projetista criando o experimento \"Extração de DNA\". Utilizando os métodos fornecidos pelo WPF");
		System.out.println();
		
		
		//Criando passo 1 
		Step step1 = new Step();
		step1.setId("Step_1");
		step1.setDescription("Colocar tecido no cadinho");
		
		List<Material> materialsStep1 = new ArrayList<Material>();
		
		printExperimentHeader(step1);
		
		materialsStep1.add(findMaterialObjectFromString("Cadinho", materials));
		materialsStep1.add(findMaterialObjectFromString("Tecido", materials));
		step1.setMaterials(materialsStep1);
		
		List<Task> aoTasks = wpf.aoGetAllTasks();
		
		steps.add(step1);
		

		
		//Criando passo 2 
		Step step2 = new Step();
		step2.setId("Step_2");
		step2.setDescription("Adicionar nitrogenio liquido ao cadinho");
		
		List<Material> materialsStep2 = new ArrayList<Material>();
		
		printExperimentHeader(step2);
		
		
		materialsStep2.add(findMaterialObjectFromString("Cadinho", materials));
		
		Material liquidNitrogen = findMaterialObjectFromString("Nitrogênio Líquido", materials);
		liquidNitrogen.getProperties().get(0).setValue("1");
		liquidNitrogen.getProperties().get(1).setValue("97");
		printFilledMaterialProperties(liquidNitrogen);
		materialsStep2.add(liquidNitrogen);
		
		step2.setMaterials(materialsStep2);
		
		steps.add(step2);
		
		
		//Criando passo 3 
		Step step3 = new Step();
		step3.setId("Step_3");
		step3.setDescription("Fragmentar conteudo do cadinho utilizando bastao de louça");
		
		List<Material> materialsStep3 = new ArrayList<Material>();
		
		printExperimentHeader(step3);
		
		materialsStep3.add(findMaterialObjectFromString("Cadinho", materials));
		materialsStep3.add(findMaterialObjectFromString("Bastão de Alumínio", materials));
		step3.setMaterials(materialsStep3);
		
		steps.add(step3);

		
		//Criando passo 4 
		Step step4 = new Step();
		step4.setId("Step_4");
		step4.setDescription("Adicionar à mistura 5ml de solucao de digestao");
		
		List<Material> materialsStep4 = new ArrayList<Material>();
		
		printExperimentHeader(step4);
		
		
		materialsStep4.add(findMaterialObjectFromString("Cadinho", materials));
		
		Material solucaoDeDigestao = findMaterialObjectFromString("Solução de Digestão", materials);
		solucaoDeDigestao.getProperties().get(0).setValue("1");
		solucaoDeDigestao.getProperties().get(1).setValue("5");
		printFilledMaterialProperties(solucaoDeDigestao);
		materialsStep4.add(solucaoDeDigestao);
		
		step4.setMaterials(materialsStep4);
		
		steps.add(step4);
		
		
		//Criando passo 5 
		Step step5 = new Step();
		step5.setId("Step_5");
		step5.setDescription("Transferir o conteudo do cadinho para um tubo plastico");
		
		List<Material> materialsStep5 = new ArrayList<Material>();
		
		printExperimentHeader(step5);
		
		materialsStep5.add(findMaterialObjectFromString("Cadinho", materials));
		materialsStep5.add(findMaterialObjectFromString("Tubo de ensaio de plástico", materials));
		step5.setMaterials(materialsStep5);
		
		steps.add(step5);

		
		//Criando passo 6 
		Step step6 = new Step();
		step6.setId("Step_6");
		step6.setDescription("Levar conteudo do material em banho maria");
		
		List<Material> materialsStep6 = new ArrayList<Material>();
		
		printExperimentHeader(step6);
		
		
		materialsStep6.add(findMaterialObjectFromString("Tubo de ensaio de plástico", materials));
		
		Material banhoMariaNacional = findMaterialObjectFromString("Banho Maria Nacional", materials);
		banhoMariaNacional.getProperties().get(0).setValue("42");
		banhoMariaNacional.getProperties().get(1).setValue("240");
		printFilledMaterialProperties(banhoMariaNacional);
		materialsStep6.add(solucaoDeDigestao);
		
		step6.setMaterials(materialsStep6);
		
		steps.add(step6);
		
		
		//Criando passo 7 
		Step step7 = new Step();
		step7.setId("Step_7");
		step7.setDescription("Adicionar fenol/cloroformio/Alcool Isoamilico");
		
		List<Material> materialsStep7 = new ArrayList<Material>();
		
		printExperimentHeader(step7);
		
		
		materialsStep7.add(findMaterialObjectFromString("Tubo de ensaio de plástico", materials));
		
		Material fenolCloroformioAlcoolIsoamilico = findMaterialObjectFromString("Fenol Clorofórmio Alcool Isoamílico", materials);
		fenolCloroformioAlcoolIsoamilico.getProperties().get(0).setValue("1");
		fenolCloroformioAlcoolIsoamilico.getProperties().get(1).setValue("100");
		printFilledMaterialProperties(fenolCloroformioAlcoolIsoamilico);
		materialsStep7.add(solucaoDeDigestao);
		
		step7.setMaterials(materialsStep7);
		
		steps.add(step7);
		
		
		//Criando passo 8 
		Step step8 = new Step();
		step8.setId("Step_8");
		step8.setDescription("Agitar tubo em temperatura ambiente");
		
		List<Material> materialsStep8 = new ArrayList<Material>();
		
		printExperimentHeader(step8);
		
		
		materialsStep8.add(findMaterialObjectFromString("Tubo de ensaio de plástico", materials));
		
		Material agitadorShaker = findMaterialObjectFromString("Agitador Shaker", materials);
		agitadorShaker.getProperties().get(0).setValue("30");
		printFilledMaterialProperties(agitadorShaker);
		materialsStep8.add(solucaoDeDigestao);
		
		step8.setMaterials(materialsStep8);
		
		steps.add(step8);
		
		
		//Criando passo 9 
		Step step9 = new Step();
		step9.setId("Step_9");
		step9.setDescription("Levar o tubo à centrífuga");
		
		List<Material> materialsStep9 = new ArrayList<Material>();
		
		printExperimentHeader(step9);
		
		
		materialsStep9.add(findMaterialObjectFromString("Tubo de ensaio de plástico", materials));
		
		Material centrifuga = findMaterialObjectFromString("Centrífuga GE", materials);
		centrifuga.getProperties().get(0).setValue("10");
		centrifuga.getProperties().get(1).setValue("1000");
		printFilledMaterialProperties(centrifuga);
		materialsStep9.add(solucaoDeDigestao);
		
		step9.setMaterials(materialsStep9);
		
		steps.add(step9);
		
		
		//Criando passo 10 
		Step step10 = new Step();
		step10.setId("Step_10");
		step10.setDescription("Coletar a fase aquose e transferi-la para outro tubo");
		
		List<Material> materialsStep10 = new ArrayList<Material>();
		
		printExperimentHeader(step10);
		
		materialsStep10.add(findMaterialObjectFromString("Tubo de ensaio de plástico", materials));
		materialsStep10.add(findMaterialObjectFromString("Tubo de ensaio de vidro", materials));
		step10.setMaterials(materialsStep10);
		
		steps.add(step10);
		
		
		
		//Criando passo 11 
		Step step11 = new Step();
		step11.setId("Step_11");
		step11.setDescription("Acrescentar NaCl(Concentracao final de 1M) e mais 2 volumes de alcool absoluto gelado");
		
		List<Material> materialsStep11 = new ArrayList<Material>();
		
		printExperimentHeader(step11);
		
		
		materialsStep11.add(findMaterialObjectFromString("Tubo de ensaio de vidro", materials));
		
		Material alcoolAbsolutoGelado = findMaterialObjectFromString("Álcool Absoluto Gelado", materials);
		alcoolAbsolutoGelado.getProperties().get(0).setValue("1");
		alcoolAbsolutoGelado.getProperties().get(1).setValue("2");
		printFilledMaterialProperties(alcoolAbsolutoGelado);
		materialsStep11.add(alcoolAbsolutoGelado);
		
		Material nacl = findMaterialObjectFromString("Sal", materials);
		nacl.getProperties().get(0).setValue("1");
		printFilledMaterialProperties(nacl);
		materialsStep11.add(nacl);
		
		findMaterialObjectFromString("Agitador Shaker", materials);
		agitadorShaker.getProperties().get(0).setValue("10");
		printFilledMaterialProperties(agitadorShaker);
		materialsStep11.add(agitadorShaker);
		
		materialsStep11.add(findMaterialObjectFromString("Beaker", materials));
		
		step11.setMaterials(materialsStep11);
		
		steps.add(step11);
		
		
		//Criando passo 12 
		Step step12 = new Step();
		step12.setId("Step_12");
		step12.setDescription("Agitar Tubo");
		
		List<Material> materialsStep12 = new ArrayList<Material>();
		
		printExperimentHeader(step12);
		
		
		materialsStep12.add(findMaterialObjectFromString("Tubo de ensaio de vidro", materials));
		
		findMaterialObjectFromString("Agitador Shaker", materials);
		agitadorShaker.getProperties().get(0).setValue("10");
		printFilledMaterialProperties(agitadorShaker);
		materialsStep12.add(agitadorShaker);
		
		step12.setMaterials(materialsStep12);
		
		steps.add(step12);
		
		
		//Criando passo 13 
		Step step13 = new Step();
		step13.setId("Step_13");
		step13.setDescription("Centrifugar Tubo");
		
		List<Material> materialsStep13 = new ArrayList<Material>();
		
		printExperimentHeader(step13);
		
		
		materialsStep13.add(findMaterialObjectFromString("Tubo de ensaio de vidro", materials));
		
		findMaterialObjectFromString("Centrífuga GE", materials);
		centrifuga.getProperties().get(0).setValue("5");
		centrifuga.getProperties().get(1).setValue("10000");
		printFilledMaterialProperties(centrifuga);
		materialsStep13.add(centrifuga);
		
		step13.setMaterials(materialsStep13);
		
		steps.add(step13);
		
		
		//Criando passo 14 
		Step step14 = new Step();
		step14.setId("Step_14");
		step14.setDescription("Descartar Sobrenadante");
		
		List<Material> materialsStep14 = new ArrayList<Material>();
		
		printExperimentHeader(step14);
		
		
		materialsStep14.add(findMaterialObjectFromString("Tubo de ensaio de vidro", materials));
		
		step14.setMaterials(materialsStep14);
		
		steps.add(step14);
		
		
		
		//Criando passo 15 
		Step step15 = new Step();
		step15.setId("Step_15");
		step15.setDescription("Acrescentar Álcool Etílico");
		
		List<Material> materialsStep15 = new ArrayList<Material>();
		
		printExperimentHeader(step15);
		
		
		materialsStep15.add(findMaterialObjectFromString("Tubo de ensaio de vidro", materials));
		
		Material alcoolEtilico = findMaterialObjectFromString("Álcool Etílico", materials);
		alcoolEtilico.getProperties().get(0).setValue("70");
		alcoolEtilico.getProperties().get(1).setValue("3");
		printFilledMaterialProperties(alcoolEtilico);
		materialsStep15.add(alcoolEtilico);
		
		step15.setMaterials(materialsStep15);
		
		steps.add(step15);
		
		
		
		//Criando passo 16 
		Step step16 = new Step();
		step16.setId("Step_16");
		step16.setDescription("Descartar volume de alcool, vertendo o tubo sobre papel absorvente");
		
		List<Material> materialsStep16 = new ArrayList<Material>();
		
		printExperimentHeader(step16);
		
		
		materialsStep16.add(findMaterialObjectFromString("Tubo de ensaio de vidro", materials));
		materialsStep16.add(findMaterialObjectFromString("Papel Absorvente Folhas Duplas", materials));
		
		step16.setMaterials(materialsStep16);
		
		steps.add(step16);

		
		
		//Criando passo 17 
		Step step17 = new Step();
		step17.setId("Step_17");
		step17.setDescription("Aquecer tubo em estufa");
		
		List<Material> materialsStep17 = new ArrayList<Material>();
		
		printExperimentHeader(step17);
		
		
		materialsStep17.add(findMaterialObjectFromString("Tubo de ensaio de vidro", materials));
		
		Material estufaAnalogica = findMaterialObjectFromString("Estufa Analógica", materials);
		estufaAnalogica.getProperties().get(0).setValue("50");
		estufaAnalogica.getProperties().get(1).setValue("37");
		printFilledMaterialProperties(estufaAnalogica);
		materialsStep17.add(estufaAnalogica);
		
		step17.setMaterials(materialsStep17);
		
		steps.add(step17);
		
		
		//Criando passo 18 
		Step step18 = new Step();
		step18.setId("Step_18");
		step18.setDescription("Eluir o DNA em 2ml de TE");
		
		List<Material> materialsStep18 = new ArrayList<Material>();
		
		printExperimentHeader(step18);
		
		
		materialsStep18.add(findMaterialObjectFromString("Tubo de ensaio de vidro", materials));
		
		Material te = findMaterialObjectFromString("TE", materials);
		te.getProperties().get(0).setValue("1");
		te.getProperties().get(1).setValue("2");
		printFilledMaterialProperties(te);
		materialsStep18.add(te);
		
		step18.setMaterials(materialsStep18);
		
		steps.add(step18);
		
		//Criando passo 19 
		Step step19 = new Step();
		step19.setId("Step_19");
		step19.setDescription("Tratar amostra com RNase (100ug/ml)");
		
		List<Material> materialsStep19 = new ArrayList<Material>();
		
		printExperimentHeader(step19);
		
		
		materialsStep19.add(findMaterialObjectFromString("Tubo de ensaio de vidro", materials));
		
		Material rnase = findMaterialObjectFromString("RNase", materials);
		rnase.getProperties().get(0).setValue("1");
		rnase.getProperties().get(1).setValue("100");
		printFilledMaterialProperties(rnase);
		materialsStep19.add(rnase);
		
		findMaterialObjectFromString("Banho Maria Nacional", materials);
		banhoMariaNacional.getProperties().get(0).setValue("1");
		banhoMariaNacional.getProperties().get(1).setValue("37");
		printFilledMaterialProperties(banhoMariaNacional);
		materialsStep19.add(banhoMariaNacional);
		
		step19.setMaterials(materialsStep19);
		
		steps.add(step19);
		
		
		//Criando passo 20 
		Step step20 = new Step();
		step20.setId("Step_20");
		step20.setDescription("Reestrair DNA com fenol/cloroformio/Alcool Isoamilico");
		
		List<Material> materialsStep20 = new ArrayList<Material>();
		
		printExperimentHeader(step20);
		
		
		materialsStep20.add(findMaterialObjectFromString("Tubo de ensaio de vidro", materials));
		
		findMaterialObjectFromString("Fenol Clorofórmio Alcool Isoamílico", materials);
		fenolCloroformioAlcoolIsoamilico.getProperties().get(0).setValue("1");
		fenolCloroformioAlcoolIsoamilico.getProperties().get(1).setValue("100");
		printFilledMaterialProperties(fenolCloroformioAlcoolIsoamilico);
		materialsStep20.add(fenolCloroformioAlcoolIsoamilico);
		
		step20.setMaterials(materialsStep20);
		
		steps.add(step20);
		
		
		//Criando passo 21 
		Step step21 = new Step();
		step21.setId("Step_21");
		step21.setDescription("Acrescentar NaCl(Concentracao final de 1M) e mais 2 volumes de alcool absoluto gelado");
		
		List<Material> materialsStep21 = new ArrayList<Material>();
		
		printExperimentHeader(step21);
		
		
		materialsStep21.add(findMaterialObjectFromString("Tubo de ensaio de vidro", materials));
		
		findMaterialObjectFromString("Sal", materials);
		nacl.getProperties().get(0).setValue("1");
		printFilledMaterialProperties(nacl);
		materialsStep21.add(nacl);
		
		findMaterialObjectFromString("Álcool Absoluto Gelado", materials);
		alcoolAbsolutoGelado.getProperties().get(0).setValue("1");
		alcoolAbsolutoGelado.getProperties().get(1).setValue("2");
		printFilledMaterialProperties(alcoolAbsolutoGelado);
		materialsStep21.add(alcoolAbsolutoGelado);
		
		step21.setMaterials(materialsStep21);
		
		steps.add(step21);
		
		
		//Criando passo 22 
		Step step22 = new Step();
		step22.setId("Step_22");
		step22.setDescription("Secar, eluir em TE e armazenar a -20 graus celsius");
		
		List<Material> materialsStep22 = new ArrayList<Material>();
		
		printExperimentHeader(step22);
		
		
		materialsStep22.add(findMaterialObjectFromString("Tubo de ensaio de vidro", materials));
		
		findMaterialObjectFromString("TE", materials);
		te.getProperties().get(0).setValue("1");
		te.getProperties().get(1).setValue("2");
		printFilledMaterialProperties(te);
		materialsStep22.add(te);
		
		Material freezerGE = findMaterialObjectFromString("Freezer GE", materials);
		freezerGE.getProperties().get(0).setValue("45");
		freezerGE.getProperties().get(1).setValue("-20");
		printFilledMaterialProperties(freezerGE);
		materialsStep22.add(freezerGE);
		
		step22.setMaterials(materialsStep22);
		
		steps.add(step22);
		
		
		//////////////////////////////////		
		experiment.setStepList(steps);
		return experiment;
		
	}
	
	
	
	public static void printFilledMaterialProperties(Material material) {

		System.out.println("Valor das propriedades preenchidas pelo projetista para o aparato " + material.getName() + ":");
		for (int i=0; i < material.getProperties().size(); i++) {
			System.out.println("     " + material.getProperties().get(i).getName() + " = " + material.getProperties().get(i).getValue());	
		}
		
		System.out.println();
		
	}
	
	public static void printExperimentHeader(Step step) {
		System.out.println();
		System.out.println();
		System.out.println(step.getId());
		System.out.println("=======");
		System.out.println("Descrição: " + step.getDescription());
		System.out.println();
	}
	
	public static String getApplicationOntologyReferenceFromTaskLabel(String taskApplicationOntogyReference, List<Task> aoTasks, String applicationOntologyReference) {
		
		for (int i=0; i < aoTasks.size(); i++) {
			if (aoTasks.get(i).getDescription() != null && aoTasks.get(i).getDescription().equals(taskApplicationOntogyReference) && 
					aoTasks.get(i).getApplicationOntologyReference().equals(applicationOntologyReference)) {
				System.out.println("Referência da tarefa na ontologia de aplicação: " + aoTasks.get(i).getApplicationOntologyReference());
				System.out.println();
				System.out.println();
				return aoTasks.get(i).getApplicationOntologyReference();
			}
		}
		
		return null;
	}
	
	public static Material findMaterialObjectFromString(String materialString, List<Material> materials) {
		
		for (int i=0; i < materials.size(); i++) {
			if (materials.get(i).getName().equals(materialString)) {
				printSelectedMaterialAndHintsSimilarTo(materials.get(i));
				//printIndividualInstancedPropertyList(materials.get(i));
				printAllInstancePropertyToBeFilledOut(materials.get(i));
				return materials.get(i);
			}
		}
		
		return null;
	}
	
	public static void printSelectedMaterialAndHintsSimilarTo(Material material) {
		System.out.print("Material escolhido pelo Projetista: ");
		System.out.println(material.getName());
		
		//MethodsBean methodsBean = new MethodsBean("c:\\docume~1\\admini~1\\meusdo~1\\mydrop~1\\Ontology\\DomainOntology.owl", "http://www.owl-ontologies.com/Ontology1251833905.owl");
		List<Material> similarMaterials = wpf.doGetInstancesSimilarTo(material);
		
		if (similarMaterials == null) {
			System.out.println("Aparatos similares sugeridos (Através de inferência na ontologia de domínio):");
			System.out.println("     NENHUM");
			return;
		}
			
		
		if (similarMaterials.size() != 0)
			System.out.println("Aparatos similares sugeridos:");
		
		for (int i=0; i<similarMaterials.size(); i++) {
			System.out.println("     " + similarMaterials.get(i).getOntologyReference());
		}
	}
	
	public static void printIndividualInstancedPropertyList(Material material) {
		//MethodsBean methodsBean = new MethodsBean("c:\\docume~1\\admini~1\\meusdo~1\\mydrop~1\\Ontology\\DomainOntology.owl", "http://www.owl-ontologies.com/Ontology1251833905.owl");
		
		List<Property> individualInstancedAttributesList = wpf.doGetMaterial(material.getOntologyReference()).getProperties(); 
			//methodsBean.listIndividualInstancedAttributes(material.getOntologyReference());
		
		if (individualInstancedAttributesList != null && individualInstancedAttributesList.size()> 0) {
			System.out.println("Propriedades configuráveis do(a) " + material.getName());
			for (int i=0; i < individualInstancedAttributesList.size(); i++) {
				System.out.println("     " + individualInstancedAttributesList.get(i).getName());
				//System.out.println(" = " + individualInstancedAttributesList.get(i).getValue());
			}
		}
	}

	public static void printAllInstancePropertyToBeFilledOut(Material material) {
		//MethodsBean methodsBean = new MethodsBean("c:\\docume~1\\admini~1\\meusdo~1\\mydrop~1\\Ontology\\DomainOntology.owl", "http://www.owl-ontologies.com/Ontology1251833905.owl");
		/*
		List<Property> properties = methodsBean.listAllDataTypePropertiesFromAnInstance(material.getOntologyReference());
		
		if (properties != null && properties.size() != 0) {
			System.out.println("Propriedades do(a) " + material.getName());
			for (int i=0; i < properties.size(); i++) {
				System.out.println("     " + properties.get(i).getPropertyOntologyReference());
			
				if (properties.get(i).getAllowedValuesInRange() != null)
					for (int j=0; j < properties.get(i).getAllowedValuesInRange().size(); j++) {
						System.out.println("          " + properties.get(i).getAllowedValuesInRange().get(j));
					}
				
			}
		}*/
	}

	
}
