in progress
[jalview.git] / forester / java / src / org / forester / util / ForesterUtil.java
index 58dbf45..1c914c8 100644 (file)
@@ -95,6 +95,10 @@ public final class ForesterUtil {
             sb.append( separator );
         }
     }
+    
+    final public static String getForesterLibraryInformation() {
+        return "forester " + ForesterConstants.FORESTER_VERSION + " (" + ForesterConstants.FORESTER_DATE  + ")";
+    }
 
     public static boolean seqIsLikelyToBeAa( final String s ) {
         final String seq = s.toLowerCase();
@@ -731,20 +735,29 @@ public final class ForesterUtil {
     }
 
     final public static void printProgramInformation( final String prg_name,
+                                                      final String desc,
                                                       final String prg_version,
                                                       final String date,
                                                       final String email,
-                                                      final String www ) {
-        final int l = prg_name.length() + prg_version.length() + date.length() + 4;
+                                                      final String www,
+                                                      final String based_on ) {
+        String my_prg_name = new String( prg_name );
+        if ( !ForesterUtil.isEmpty( desc ) ) {
+            my_prg_name += ( " - " + desc );
+        }
+        final int l = my_prg_name.length() + prg_version.length() + date.length() + 4;
         System.out.println();
-        System.out.println( prg_name + " " + prg_version + " (" + date + ")" );
+        System.out.println( my_prg_name + " " + prg_version + " (" + date + ")" );
         for( int i = 0; i < l; ++i ) {
             System.out.print( "_" );
         }
         System.out.println();
         System.out.println();
-        System.out.println( "WWW    : " + www );
-        System.out.println( "Contact: " + email );
+        System.out.println( "WWW     : " + www );
+        System.out.println( "Contact : " + email );
+        if ( !ForesterUtil.isEmpty( based_on ) ) {
+            System.out.println( "Based on: " + based_on );
+        }
         if ( !ForesterUtil.isEmpty( ForesterUtil.JAVA_VERSION ) && !ForesterUtil.isEmpty( ForesterUtil.JAVA_VENDOR ) ) {
             System.out.println();
             System.out.println( "[running on Java " + ForesterUtil.JAVA_VERSION + " " + ForesterUtil.JAVA_VENDOR + "]" );
@@ -752,6 +765,14 @@ public final class ForesterUtil {
         System.out.println();
     }
 
+    final public static void printProgramInformation( final String prg_name,
+                                                      final String prg_version,
+                                                      final String date,
+                                                      final String email,
+                                                      final String www ) {
+        printProgramInformation( prg_name, null, prg_version, date, email, www, null );
+    }
+
     final public static void printWarningMessage( final String prg_name, final String message ) {
         System.out.println( "[" + prg_name + "] > warning: " + message );
     }