From 5cef40931e785c975cc4dc734260b839d265522b Mon Sep 17 00:00:00 2001
From: tjc <tjc@ee4ac58c-ac51-4696-9907-e4b3aa274f04>
Date: Tue, 22 Jun 2010 10:48:14 +0000
Subject: [PATCH] flag to stop private qualifiers getting written out

git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@14090 ee4ac58c-ac51-4696-9907-e4b3aa274f04
---
 uk/ac/sanger/artemis/io/ReadAndWriteEntry.java | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/uk/ac/sanger/artemis/io/ReadAndWriteEntry.java b/uk/ac/sanger/artemis/io/ReadAndWriteEntry.java
index 05d421501..f88495a74 100644
--- a/uk/ac/sanger/artemis/io/ReadAndWriteEntry.java
+++ b/uk/ac/sanger/artemis/io/ReadAndWriteEntry.java
@@ -273,6 +273,7 @@ public class ReadAndWriteEntry
         System.out.println("-u\t[swing|console|script] the UI mode : run in swing (with popup dialog boxes) mode, run in console mode (choices entered in the console window), or in script mode (all choices default to continue, all parameters passed on command line) ");
         System.out.println("-p\tthe password for connecting to the Chado database");
         System.out.println("-fp\t the file path (the folder you want to save the files in)");
+        System.out.println("-np\t[y|n] do not write out private qualifiers, default is y");
         
         System.exit(0);
       }
@@ -283,6 +284,7 @@ public class ReadAndWriteEntry
       boolean include_diana_extensions = true;
       String suffix = ".embl";
       boolean gzip = true;
+      boolean noprivates = true;
       
       String filePath = "";
       
@@ -309,6 +311,11 @@ public class ReadAndWriteEntry
           if(i + 1 < args.length && args[i + 1].toLowerCase().equals("n"))
             gzip = false;
         }
+        else if (key.equals("-np"))
+        {
+          if(i + 1 < args.length && args[i + 1].toLowerCase().equals("n"))
+            noprivates = false;
+        }
         else if (key.equals("-o"))
         {
           if(i + 1 < args.length && args[i + 1].toLowerCase().equals("gff"))
@@ -386,6 +393,9 @@ public class ReadAndWriteEntry
       if(gzip)
         suffix = suffix + ".gz";
 
+      if(noprivates)
+        System.setProperty("noprivates", "true");
+      
       for(int i=0;i < names.length; i++)
       {
         
-- 
GitLab