Skip to content
Snippets Groups Projects
Commit b59ddb8a authored by tjc's avatar tjc
Browse files

tidy

git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@8043 ee4ac58c-ac51-4696-9907-e4b3aa274f04
parent 51270e83
No related branches found
No related tags found
No related merge requests found
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* *
* $Header: //tmp/pathsoft/artemis/uk/ac/sanger/artemis/components/EntryFileDialog.java,v 1.8 2008-06-23 13:31:26 tjc Exp $ * $Header: //tmp/pathsoft/artemis/uk/ac/sanger/artemis/components/EntryFileDialog.java,v 1.9 2008-06-23 13:53:46 tjc Exp $
*/ */
package uk.ac.sanger.artemis.components; package uk.ac.sanger.artemis.components;
...@@ -42,7 +42,7 @@ import javax.swing.*; ...@@ -42,7 +42,7 @@ import javax.swing.*;
* This class is a JFileChooser that can read EMBL Entry objects. * This class is a JFileChooser that can read EMBL Entry objects.
* *
* @author Kim Rutherford * @author Kim Rutherford
* @version $Id: EntryFileDialog.java,v 1.8 2008-06-23 13:31:26 tjc Exp $ * @version $Id: EntryFileDialog.java,v 1.9 2008-06-23 13:53:46 tjc Exp $
**/ **/
public class EntryFileDialog extends StickyFileChooser public class EntryFileDialog extends StickyFileChooser
...@@ -442,7 +442,7 @@ public class EntryFileDialog extends StickyFileChooser ...@@ -442,7 +442,7 @@ public class EntryFileDialog extends StickyFileChooser
try try
{ {
if(entry.getEMBLEntry() instanceof DatabaseDocumentEntry) if(entry.getEMBLEntry() instanceof DatabaseDocumentEntry)
ReadAndWriteEntry.writeEntry(entry, file, ReadAndWriteEntry.writeDatabaseEntryToFile(entry, file,
flattenGeneModel.isSelected(), false, destination_type); flattenGeneModel.isSelected(), false, destination_type);
else if(include_diana_extensions) else if(include_diana_extensions)
entry.save(file, destination_type, false); entry.save(file, destination_type, false);
...@@ -460,7 +460,7 @@ public class EntryFileDialog extends StickyFileChooser ...@@ -460,7 +460,7 @@ public class EntryFileDialog extends StickyFileChooser
try try
{ {
if(entry.getEMBLEntry() instanceof DatabaseDocumentEntry) if(entry.getEMBLEntry() instanceof DatabaseDocumentEntry)
ReadAndWriteEntry.writeEntry(entry, file, ReadAndWriteEntry.writeDatabaseEntryToFile(entry, file,
flattenGeneModel.isSelected(), true, destination_type); flattenGeneModel.isSelected(), true, destination_type);
else if(include_diana_extensions) else if(include_diana_extensions)
entry.save(file, destination_type, true); entry.save(file, destination_type, true);
......
...@@ -102,14 +102,21 @@ class ReadAndWriteEntry ...@@ -102,14 +102,21 @@ class ReadAndWriteEntry
* Write entry to a file * Write entry to a file
* @param entry * @param entry
* @param file * @param file
* @param flatten if true the gene model is flattened * @param flatten Flatten the gene model and combine the qualifiers if true.
* If false it will write all features and qualifiers out.
* @param force invalid qualifiers and any features with invalid keys will
* be quietly thrown away when saving.
* @param destination_type Should be one of EMBL_FORMAT, GENBANK_FORMAT,
* GFF_FORMAT or ANY_FORMAT. If ANY_FORMAT then the Entry will
* be saved in the same format it was created, otherwise it will be saved
* in the given format.
* @throws IOException * @throws IOException
* @throws EntryInformationException * @throws EntryInformationException
*/ */
public static void writeEntry(final Entry entry, final File file, public static void writeDatabaseEntryToFile(final Entry entry, final File file,
final boolean flatten, final boolean flatten,
final boolean force, final boolean force,
final int destination_type) final int destination_type)
throws IOException, EntryInformationException throws IOException, EntryInformationException
{ {
GeneUtils.lazyLoadAll(entry, null); GeneUtils.lazyLoadAll(entry, null);
...@@ -195,11 +202,11 @@ class ReadAndWriteEntry ...@@ -195,11 +202,11 @@ class ReadAndWriteEntry
try try
{ {
Entry entry = ReadAndWriteEntry.readEntryFromDatabase("Pf3D7_03"); Entry entry = ReadAndWriteEntry.readEntryFromDatabase("Pf3D7_03");
ReadAndWriteEntry.writeEntry( ReadAndWriteEntry.writeDatabaseEntryToFile(
entry, new File("Pf3D7_03.flatten"), true, false, entry, new File("Pf3D7_03.flatten"), true, false,
DocumentEntryFactory.EMBL_FORMAT); DocumentEntryFactory.EMBL_FORMAT);
ReadAndWriteEntry.writeEntry( ReadAndWriteEntry.writeDatabaseEntryToFile(
entry, new File("Pf3D7_03.not-flatten"), false, false, entry, new File("Pf3D7_03.not-flatten"), false, false,
DocumentEntryFactory.EMBL_FORMAT); DocumentEntryFactory.EMBL_FORMAT);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment