/* * GDPC: The Genomic Diversity and Phenotype Connection * for more information: http://www.maizegenetics.net/gdpc/index.html * * Copyright (C) 2003 Terry Casstevens * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ /* * TestGDPC.java * * Created on October 11, 2003 */ package gov.usda.gdpc.test; import gov.usda.gdpc.*; import gov.usda.gdpc.axis.DBConnectionProxy; import java.util.List; /** * This class demonstrates the use of The Genomic * Diversity and Phenotype Connection (GDPC) API. * * @author terryc */ public class TestGDPC { /** The GDPC gateway */ private final DBGateway myDBGateway = DefaultDBGateway.getInstance(); /** Creates a new instance of TestGDPC */ public TestGDPC() { } /** main */ public static void main(String[] args) { // create test object TestGDPC test = new TestGDPC(); // make data source connections to gateway test.makeConnections(); // test gateway methods test.testGetGenotypeExperimentGroup(); test.testGetEnvironmentExperimentGroup(); test.testGetLocusGroup(); test.testGetPhenotypeOntologyGroup(); test.testGetPhenotypetable(); test.testGetGenotypetable(); // Get and print out list of taxa received TaxonGroup group = test.testGetTaxonGroup(); for (int i=0, n=group.size(); i