From: Ole Streicher <olebole@debian.org>
Date: Wed, 12 Oct 2022 16:20:38 +0200
Subject: Remove build of TFCAT validation harnesses

---
 build.xml                                    |  3 ++
 src/main/uk/ac/starlink/tfcat/TfcatUtil.java | 55 ++--------------------------
 src/main/uk/ac/starlink/tfcat/Validate.java  |  5 +--
 3 files changed, 8 insertions(+), 55 deletions(-)

diff --git a/build.xml b/build.xml
index ce1da29..5216cdf 100644
--- a/build.xml
+++ b/build.xml
@@ -386,6 +386,7 @@
 
       <!-- Exclude any files in the source tree that should not be
        !   compiled -->
+      <exclude name="uk/ac/starlink/tfcat/TfcatStatus.java"/>
       <exclude name="**/{Retired1.java}"/>
       <exclude name="**/{Retired2.java}"/>
       <exclude name="**/*.html"/>
@@ -971,6 +972,7 @@
            deprecation="${deprecation}" >
 
       <classpath refid="tests-classpath"/>
+      <exclude name="uk/ac/starlink/tfcat/ParseTest.java"/>
 
     </javac>
 
@@ -1008,6 +1010,7 @@
       <batchtest>
         <fileset dir="${tests.dir}">
           <include name="**/*Test.java"/>
+	  <exclude name="uk/ac/starlink/tfcat/ParseTest.java"/>
         </fileset>
       </batchtest>
 
diff --git a/src/main/uk/ac/starlink/tfcat/TfcatUtil.java b/src/main/uk/ac/starlink/tfcat/TfcatUtil.java
index 5e5d9aa..830f278 100644
--- a/src/main/uk/ac/starlink/tfcat/TfcatUtil.java
+++ b/src/main/uk/ac/starlink/tfcat/TfcatUtil.java
@@ -1,7 +1,5 @@
 package uk.ac.starlink.tfcat;
 
-import ari.ucidy.UCD;
-import ari.ucidy.UCDParser;
 import java.lang.reflect.Array;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -13,11 +11,6 @@ import java.util.logging.Level;
 import java.util.logging.Logger;
 import org.json.JSONException;
 import org.json.JSONObject;
-import uk.me.nxg.unity.OneUnit;
-import uk.me.nxg.unity.Syntax;
-import uk.me.nxg.unity.UnitExpr;
-import uk.me.nxg.unity.UnitParser;
-import uk.me.nxg.unity.UnitParserException;
 
 /**
  * Utilities for use with TFCat classes.
@@ -297,19 +290,8 @@ public class TfcatUtil {
      * @return new UCD checker
      */
     private static WordChecker createUcdChecker() {
-        try {
-            UCDParser.class.toString();
-        }
-        catch ( NoClassDefFoundError e ) {
-            logger_.warning( "Ucidy library unavailable: no UCD checking" );
-            return ucd -> null;
-        }
-        ucidyLogger_.setLevel( Level.OFF );
-        return ucd -> {
-            UCD pucd = UCDParser.defaultParser.parse( ucd );
-            Iterator<String> errit = pucd.getErrors();
-            return errit.hasNext() ? errit.next() : null;
-        };
+	logger_.warning( "Ucidy library unavailable: no UCD checking" );
+	return ucd -> null;
     }
 
     /**
@@ -318,37 +300,8 @@ public class TfcatUtil {
      * @return  new unit checker
      */
     private static WordChecker createUnitChecker() {
-        try {
-            UnitParser.class.toString();
-        }
-        catch ( NoClassDefFoundError e ) {
-            logger_.warning( "Unity library unavailable: no unit checking" );
-            return unit -> null;
-        }
-        return unit -> {
-            Syntax syntax = Syntax.VOUNITS;
-            UnitExpr punit;
-            try {
-                punit = new UnitParser( syntax, unit ).getParsed();
-            }
-            catch ( Exception e ) {
-                return "bad unit \"" + unit + "\" (" + e.getMessage() + ")";
-            }
-            if ( punit.isFullyConformant( syntax ) ) {
-                return null;
-            }
-            else {
-                for ( OneUnit word : punit ) {
-                    if ( ! word.isRecognisedUnit( syntax ) ) {
-                        return "unrecognised unit \"" + word + "\"";
-                    }
-                    else if ( ! word.isRecommendedUnit( syntax ) ) {
-                        return "deprecated unit \"" + word + "\"";
-                    }
-                }
-                return "unidentified problem with unit \"" + unit + "\"";
-            }
-        };
+	logger_.warning( "Unity library unavailable: no unit checking" );
+	return unit -> null;
     }
 
     /**
diff --git a/src/main/uk/ac/starlink/tfcat/Validate.java b/src/main/uk/ac/starlink/tfcat/Validate.java
index 5c30a96..7812d95 100644
--- a/src/main/uk/ac/starlink/tfcat/Validate.java
+++ b/src/main/uk/ac/starlink/tfcat/Validate.java
@@ -49,16 +49,13 @@ public class Validate {
                              ? System.in
                              : new FileInputStream( inFile ) ) {
             BasicReporter reporter =
-                new BasicReporter( isDebug, TfcatUtil.getUcdChecker(),
-                                   TfcatUtil.getUnitChecker() );
+                new BasicReporter( isDebug );
             try {
                 JSONObject json = new JSONObject( new JSONTokener( IOUtils.toString( in ) ) );
                 TfcatObject tfcat =
                     Decoders.TFCAT.decode( reporter, json, null );
                 if ( tfcat != null ) {
                     tfcat.purgeJson();
-                    TfcatUtil.checkBoundingBoxes( reporter, tfcat );
-                    TfcatUtil.checkCrs( reporter, tfcat );
                 }
                 else {
                     reporter.report( "No TFCat object found at top level" );
