/*
 Copyright (C) 2003 EBI, GRL
 
 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.
 
 You should have received a copy of the GNU Lesser General Public
 License along with this library; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
package org.ensembl.healthcheck.testcase.generic;

import java.sql.Connection;

import org.ensembl.healthcheck.DatabaseRegistryEntry;
import org.ensembl.healthcheck.testcase.SingleDatabaseTestCase;

/**
 * Check that certain tables have display_labels set.
 */

public class DisplayLabels extends SingleDatabaseTestCase {

    /**
     * Create a new DisplayLabels testcase.
     */
    public DisplayLabels() {

        addToGroup("post_genebuild");
        addToGroup("release");
        setDescription("Check that certain tables have display_labels set");

    }

    /**
     * Run the test.
     * 
     * @param dbre
     *          The database to use.
     * @return true if the test passed.
     *  
     */
    public boolean run(DatabaseRegistryEntry dbre) {

        boolean result = true;
	
	Connection con = dbre.getConnection();

	result &= checkNoNulls(con, "prediction_transcript", "display_label");
	result &= checkNoNulls(con, "simple_feature",        "display_label");
	result &= checkNoNulls(con, "xref",                  "display_label");

	return result;

    } // run

    // ----------------------------------------------------------------------

} // DisplayLabels

@@ -1066,28 +1066,22 @@
 Case %7B%0A%0A
-    /**%0A    
+%09/**%0A%09
  * Creat
@@ -1112,28 +1112,22 @@
 stcase.%0A
-     */%0A    
+%09 */%0A%09
 public D
@@ -1144,24 +1144,18 @@
 ls() %7B%0A%0A
-        
+%09%09
 addToGro
@@ -1176,24 +1176,18 @@
 uild%22);%0A
-        
+%09%09
 addToGro
@@ -1201,24 +1201,46 @@
 ease%22);%0A
-        
+%09%09addToGroup(%22core_xrefs%22);%0A%09%09
 setDescr
@@ -1305,27 +1305,18 @@
 );%0A%0A
-    %7D%0A%0A    /**%0A    
+%09%7D%0A%0A%09/**%0A%09
  * R
@@ -1332,20 +1332,14 @@
 st.%0A
-     * %0A    
+%09 * %0A%09
  * @
@@ -1349,20 +1349,17 @@
 am dbre%0A
-    
+%09
  *      
@@ -1383,20 +1383,17 @@
 to use.%0A
-    
+%09
  * @retu
@@ -1424,29 +1424,19 @@
 ed.%0A
-     *  %0A     */%0A    
+%09 * %0A%09 */%0A%09
 publ
@@ -1481,24 +1481,18 @@
 bre) %7B%0A%0A
-        
+%09%09
 boolean 
@@ -1510,10 +1510,10 @@
 ue;%0A
-%09
 %0A
+%09
 %09Con
@@ -1549,16 +1549,17 @@
 ion();%0A%0A
+%09
 %09result 
@@ -1614,32 +1614,33 @@
 isplay_label%22);%0A
+%09
 %09result &= check
@@ -1669,23 +1669,16 @@
 eature%22,
-       
  %22displa
@@ -1688,16 +1688,17 @@
 abel%22);%0A
+%09
 %09result 
@@ -1725,33 +1725,16 @@
  %22xref%22,
-                 
  %22displa
@@ -1745,16 +1745,17 @@
 bel%22);%0A%0A
+%09
 %09return 
@@ -1763,20 +1763,17 @@
 esult;%0A%0A
-    
+%09
 %7D // run
@@ -1774,20 +1774,17 @@
 // run%0A%0A
-    
+%09
 // -----

Add to core_xrefs group.