You can subscribe to this list here.
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(6) |
Jul
(5) |
Aug
(8) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2013 |
Jan
|
Feb
|
Mar
(6) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
(1) |
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(2) |
Oct
(1) |
Nov
(4) |
Dec
|
| 2015 |
Jan
|
Feb
|
Mar
(23) |
Apr
(11) |
May
(33) |
Jun
(13) |
Jul
(86) |
Aug
(46) |
Sep
(104) |
Oct
(9) |
Nov
(1) |
Dec
|
| 2016 |
Jan
(9) |
Feb
(19) |
Mar
(8) |
Apr
|
May
(4) |
Jun
(25) |
Jul
(24) |
Aug
(14) |
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2017 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
| 2018 |
Jan
(1) |
Feb
|
Mar
(6) |
Apr
(7) |
May
(8) |
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
(8) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2021 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(9) |
Oct
|
Nov
|
Dec
|
| 2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
|
From: <nik...@us...> - 2016-03-09 11:52:21
|
Revision: 631
http://sourceforge.net/p/sbfc/code/631
Author: niko-rodrigue
Date: 2016-03-09 11:52:19 +0000 (Wed, 09 Mar 2016)
Log Message:
-----------
made the GUI properly resizable
Modified Paths:
--------------
trunk/lib/sbfc-1.3.7.jar
trunk/src/org/sbfc/converter/ConverterGUI.java
trunk/src/org/sbfc/converter/gui/StatusPanel.java
trunk/src/org/sbfc/converter/sbml2dot/SBML2Dot.java
trunk/src/org/sbfc/converter/sbml2sbml/SBML2SBML.java
Modified: trunk/lib/sbfc-1.3.7.jar
===================================================================
(Binary files differ)
Modified: trunk/src/org/sbfc/converter/ConverterGUI.java
===================================================================
--- trunk/src/org/sbfc/converter/ConverterGUI.java 2016-03-08 17:07:11 UTC (rev 630)
+++ trunk/src/org/sbfc/converter/ConverterGUI.java 2016-03-09 11:52:19 UTC (rev 631)
@@ -25,6 +25,7 @@
package org.sbfc.converter;
+import java.awt.Container;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
@@ -77,7 +78,7 @@
/**
*
*/
- JTextField inputFileTextField = new JTextField(40);
+ JTextField inputFileTextField = new JTextField();
/**
*
*/
@@ -124,21 +125,11 @@
private void init() {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- final JPanel jpanel = new JPanel();
- setContentPane(jpanel); // add(jpanel);
+ final Container jpanel = getContentPane();
jpanel.setLayout(new GridBagLayout());
- // creates a constraints object
- GridBagConstraints c = new GridBagConstraints();
- c.insets = new Insets(2, 2, 2, 2); // insets for all components
- c.gridx = 0; // column 0
- c.gridy = 0; // row 0
- c.ipadx = 10; // increases components width by 10 pixels
- c.ipady = 0; // increases components height by 10 pixels
- c.anchor = GridBagConstraints.WEST;
-
JMenuBar menuBar = new JMenuBar();
- jpanel.add(menuBar, c);
+ setJMenuBar(menuBar);
JMenu filesMenu = new JMenu("Files");
menuBar.add(filesMenu);
@@ -152,6 +143,14 @@
});
filesMenu.add(exitMenuItem);
+ JMenuItem aboutMenuItem = new JMenuItem(new AbstractAction("About") {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ new AboutDialog(application);
+ }
+ });
+ menuBar.add(aboutMenuItem);
+
inputFileChooser.setCurrentDirectory(new File(System.getProperty("user.home")));
inputFileChooser.setFileFilter(new javax.swing.filechooser.FileFilter() {
@@ -164,20 +163,22 @@
return "XML files";
}
});
+
+ int rowNumber = 0;
- JMenuItem aboutMenuItem = new JMenuItem(new AbstractAction("About") {
- @Override
- public void actionPerformed(ActionEvent e) {
- new AboutDialog(application);
- }
- });
- menuBar.add(aboutMenuItem);
-
- c.gridy = 1; // row 0
+ // creates a constraints object
+ GridBagConstraints c = new GridBagConstraints();
+ c.insets = new Insets(2, 2, 2, 2); // insets for all components
+ c.gridx = 0; // column 0
+ c.gridy = rowNumber; // row 0
+ c.ipadx = 10; // increases components width by 10 pixels
+ c.ipady = 0; // increases components height by 10 pixels
+ c.anchor = GridBagConstraints.WEST;
jpanel.add(new JLabel("Select input file"), c);
c.gridx = 1; // column 1
c.ipadx = 300; // increases components width by 300 pixels
+ c.weightx = 0.5;
c.fill = GridBagConstraints.HORIZONTAL;
jpanel.add(inputFileTextField, c);
@@ -194,15 +195,17 @@
};
c.fill = GridBagConstraints.NONE;
+ c.weightx = 0;
c.gridx = 2; // column 2
c.ipadx = 0; // increases components width by 0 pixels
inputFileButton = new JButton(inputAction);
inputFileButton.setToolTipText("Open a file chooser dialog to select the input file");
jpanel.add(inputFileButton, c);
+ rowNumber++;
c.gridx = 0; // column 0
- c.gridy = 2; // row 1
+ c.gridy = rowNumber;
c.ipadx = 10; // increases components width by 10 pixels
c.ipady = 0; // increases components height by 10 pixels
@@ -283,14 +286,16 @@
});
jpanel.add(jList, c);
-
+ rowNumber++;
+
// Output file row
c.gridx = 0; // column 0
- c.gridy = 3; // row 3
+ c.gridy = rowNumber;
jpanel.add(new JLabel("Select output file"), c);
c.gridx = 1; // column 1
c.ipadx = 300; // increases components width by 300 pixels
+ c.weightx = 0.5;
c.fill = GridBagConstraints.HORIZONTAL;
jpanel.add(outputFileTextField, c);
@@ -309,13 +314,16 @@
c.fill = GridBagConstraints.NONE;
c.gridx = 2; // column 2
c.ipadx = 0; // increases components width by 0 pixels
+ c.weightx = 0;
JButton outputFileButton = new JButton(outputAction);
outputFileButton.setToolTipText("Open a file chooser dialog to select the output file");
jpanel.add(outputFileButton, c);
+ rowNumber++;
+
// open output file row
c.gridx = 0; // column 0
- c.gridy = 4; // row 4
+ c.gridy = rowNumber; // row 4
jpanel.add(new JLabel("Open output file"), c);
c.gridx = 1; // column 1
@@ -325,9 +333,11 @@
jpanel.add(openOutputCheckBox, c);
+ rowNumber++;
+
// launch conversion button row.
c.gridx = 1; // column 1
- c.gridy = 5; // row 5
+ c.gridy = rowNumber;
c.insets = new Insets(10, 10, 10, 10); // insets for all components
c.anchor = GridBagConstraints.CENTER;
@@ -386,8 +396,10 @@
launchButton = new JButton(launchAction);
jpanel.add(launchButton, c);
+ rowNumber++;
+
c.gridx = 0; // column 1
- c.gridy = 6; // row 6
+ c.gridy = rowNumber;
c.gridwidth = 3;
c.ipadx = 10; // increases components width by 10 pixels
c.anchor = GridBagConstraints.WEST;
@@ -461,7 +473,7 @@
ConverterGUI gui = new ConverterGUI();
gui.setMinimumSize(new Dimension(600, 300));
- gui.setResizable(false);
+ gui.setResizable(true);
gui.pack();
gui.setVisible(true);
Modified: trunk/src/org/sbfc/converter/gui/StatusPanel.java
===================================================================
--- trunk/src/org/sbfc/converter/gui/StatusPanel.java 2016-03-08 17:07:11 UTC (rev 630)
+++ trunk/src/org/sbfc/converter/gui/StatusPanel.java 2016-03-09 11:52:19 UTC (rev 631)
@@ -27,6 +27,9 @@
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Font;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
import javax.swing.BorderFactory;
import javax.swing.JLabel;
@@ -46,14 +49,19 @@
private static final long serialVersionUID = -1073513153341532991L;
/** The textLabel. */
- private JTextField textLabel = new JTextField(85);
+ private JTextField textLabel = new JTextField();
/**
* Instantiates a new status panel.
*/
public StatusPanel() {
- setLayout(new BorderLayout());
- add(textLabel,BorderLayout.WEST);
+ setLayout(new GridBagLayout());
+ GridBagConstraints c = new GridBagConstraints();
+ c.anchor = GridBagConstraints.WEST;
+ c.weightx = 0.5;
+ c.fill = GridBagConstraints.HORIZONTAL;
+
+ add(textLabel, c);
setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
textLabel.setBackground(null);
textLabel.setEditable(false);
Modified: trunk/src/org/sbfc/converter/sbml2dot/SBML2Dot.java
===================================================================
--- trunk/src/org/sbfc/converter/sbml2dot/SBML2Dot.java 2016-03-08 17:07:11 UTC (rev 630)
+++ trunk/src/org/sbfc/converter/sbml2dot/SBML2Dot.java 2016-03-09 11:52:19 UTC (rev 631)
@@ -420,6 +420,10 @@
String speciesNodeId = species.getId();
String speciesShape = converter.getOutputFromClass(species, "unspecified entity");
+ if (speciesShape == null) {
+ speciesShape = "ellipse";
+ }
+
if (speciesShape.equalsIgnoreCase("emptyset")) {
speciesNodeId = createEmptySetNode(out, reactionId);
} else if (speciesCardinalityMap.get(species) > MAX_EDGE_ALLOWED) {
Modified: trunk/src/org/sbfc/converter/sbml2sbml/SBML2SBML.java
===================================================================
--- trunk/src/org/sbfc/converter/sbml2sbml/SBML2SBML.java 2016-03-08 17:07:11 UTC (rev 630)
+++ trunk/src/org/sbfc/converter/sbml2sbml/SBML2SBML.java 2016-03-09 11:52:19 UTC (rev 631)
@@ -110,6 +110,11 @@
String currentSBML;
try {
currentSBML = sbmlModel.modelToString();
+
+ if (currentSBML != null && currentSBML.length() > 151) {
+ System.out.println("SBML2SBML : converted model : \n" + currentSBML.substring(0, 150));
+ }
+ System.out.println();
} catch (WriteModelException e1) {
e1.printStackTrace();
return null;
@@ -203,12 +208,12 @@
@Override
public String getDescription() {
- return "It converts an SBML model format to another with different Level/Version";
+ return "Converts an SBML model format to another with different Level/Version";
}
@Override
public String getHtmlDescription() {
- return "It converts an SBML model format to another with different Level/Version";
+ return "Converts an SBML model format to another with different Level/Version";
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2016-03-08 17:07:14
|
Revision: 630
http://sourceforge.net/p/sbfc/code/630
Author: niko-rodrigue
Date: 2016-03-08 17:07:11 +0000 (Tue, 08 Mar 2016)
Log Message:
-----------
renamed BioPAXL3Converter to BioPAX2BioPAXL3 + increased the version number + modified the GUI to display the output file when the conversion failed as the error is often written in the output file + corrected the conversion to BioPAX L2 that was not working since the last changes on the SBML2BioPAX class + updated SBML2Dot to generate a dot file even if graphviz is not installed
Modified Paths:
--------------
trunk/build.xml
trunk/src/org/sbfc/converter/ConverterGUI.java
trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_l2.java
trunk/src/org/sbfc/converter/sbml2dot/SBML2Dot.java
trunk/src/org/sbfc/converter/sbml2sbml/SBML2SBML.java
trunk/src/org/util/graphviz/GraphViz.java
Added Paths:
-----------
trunk/lib/sbfc-1.3.7.jar
trunk/src/org/sbfc/converter/biopaxL3converter/BioPAX2BioPAXL3.java
Removed Paths:
-------------
trunk/lib/sbfc-1.3.6.jar
trunk/src/org/sbfc/converter/biopaxL3converter/BioPAXL3Converter.java
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2016-03-08 16:07:30 UTC (rev 629)
+++ trunk/build.xml 2016-03-08 17:07:11 UTC (rev 630)
@@ -12,7 +12,7 @@
</tstamp>
<property name="Name" value="System Biology Format Converter"/>
<property name="name" value="sbfc"/>
- <property name="version" value="1.3.6"/>
+ <property name="version" value="1.3.7"/>
<property name="sbml2xpp.version" value="1.3"/>
<property name="sbml2octave.version" value="1.2"/>
Deleted: trunk/lib/sbfc-1.3.6.jar
===================================================================
(Binary files differ)
Added: trunk/lib/sbfc-1.3.7.jar
===================================================================
(Binary files differ)
Index: trunk/lib/sbfc-1.3.7.jar
===================================================================
--- trunk/lib/sbfc-1.3.7.jar 2016-03-08 16:07:30 UTC (rev 629)
+++ trunk/lib/sbfc-1.3.7.jar 2016-03-08 17:07:11 UTC (rev 630)
Property changes on: trunk/lib/sbfc-1.3.7.jar
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: trunk/src/org/sbfc/converter/ConverterGUI.java
===================================================================
--- trunk/src/org/sbfc/converter/ConverterGUI.java 2016-03-08 16:07:30 UTC (rev 629)
+++ trunk/src/org/sbfc/converter/ConverterGUI.java 2016-03-08 17:07:11 UTC (rev 630)
@@ -25,7 +25,6 @@
package org.sbfc.converter;
-import java.awt.Component;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
@@ -101,7 +100,7 @@
public static final String APPLICATION_SHORTNAME = "SBFC";
- public static final String VERSION = "1.3.6";
+ public static final String VERSION = "1.3.7";
public static final String WEBSITE = "http://sbfc.sf.net/";
@@ -361,7 +360,7 @@
inputModelType = "BioPAXModel";
}
- //GeneralConverter converter = converterInstances.get(converterIndex);
+ GeneralConverter converter = converterInstances.get(converterIndex);
String outputFileName = Converter.convertFromFile(inputModelType, converterClassNames.get(converterIndex), inputFileName, outputFileTextField.getText());
@@ -369,17 +368,18 @@
System.out.println("\nOutput file: " + outputFileName);
displayFileinNewWindow(outputFileName);
- statusPanel.setText("Conversion succesfull and result saved on file : " + outputFileName);
+ statusPanel.setText("Conversion succesful and result saved on file : " + outputFileName);
} else if (outputFileName != null ) {
statusPanel.setText("Conversion succesfull and result saved on file : " + outputFileName);
- JOptionPane.showMessageDialog(null, "Conversion succesfull and result saved on file: \n" + outputFileName);
+ JOptionPane.showMessageDialog(null, "Conversion succesful and result saved on file: \n" + outputFileName);
} else {
int pos = inputFileName.lastIndexOf(".");
String errorFileName = inputFileName.substring(0,pos) + ".errorLog";
+ outputFileName = inputFileName.substring(0,pos) + converter.getResultExtension();
statusPanel.setText("Conversion FAILED!");
- JOptionPane.showMessageDialog(null, "Conversion failed ! Check the sbfc-gui.log or \n" + errorFileName + " files for errors.");
+ displayFileinNewWindow(outputFileName);
+ JOptionPane.showMessageDialog(null, "Conversion failed ! Check the sbfc-gui.log or \n" + errorFileName + " files for errors if the output file does not contain the error.");
}
-
}
};
@@ -418,7 +418,13 @@
*/
private void displayFileinNewWindow(String outputFileName)
{
+ if ((outputFileName == null) || (!new File(outputFileName).exists())) {
+ System.out.println("Output file '" + outputFileName + "' does not seem to exist !");
+ return;
+ }
+
try {
+ System.out.println("Trying to read '" + outputFileName + "'.");
String outputFileContent = readFile(outputFileName, Charset.forName("UTF-8"));
JFrame outputFileJFrame = new JFrame("Conversion result saved on file : " + outputFileName);
JTextArea outputFileTA = new JTextArea(outputFileContent);
Added: trunk/src/org/sbfc/converter/biopaxL3converter/BioPAX2BioPAXL3.java
===================================================================
--- trunk/src/org/sbfc/converter/biopaxL3converter/BioPAX2BioPAXL3.java (rev 0)
+++ trunk/src/org/sbfc/converter/biopaxL3converter/BioPAX2BioPAXL3.java 2016-03-08 17:07:11 UTC (rev 630)
@@ -0,0 +1,110 @@
+/*
+ * $Id$
+ * $URL$
+ *
+ * ==========================================================================
+ * This file is part of The System Biology Format Converter (SBFC).
+ * Please visit <http://sbfc.sf.net> to have more information about
+ * SBFC.
+ *
+ * Copyright (c) 2010-2015 jointly by the following organizations:
+ * 1. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK
+ * 2. The Babraham Institute, Cambridge, UK
+ * 3. Department of Bioinformatics, BiGCaT, Maastricht University
+ *
+ * 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. A copy of the license agreement is provided
+ * in the file named "LICENSE.txt" included with this software distribution
+ * and also available online as
+ * <http://sbfc.sf.net/mediawiki/index.php/License>.
+ *
+ * ==========================================================================
+ *
+ */
+
+package org.sbfc.converter.biopaxL3converter;
+
+import org.biopax.paxtools.converter.LevelUpgrader;
+import org.biopax.paxtools.model.BioPAXLevel;
+import org.biopax.paxtools.model.Model;
+import org.sbfc.converter.GeneralConverter;
+import org.sbfc.converter.exceptions.ConversionException;
+import org.sbfc.converter.exceptions.ReadModelException;
+import org.sbfc.converter.models.GeneralModel;
+import org.sbfc.converter.models.BioPAXModel;
+
+
+/**
+ * Convert a model from BioPAX L1/L2 to BioPAX L3.
+ *
+ *
+ * @author Nicolas Rodriguez
+ * @author Piero Dalle Pezze
+ *
+ * @version 1.0
+ *
+ */
+public class BioPAX2BioPAXL3 extends GeneralConverter {
+
+
+ /**
+ * Convert a model from BioPax L1/L2 to BioPax L3.
+ *
+ * @param model to be converted
+ * @return a BioPax L3 model
+ * @throws ConversionException
+ * @throws ReadModelException
+ */
+ public GeneralModel biopaxExport(BioPAXModel model)
+ throws ConversionException, ReadModelException {
+
+ if (model.getModel().getLevel().equals(BioPAXLevel.L1) ||
+ model.getModel().getLevel().equals(BioPAXLevel.L2)) {
+
+ LevelUpgrader levelUpgrader = new LevelUpgrader();
+ Model level3Model = levelUpgrader.filter(model.getModel());
+ BioPAXModel bioPaxModelOut = new BioPAXModel(level3Model);
+
+ return bioPaxModelOut;
+ }
+
+ // we return the model if it is already L3
+ return model;
+ }
+
+
+ @Override
+ public GeneralModel convert(GeneralModel model)
+ throws ConversionException, ReadModelException {
+ try {
+ inputModel = model;
+ return biopaxExport((BioPAXModel)model);
+ } catch (ReadModelException e) {
+ throw e;
+ } catch (ConversionException e) {
+ throw e;
+ }
+ }
+
+ @Override
+ public String getResultExtension() {
+ return "-biopaxL3.owl";
+ }
+
+ @Override
+ public String getName() {
+ return "BioPAX to BioPAX L3";
+ }
+
+ @Override
+ public String getDescription() {
+ return "Converts a model from BioPAX L1/L2 to BioPAX L3, using paxtools.";
+ }
+
+ @Override
+ public String getHtmlDescription() {
+ return "Converts a model from <a href=\"http://www.biopax.org\">BioPAX</a> L1/L2 to <a href=\"http://www.biopax.org\">BioPAX</a> L3, using <a href=\"http://www.biopax.org\">paxtools</a>.";
+ }
+
+}
Property changes on: trunk/src/org/sbfc/converter/biopaxL3converter/BioPAX2BioPAXL3.java
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Rev URL
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Deleted: trunk/src/org/sbfc/converter/biopaxL3converter/BioPAXL3Converter.java
===================================================================
--- trunk/src/org/sbfc/converter/biopaxL3converter/BioPAXL3Converter.java 2016-03-08 16:07:30 UTC (rev 629)
+++ trunk/src/org/sbfc/converter/biopaxL3converter/BioPAXL3Converter.java 2016-03-08 17:07:11 UTC (rev 630)
@@ -1,110 +0,0 @@
-/*
- * $Id: BioPAXL3Converter.java 399 2015-07-13 08:43:45Z pdp10 $
- * $URL: svn+ssh://pdp10@svn.code.sf.net/p/sbfc/code/trunk/src/org/sbfc/converter/biopaxL3converter/BioPAXL3Converter.java $
- *
- * ==========================================================================
- * This file is part of The System Biology Format Converter (SBFC).
- * Please visit <http://sbfc.sf.net> to have more information about
- * SBFC.
- *
- * Copyright (c) 2010-2015 jointly by the following organizations:
- * 1. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK
- * 2. The Babraham Institute, Cambridge, UK
- * 3. Department of Bioinformatics, BiGCaT, Maastricht University
- *
- * 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. A copy of the license agreement is provided
- * in the file named "LICENSE.txt" included with this software distribution
- * and also available online as
- * <http://sbfc.sf.net/mediawiki/index.php/License>.
- *
- * ==========================================================================
- *
- */
-
-package org.sbfc.converter.biopaxL3converter;
-
-import org.biopax.paxtools.converter.LevelUpgrader;
-import org.biopax.paxtools.model.BioPAXLevel;
-import org.biopax.paxtools.model.Model;
-import org.sbfc.converter.GeneralConverter;
-import org.sbfc.converter.exceptions.ConversionException;
-import org.sbfc.converter.exceptions.ReadModelException;
-import org.sbfc.converter.models.GeneralModel;
-import org.sbfc.converter.models.BioPAXModel;
-
-
-/**
- * Convert a model from BioPAX L1/L2 to BioPAX L3.
- *
- *
- * @author Nicolas Rodriguez
- * @author Piero Dalle Pezze
- *
- * @version 1.0
- *
- */
-public class BioPAXL3Converter extends GeneralConverter {
-
-
- /**
- * Convert a model from BioPax L1/L2 to BioPax L3.
- *
- * @param model to be converted
- * @return a BioPax L3 model
- * @throws ConversionException
- * @throws ReadModelException
- */
- public GeneralModel biopaxExport(BioPAXModel model)
- throws ConversionException, ReadModelException {
-
- if (model.getModel().getLevel().equals(BioPAXLevel.L1) ||
- model.getModel().getLevel().equals(BioPAXLevel.L2)) {
-
- LevelUpgrader levelUpgrader = new LevelUpgrader();
- Model level3Model = levelUpgrader.filter(model.getModel());
- BioPAXModel bioPaxModelOut = new BioPAXModel(level3Model);
-
- return bioPaxModelOut;
- }
-
- // we return the model if it is already L3
- return model;
- }
-
-
- @Override
- public GeneralModel convert(GeneralModel model)
- throws ConversionException, ReadModelException {
- try {
- inputModel = model;
- return biopaxExport((BioPAXModel)model);
- } catch (ReadModelException e) {
- throw e;
- } catch (ConversionException e) {
- throw e;
- }
- }
-
- @Override
- public String getResultExtension() {
- return "-biopaxL3.owl";
- }
-
- @Override
- public String getName() {
- return "BiopaxL3Converter";
- }
-
- @Override
- public String getDescription() {
- return "It converts a model format from BioPAX L1/L2 to BioPAX L3";
- }
-
- @Override
- public String getHtmlDescription() {
- return "It converts a model format from BioPAX L1/L2 to BioPAX L3";
- }
-
-}
Modified: trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_l2.java
===================================================================
--- trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_l2.java 2016-03-08 16:07:30 UTC (rev 629)
+++ trunk/src/org/sbfc/converter/sbml2biopax/SBML2BioPAX_l2.java 2016-03-08 17:07:11 UTC (rev 630)
@@ -79,6 +79,8 @@
PROVENANCE_CLASS_NAME = "dataSource";
CELLULAR_LOCATION_VOCABULARY = "openControlledVocabulary";
PHYSICAL_ENTITY_PARTICIPANT = "physicalEntityParticipant";
+ INTERACTION = "interaction";
+ CATALYSIS = "catalysis";
}
Modified: trunk/src/org/sbfc/converter/sbml2dot/SBML2Dot.java
===================================================================
--- trunk/src/org/sbfc/converter/sbml2dot/SBML2Dot.java 2016-03-08 16:07:30 UTC (rev 629)
+++ trunk/src/org/sbfc/converter/sbml2dot/SBML2Dot.java 2016-03-08 17:07:11 UTC (rev 630)
@@ -681,6 +681,8 @@
sbml2dot.cloning = Context.getPropertyAsBoolean(Context.CLONING);
sbml2dot.fileNameSuffix = Context.getProperty(Context.SUFFIX);
+ GraphViz.setDotPath("/usr/local/bin/wrongdot");
+
SBMLDocument sbmlDocument = sbml2dot.getSBMLDocument();
if (sbmlDocument == null) {
@@ -712,42 +714,43 @@
graphViz.setImageFormat("dot");
byte[] dotWithLayoutBytes = graphViz.getGraph(dotFileStr);
- String dotWithLayout = new String(dotWithLayoutBytes);
-
- System.out.println("SBML2Dot : conversion with layout done : " + java.util.Calendar.getInstance().getTimeInMillis());
-
- // Do the different exports if needed
- String exports = "svg png";
+ if (dotWithLayoutBytes != null) {
+ String dotWithLayout = new String(dotWithLayoutBytes);
- if (args.length > 1) {
- exports = args[1];
- }
-
- if (exports != null && exports.trim().length() > 0) {
- String[] exportArr = exports.split(" ");
+ System.out.println("SBML2Dot : conversion with layout done : " + java.util.Calendar.getInstance().getTimeInMillis());
- // writing the images with graphviz
- int lastIndexDot = fileName.lastIndexOf(".");
-
- String exportFileSuffix = fileName.substring(0, lastIndexDot);
+ // Do the different exports if needed
+ String exports = "svg png";
- System.out.println("SBML2Dot : FILE name suffix = " + exportFileSuffix);
- logger.debug("Dot export file name suffix = " + exportFileSuffix);
-
- for (String export : exportArr) {
-
- String imgFileName = exportFileSuffix + "." + export.trim();
- System.out.println("image file name: " + imgFileName);
+ if (args.length > 1) {
+ exports = args[1];
+ }
- graphViz.setImageFormat(export);
- byte[] imgBytes = graphViz.getGraph(dotWithLayout, "-n2");
- graphViz.writeGraphToFile(imgBytes, imgFileName);
-
- System.out.println("SBML2Dot : conversion without layout done : " + java.util.Calendar.getInstance().getTimeInMillis());
+ if (exports != null && exports.trim().length() > 0) {
+ String[] exportArr = exports.split(" ");
- }
+ // writing the images with graphviz
+ int lastIndexDot = fileName.lastIndexOf(".");
+
+ String exportFileSuffix = fileName.substring(0, lastIndexDot);
+
+ System.out.println("SBML2Dot : FILE name suffix = " + exportFileSuffix);
+ logger.debug("Dot export file name suffix = " + exportFileSuffix);
+
+ for (String export : exportArr) {
+
+ String imgFileName = exportFileSuffix + "." + export.trim();
+ System.out.println("image file name: " + imgFileName);
+
+ graphViz.setImageFormat(export);
+ byte[] imgBytes = graphViz.getGraph(dotWithLayout, "-n2");
+ graphViz.writeGraphToFile(imgBytes, imgFileName);
+
+ System.out.println("SBML2Dot : conversion without layout done : " + java.util.Calendar.getInstance().getTimeInMillis());
+
+ }
+ }
}
-
}
@Override
@@ -764,7 +767,6 @@
try {
dotExport(sbmlDocument, new PrintWriter(dotStringWriter));
} catch (SBMLException e) {
- e.printStackTrace();
throw new ConversionException(e.getMessage());
}
@@ -780,49 +782,60 @@
dotFile.write(dotFileStr);
dotFile.close();
} catch (Exception e) {
- e.printStackTrace();
- return null; // TODO : transmit the error to the GeneralConverter
+ throw new ConversionException(e);
}
- GraphViz graphViz = new GraphViz();
+ boolean dotAvailable = GraphViz.isDotAvailable();
+ String dotWithLayout = dotFileStr;
- graphViz.setImageFormat("dot");
- byte[] dotWithLayoutBytes = graphViz.getGraph(dotFileStr);
-
- String dotWithLayout = new String(dotWithLayoutBytes);
-
- System.out.println("SBML2Dot : convert : dot with layout = \n" + dotWithLayout);
-
- // Do the different exports if needed
- String exports = options.get("export");
- if (exports != null && exports.trim().length() > 0) {
- String[] exportArr = exports.split(" ");
+ if (dotAvailable) {
+ GraphViz graphViz = new GraphViz();
- // writing the images with graphviz
- String fileName = ((SBMLModel) model).getModelFileName();
-
- if (fileName == null) {
- // TODO : create a temporary file ?
- logger.error("!!!! No fileName available to save the export files");
- return new DotModel(dotWithLayout);
- }
-
- int lastIndexDot = fileName.lastIndexOf(".");
-
- String exportFileSuffix = fileName.substring(0, lastIndexDot);
+ graphViz.setImageFormat("dot");
+ byte[] dotWithLayoutBytes = graphViz.getGraph(dotFileStr);
- System.out.println("SBML2Dot : FILE name suffix = " + exportFileSuffix);
- logger.debug("Dot export file name suffix = " + exportFileSuffix);
-
- for (String export : exportArr) {
-
- String imgFileName = exportFileSuffix + "." + export.trim();
- logger.info("image file name: " + imgFileName);
+ dotWithLayout = new String(dotWithLayoutBytes);
- graphViz.setImageFormat(export);
- byte[] imgBytes = graphViz.getGraph(dotWithLayout, "-n2");
- graphViz.writeGraphToFile(imgBytes, imgFileName);
- }
+ System.out.println("SBML2Dot : convert : dot with layout = \n" + dotWithLayout);
+
+ // Do the different exports if needed
+ String exports = options.get("export");
+ if (exports != null && exports.trim().length() > 0) {
+ String[] exportArr = exports.split(" ");
+
+ // writing the images with graphviz
+ String fileName = ((SBMLModel) model).getModelFileName();
+
+ if (fileName == null) {
+ // TODO - create the files from the DotModel class when the modelToFile method is called ?
+ logger.debug("No fileName available to save the export files!");
+ return new DotModel(dotWithLayout);
+ }
+
+ int lastIndexDot = fileName.lastIndexOf(".");
+
+ String exportFileSuffix = fileName.substring(0, lastIndexDot);
+
+ logger.debug("Dot export file name suffix = " + exportFileSuffix);
+
+ for (String export : exportArr) {
+
+ String imgFileName = exportFileSuffix + "." + export.trim();
+ logger.info("image file name: " + imgFileName);
+
+ graphViz.setImageFormat(export);
+ byte[] imgBytes = graphViz.getGraph(dotWithLayout, "-n2");
+ graphViz.writeGraphToFile(imgBytes, imgFileName);
+ }
+ }
+ } // TODO - check exception when the dot PATH is invalid
+ else {
+ // writing a note at the beginning of the file to say that the layout was not done and how to do it.
+ System.out.println("The Graphviz 'dot' program does not seems to be setup properly, saving the dot file without layout information!");
+ dotWithLayout = "// The Graphviz 'dot' program does not seems to be setup properly, this dot file does not contain layout information\n"
+ + "// If you want to have layout and being able to export the graph as png or other, you need to install Graphviz from http://www.graphviz.org/.\n"
+ + "// If 'dot' is not installed on the default location ('/usr/bin/dot'), you can specified the path with the java option '-Dsbml2dot.dot.path=/usr/local/bin/dot'\n\n"
+ + dotWithLayout;
}
return new DotModel(dotWithLayout);
Modified: trunk/src/org/sbfc/converter/sbml2sbml/SBML2SBML.java
===================================================================
--- trunk/src/org/sbfc/converter/sbml2sbml/SBML2SBML.java 2016-03-08 16:07:30 UTC (rev 629)
+++ trunk/src/org/sbfc/converter/sbml2sbml/SBML2SBML.java 2016-03-08 17:07:11 UTC (rev 630)
@@ -133,12 +133,17 @@
// TODO : if setLevelAndVersion returned false, the conversion is not possible
// and we need to return the list of errors found by libSBML
+ // Could be written in the notes of the empty sbml element
+ if (!isSetLVSuccesfull) {
+ libSBMLdoc.printErrors();
+ }
+
org.sbml.libsbml.SBMLWriter libSBMLWriter = new SBMLWriter();
String targetSBML = libSBMLWriter.writeSBMLToString(libSBMLdoc);
- System.out.println("SBML2SBML : converted model : \n" + targetSBML.substring(0, 150));
+ // System.out.println("SBML2SBML : converted model : \n" + targetSBML.substring(0, 150));
SBMLModel targetModel = new SBMLModel();
try {
Modified: trunk/src/org/util/graphviz/GraphViz.java
===================================================================
--- trunk/src/org/util/graphviz/GraphViz.java 2016-03-08 16:07:30 UTC (rev 629)
+++ trunk/src/org/util/graphviz/GraphViz.java 2016-03-08 17:07:11 UTC (rev 630)
@@ -71,9 +71,13 @@
/**
* The dir where temporary files will be created.
*/
- private static String TEMP_DIR = "/tmp";
+ private static String TEMP_DIR = System.getProperty("java.io.tmpdir");
/**
+ *
+ */
+ private final static String DOT_PATH_PROPERTY_NAME="sbml2dot.dot.path";
+ /**
* Where is your dot program located? It will be called externally.
* Could be used without specifying the path.
*/
@@ -203,6 +207,10 @@
File img;
byte[] img_stream = null;
+ if (! isDotAvailable()) {
+ return null;
+ }
+
try {
img = File.createTempFile("graph_", "." + IMAGE_FORMAT, new File(TEMP_DIR));
String imagePath = img.getAbsolutePath();
@@ -230,12 +238,12 @@
catch (java.lang.InterruptedException ie) {
System.err.println("Error: the execution of the external program was interrupted");
ie.printStackTrace();
- }
+ } // TODO - catch more Exceptions
return img_stream;
}
- /**
+ /**
* Writes the source of the graph in a file, and returns the written file
* as a File object.
*
@@ -283,4 +291,49 @@
public void setImageFormat(String imageFormat) {
IMAGE_FORMAT = imageFormat;
}
+
+
+ /**
+ *
+ */
+ private static void updateDotPath()
+ {
+ if (System.getProperty(DOT_PATH_PROPERTY_NAME) != null) {
+ DOT = System.getProperty(DOT_PATH_PROPERTY_NAME);
+ }
+ }
+
+ /**
+ * Returns {@code true} if {@link #DOT} point to a valid file.
+ *
+ * @return {@code true} if {@link #DOT} point to a valid file.
+ */
+ public static boolean isDotAvailable()
+ {
+ updateDotPath();
+
+ if (new File(DOT).exists()) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Sets the path to the 'dot' program.
+ *
+ * @param dotPath the path to dot
+ */
+ public static void setDotPath(String dotPath) {
+ DOT = dotPath;
+ }
+
+ /**
+ * Returns the path to the 'dot' program.
+ *
+ * @return the path to the 'dot' program.
+ */
+ public static String getDotPath() {
+ return DOT;
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pd...@us...> - 2016-03-08 16:07:33
|
Revision: 629
http://sourceforge.net/p/sbfc/code/629
Author: pdp10
Date: 2016-03-08 16:07:30 +0000 (Tue, 08 Mar 2016)
Log Message:
-----------
Renamed BioPAX2BioPAXL3
Modified Paths:
--------------
trunk/doc/sbfc_manual/sbfc_developer_manual.pdf
trunk/doc/sbfc_manual/sbfc_user_manual/converters.tex
trunk/doc/sbfc_manual/sbfc_user_manual/how_to_use_sbfc.tex
trunk/doc/sbfc_manual/sbfc_user_manual.pdf
Added Paths:
-----------
trunk/doc/sbfc_manual/sbfc_user_manual/converters/biopax2biopaxl3.tex
Removed Paths:
-------------
trunk/doc/sbfc_manual/sbfc_user_manual/converters/biopaxl3converter.tex
Modified: trunk/doc/sbfc_manual/sbfc_developer_manual.pdf
===================================================================
(Binary files differ)
Added: trunk/doc/sbfc_manual/sbfc_user_manual/converters/biopax2biopaxl3.tex
===================================================================
--- trunk/doc/sbfc_manual/sbfc_user_manual/converters/biopax2biopaxl3.tex (rev 0)
+++ trunk/doc/sbfc_manual/sbfc_user_manual/converters/biopax2biopaxl3.tex 2016-03-08 16:07:30 UTC (rev 629)
@@ -0,0 +1,15 @@
+\subsection{Conversion from BioPAX to BioPAX L3}
+\label{subsec:Conversion from BioPAX to BioPAX L3}
+This converter upgrades a BioPAX model from Level 1 or 2 to Level 3.
+The main objective of the \href{http://www.biopax.org/}{BioPAX} initiative is to develop a data exchange format for biological pathways that is flexible, extensible, optionally encapsulated and compatible with other standards and can be widely adopted in a timely manner.\\ \\
+The converter is:
+\begin{description}
+\item[BioPAX2BioPAXL3]: Convert a model from BioPAX L1/L2 to BioPAX L3.
+\end{description}
+
+To run BioPAX2BioPAXL3 you need java 1.6 or higher. After unpacking the zipped file, move to the folder that have been created and run:
+\begin{lstlisting}
+ # Convert BioPAX L1/L2 (any *owl files if you put a folder) to BioPAX L3
+ # The output file(s) will be in the same folder with extension .owl
+ ./sbfConverter.sh BioPAXModel BioPAX2BioPAXL3 [file.owl | folder]
+\end{lstlisting}
Deleted: trunk/doc/sbfc_manual/sbfc_user_manual/converters/biopaxl3converter.tex
===================================================================
--- trunk/doc/sbfc_manual/sbfc_user_manual/converters/biopaxl3converter.tex 2016-03-08 16:00:20 UTC (rev 628)
+++ trunk/doc/sbfc_manual/sbfc_user_manual/converters/biopaxl3converter.tex 2016-03-08 16:07:30 UTC (rev 629)
@@ -1,15 +0,0 @@
-\subsection{Conversion from BioPAX L1/2 to BioPAX L3}
-\label{subsec:Conversion from BioPAX L1/2 to BioPAX L3}
-This converter upgrades a BioPAX model from Level 1 or 2 to Level 3.
-The main objective of the \href{http://www.biopax.org/}{BioPAX} initiative is to develop a data exchange format for biological pathways that is flexible, extensible, optionally encapsulated and compatible with other standards and can be widely adopted in a timely manner.\\ \\
-The converter is:
-\begin{description}
-\item[BioPAXL3Converter]: Convert a model from BioPAX L1/L2 to BioPAX L3.
-\end{description}
-
-To run BioPAXL3Converter you need java 1.6 or higher. After unpacking the zipped file, move to the folder that have been created and run:
-\begin{lstlisting}
- # Convert BioPAX L1/L2 (any *owl files if you put a folder) to BioPAX L3
- # The output file(s) will be in the same folder with extension .owl
- ./sbfConverter.sh BioPAXModel BioPAXL3Converter [file.owl | folder]
-\end{lstlisting}
Modified: trunk/doc/sbfc_manual/sbfc_user_manual/converters.tex
===================================================================
--- trunk/doc/sbfc_manual/sbfc_user_manual/converters.tex 2016-03-08 16:00:20 UTC (rev 628)
+++ trunk/doc/sbfc_manual/sbfc_user_manual/converters.tex 2016-03-08 16:07:30 UTC (rev 629)
@@ -18,7 +18,7 @@
\item SBML2XPP : converts SBML (any level) to XPP;
\item SBML2DOT : converts SBML (any level) to DOT;
\item SBML2APM : converts SBML (any level) to APM;
- \item BioPAXL3Converter : converts BioPAX models level 1 or 2 to level 3.
+ \item BioPAX2BioPAXL3 : converts a BioPAX model to BioPAX level 3.
\end{itemize}
\subsection{Additional third-party SBFC converters}
@@ -43,7 +43,7 @@
\input{sbfc_user_manual/converters/sbml2xpp}
\input{sbfc_user_manual/converters/sbml2dot}
\input{sbfc_user_manual/converters/sbml2apm}
-\input{sbfc_user_manual/converters/biopaxl3converter}
+\input{sbfc_user_manual/converters/biopax2biopaxl3}
\input{sbfc_user_manual/converters/mdl2sbml}
\input{sbfc_user_manual/converters/biopax2gpml_and_gpml2biopax}
\input{sbfc_user_manual/converters/antimony2sbml_and_sbml2antimony}
Modified: trunk/doc/sbfc_manual/sbfc_user_manual/how_to_use_sbfc.tex
===================================================================
--- trunk/doc/sbfc_manual/sbfc_user_manual/how_to_use_sbfc.tex 2016-03-08 16:00:20 UTC (rev 628)
+++ trunk/doc/sbfc_manual/sbfc_user_manual/how_to_use_sbfc.tex 2016-03-08 16:07:30 UTC (rev 629)
@@ -31,7 +31,7 @@
# Example of output
Miriam registry file = Miriam.xml
-BioPAXL3Converter
+BioPAX2BioPAXL3
SBML2APM
SBML2BioPAX_l2
SBML2BioPAX_l3
Modified: trunk/doc/sbfc_manual/sbfc_user_manual.pdf
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pd...@us...> - 2016-03-08 16:00:22
|
Revision: 628
http://sourceforge.net/p/sbfc/code/628
Author: pdp10
Date: 2016-03-08 16:00:20 +0000 (Tue, 08 Mar 2016)
Log Message:
-----------
Renamed BioPAX2BioPAXL3
Modified Paths:
--------------
trunk/doc/images/SBFC_overview.odg
trunk/doc/images/SBFC_overview.png
trunk/doc/images/SBFC_overview_small.png
Removed Paths:
-------------
trunk/doc/images/SBFC_overview_basic.png
Modified: trunk/doc/images/SBFC_overview.odg
===================================================================
(Binary files differ)
Modified: trunk/doc/images/SBFC_overview.png
===================================================================
(Binary files differ)
Deleted: trunk/doc/images/SBFC_overview_basic.png
===================================================================
(Binary files differ)
Modified: trunk/doc/images/SBFC_overview_small.png
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pd...@us...> - 2016-03-08 10:33:51
|
Revision: 627
http://sourceforge.net/p/sbfc/code/627
Author: pdp10
Date: 2016-03-08 10:33:49 +0000 (Tue, 08 Mar 2016)
Log Message:
-----------
Figure at 600dpi
Modified Paths:
--------------
trunk/doc/images/sbfc_online_with_comments.png
Modified: trunk/doc/images/sbfc_online_with_comments.png
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pd...@us...> - 2016-03-07 16:08:56
|
Revision: 626
http://sourceforge.net/p/sbfc/code/626
Author: pdp10
Date: 2016-03-07 16:08:54 +0000 (Mon, 07 Mar 2016)
Log Message:
-----------
Added additional link to figure showing the overview of converters.
Modified Paths:
--------------
trunk/doc/sbfc_manual/sbfc_user_manual/converters.tex
trunk/doc/sbfc_manual/sbfc_user_manual.pdf
Modified: trunk/doc/sbfc_manual/sbfc_user_manual/converters.tex
===================================================================
--- trunk/doc/sbfc_manual/sbfc_user_manual/converters.tex 2016-03-07 15:56:34 UTC (rev 625)
+++ trunk/doc/sbfc_manual/sbfc_user_manual/converters.tex 2016-03-07 16:08:54 UTC (rev 626)
@@ -1,6 +1,6 @@
\section{Overview of the available converters}
\label{sec:Overview of the available converters}
-This section contains the complete list of converters available in SBFC. All the current converters use SBML as input model format. SBML is a machine-readable format for representing models and is the {\it de facto} standard for representing Systems Biology models. It is oriented towards describing systems where biological entities are involved in, and modified by, processes that occur over time. An example of this is a network of biochemical reactions. SBML framework is suitable for representing models commonly found in research on a number of topics, including cell signalling pathways, metabolic pathways, biochemical reactions, gene regulation, and many others. Below you can find the list of the currently available converters. If you want to contribute with new converters, please see the Developer Manual. Each converter is described in detail in the following sections.
+This section contains the complete list of converters available in SBFC. All the current converters use SBML as input model format. SBML is a machine-readable format for representing models and is the {\it de facto} standard for representing Systems Biology models. It is oriented towards describing systems where biological entities are involved in, and modified by, processes that occur over time. An example of this is a network of biochemical reactions. SBML framework is suitable for representing models commonly found in research on a number of topics, including cell signalling pathways, metabolic pathways, biochemical reactions, gene regulation, and many others. Below you can find the list of the currently available converters. For a graphical overview of how these converters are organised within the software package SBFC, see Figure \ref{fig:SBFC overview}. If you want to contribute with new converters, please see the Developer Manual. Each converter is described in detail in the following sections.
\subsection{Core SBFC converters}
\label{subsec:Core SBFC converters}
Modified: trunk/doc/sbfc_manual/sbfc_user_manual.pdf
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pd...@us...> - 2016-03-07 15:56:36
|
Revision: 625
http://sourceforge.net/p/sbfc/code/625
Author: pdp10
Date: 2016-03-07 15:56:34 +0000 (Mon, 07 Mar 2016)
Log Message:
-----------
Clarified distinction between core and additional packages on the user manual (and on the website). Checked out figure legends in the manual. Nothing missing.
Modified Paths:
--------------
trunk/doc/sbfc_manual/sbfc_developer_manual.pdf
trunk/doc/sbfc_manual/sbfc_user_manual/converters.tex
trunk/doc/sbfc_manual/sbfc_user_manual.pdf
Modified: trunk/doc/sbfc_manual/sbfc_developer_manual.pdf
===================================================================
(Binary files differ)
Modified: trunk/doc/sbfc_manual/sbfc_user_manual/converters.tex
===================================================================
--- trunk/doc/sbfc_manual/sbfc_user_manual/converters.tex 2016-02-08 13:53:15 UTC (rev 624)
+++ trunk/doc/sbfc_manual/sbfc_user_manual/converters.tex 2016-03-07 15:56:34 UTC (rev 625)
@@ -1,6 +1,10 @@
\section{Overview of the available converters}
\label{sec:Overview of the available converters}
-This section contains the complete list of converters available in SBFC. All the current converters use SBML as input model format. SBML is a machine-readable format for representing models and is the {\it de facto} standard for representing Systems Biology models. It is oriented towards describing systems where biological entities are involved in, and modified by, processes that occur over time. An example of this is a network of biochemical reactions. SBML framework is suitable for representing models commonly found in research on a number of topics, including cell signalling pathways, metabolic pathways, biochemical reactions, gene regulation, and many others. SBFC offers translation from an SBML file to one of the following formats:
+This section contains the complete list of converters available in SBFC. All the current converters use SBML as input model format. SBML is a machine-readable format for representing models and is the {\it de facto} standard for representing Systems Biology models. It is oriented towards describing systems where biological entities are involved in, and modified by, processes that occur over time. An example of this is a network of biochemical reactions. SBML framework is suitable for representing models commonly found in research on a number of topics, including cell signalling pathways, metabolic pathways, biochemical reactions, gene regulation, and many others. Below you can find the list of the currently available converters. If you want to contribute with new converters, please see the Developer Manual. Each converter is described in detail in the following sections.
+
+\subsection{Core SBFC converters}
+\label{subsec:Core SBFC converters}
+This section lists the currently supported converters which are part of the SBFC core package.
\begin{itemize}
\item SBML2SBML : converts SBML (any level-version) to SBML (any level-version);
\begin{itemize}
@@ -14,17 +18,23 @@
\item SBML2XPP : converts SBML (any level) to XPP;
\item SBML2DOT : converts SBML (any level) to DOT;
\item SBML2APM : converts SBML (any level) to APM;
- \item BioPAXL3Converter : converts BioPAX models level 1 or 2 to level 3;
- \item MDL2SBML : converts MDL to SBML (not part of SBFC\_core);
- \item BioPAX2GPML : converts BioPAX to GPML (not part of SBFC\_core);
- \item GPML2BioPAX : converts GPML to BioPAX (not part of SBFC\_core);
- \item SBML2Antimony : converts SBML to Antimony (not part of SBFC\_core. Requires libAntimony);
- \item Antimony2SBML : converts Antimony to SBML (not part of SBFC\_core. Requires libAntimony);
- \item SBML2CellML : converts SBML to CellML (not part of SBFC\_core. Requires libAntimony + CellML API);
- \item CellML2SBML : converts CellML to SBML (not part of SBFC\_core. Requires libAntimony + CellML API).
+ \item BioPAXL3Converter : converts BioPAX models level 1 or 2 to level 3.
\end{itemize}
-If you want to contribute with new converters, please see the Developer Manual. The next sections describe each converter in detail.
+\subsection{Additional third-party SBFC converters}
+\label{subsec:Additional third-party SBFC converters}
+Currently, the Systems Biology community has been working on additional converters. Each of these converters developed by third-parties can use specific libraries and library versions which could be different and not fully compatible with the libraries currently required by SBFC. Therefore these converters are separate from the SBF core package.
+\begin{itemize}
+ \item MDL2SBML : converts MDL to SBML;
+ \item BioPAX2GPML : converts BioPAX to GPML;
+ \item GPML2BioPAX : converts GPML to BioPAX;
+ \item SBML2Antimony : converts SBML to Antimony (requires libAntimony);
+ \item Antimony2SBML : converts Antimony to SBML (requires libAntimony);
+ \item SBML2CellML : converts SBML to CellML (requires libAntimony + CellML API);
+ \item CellML2SBML : converts CellML to SBML (requires libAntimony + CellML API).
+\end{itemize}
+
+
\input{sbfc_user_manual/converters/sbml2sbml}
\input{sbfc_user_manual/converters/sbml2biopax}
\input{sbfc_user_manual/converters/sbml2sbgnml}
Modified: trunk/doc/sbfc_manual/sbfc_user_manual.pdf
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2016-02-08 13:53:16
|
Revision: 624
http://sourceforge.net/p/sbfc/code/624
Author: niko-rodrigue
Date: 2016-02-08 13:53:15 +0000 (Mon, 08 Feb 2016)
Log Message:
-----------
added scripts to start the GUI
Modified Paths:
--------------
trunk/sbfConverter.bat
Added Paths:
-----------
trunk/sbfConverterGUI.bat
trunk/sbfConverterGUI.sh
Modified: trunk/sbfConverter.bat
===================================================================
--- trunk/sbfConverter.bat 2016-02-05 17:05:23 UTC (rev 623)
+++ trunk/sbfConverter.bat 2016-02-08 13:53:15 UTC (rev 624)
@@ -8,6 +8,11 @@
set PATHVISIO_CONVERTER="no"
+if x%CONVERTER_NAME% == x (
+ rem putting a fake converter name if it is empty to avoid an error in the next test
+ set CONVERTER_NAME="x"
+)
+
rem Trying to replace the substring 'GPML' with '' in CONVERTER_NAME
rem If the string is changed, it means that CONVERTER_NAME contains 'GPML'
if not x%CONVERTER_NAME:GPML=% == x%CONVERTER_NAME% (
Added: trunk/sbfConverterGUI.bat
===================================================================
--- trunk/sbfConverterGUI.bat (rev 0)
+++ trunk/sbfConverterGUI.bat 2016-02-08 13:53:15 UTC (rev 624)
@@ -0,0 +1,14 @@
+@echo off
+
+set CONVERTER_HOME=%~dp0
+
+set CLASSPATH=%CONVERTER_HOME%.;%CONVERTER_HOME%lib\*;%CONVERTER_HOME%lib\paxtools-4.2\*
+
+rem echo "classpath= %CLASSPATH% "
+rem echo %~dp0
+
+java -Dmiriam.xml.export=miriam.xml -classpath %CLASSPATH% org.sbfc.converter.ConverterGUI
+
+echo.
+
+pause
\ No newline at end of file
Added: trunk/sbfConverterGUI.sh
===================================================================
--- trunk/sbfConverterGUI.sh (rev 0)
+++ trunk/sbfConverterGUI.sh 2016-02-08 13:53:15 UTC (rev 624)
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+# Setting up libsbml, needed for the SBML2SBML converters
+LD_LIBRARY_PATH=/nfs/production/biomodels/sw/libSBML-5.11.6-Linux/usr/lib64
+
+
+# Setting up for Java properties
+PROPERTIES=""
+
+# Setting up antimony converters if used.
+# This can be done by either specifying a Java system property
+#PROPERTIES="$PROPERTIES -DSBTRANSLATE_PATH=/path/to/sbtranslate"
+# or an environment variable
+#export SBTRANSLATE_PATH=/path/to/sbtranslate
+
+RESOLVE_LINK=`readlink -f $0`
+SBF_CONVERTER_HOME=`dirname ${RESOLVE_LINK}`
+LIB_PATH=${SBF_CONVERTER_HOME}/lib
+
+export CLASSPATH=
+
+for jarFile in $LIB_PATH/*.jar
+do
+ export CLASSPATH=$CLASSPATH:$jarFile
+done
+export CLASSPATH=$CLASSPATH:$LIB_PATH/paxtools-4.2/paxtools-4.2.0-no-jena.jar
+
+java -Dmiriam.xml.export=${SBF_CONVERTER_HOME}/miriam.xml org.sbfc.converter.ConverterGUI
+
+
Property changes on: trunk/sbfConverterGUI.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2016-02-05 17:05:25
|
Revision: 623
http://sourceforge.net/p/sbfc/code/623
Author: niko-rodrigue
Date: 2016-02-05 17:05:23 +0000 (Fri, 05 Feb 2016)
Log Message:
-----------
updated jsbml-tidy and sbfc jar file
Modified Paths:
--------------
trunk/lib/sbfc-1.3.6.jar
Added Paths:
-----------
trunk/lib/jsbml-tidy-1.2.jar
Removed Paths:
-------------
trunk/lib/jsbml-tidy-1.1.jar
Deleted: trunk/lib/jsbml-tidy-1.1.jar
===================================================================
(Binary files differ)
Added: trunk/lib/jsbml-tidy-1.2.jar
===================================================================
(Binary files differ)
Index: trunk/lib/jsbml-tidy-1.2.jar
===================================================================
--- trunk/lib/jsbml-tidy-1.2.jar 2016-02-05 15:06:27 UTC (rev 622)
+++ trunk/lib/jsbml-tidy-1.2.jar 2016-02-05 17:05:23 UTC (rev 623)
Property changes on: trunk/lib/jsbml-tidy-1.2.jar
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: trunk/lib/sbfc-1.3.6.jar
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2016-02-05 15:06:30
|
Revision: 622
http://sourceforge.net/p/sbfc/code/622
Author: niko-rodrigue
Date: 2016-02-05 15:06:27 +0000 (Fri, 05 Feb 2016)
Log Message:
-----------
corrected the URL2URN and URN2URL converter to avoid unnecessary SBML model reading and writing
Modified Paths:
--------------
trunk/src/org/sbfc/converter/sbml2sbml/URL2URN.java
trunk/src/org/sbfc/converter/sbml2sbml/URN2URL.java
Modified: trunk/src/org/sbfc/converter/sbml2sbml/URL2URN.java
===================================================================
--- trunk/src/org/sbfc/converter/sbml2sbml/URL2URN.java 2016-02-05 14:19:31 UTC (rev 621)
+++ trunk/src/org/sbfc/converter/sbml2sbml/URL2URN.java 2016-02-05 15:06:27 UTC (rev 622)
@@ -7,7 +7,7 @@
* Please visit <http://sbfc.sf.net> to have more information about
* SBFC.
*
- * Copyright (c) 2010-2015 jointly by the following organizations:
+ * Copyright (c) 2010-2016 jointly by the following organizations:
* 1. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK
* 2. The Babraham Institute, Cambridge, UK
* 3. Department of Bioinformatics, BiGCaT, Maastricht University
@@ -24,20 +24,12 @@
*/
package org.sbfc.converter.sbml2sbml;
-
-
-import javax.xml.stream.XMLStreamException;
-
import org.sbfc.converter.GeneralConverter;
import org.sbfc.converter.exceptions.ConversionException;
import org.sbfc.converter.exceptions.ReadModelException;
-import org.sbfc.converter.exceptions.WriteModelException;
import org.sbfc.converter.models.GeneralModel;
import org.sbfc.converter.models.SBMLModel;
import org.sbml.jsbml.SBMLDocument;
-import org.sbml.jsbml.SBMLException;
-import org.sbml.jsbml.xml.stax.SBMLReader;
-import org.sbml.jsbml.xml.stax.SBMLWriter;
/**
@@ -59,52 +51,13 @@
}
inputModel = model;
SBMLModel sbmlModel = (SBMLModel) model;
- String currentSBML;
- try {
- currentSBML = sbmlModel.modelToString();
- } catch (WriteModelException e2) {
- e2.printStackTrace();
- return null;
- }
-
- // Code using jSBML directly
- SBMLReader SBMLReader = new SBMLReader();
- SBMLDocument SBMLdoc;
- try {
- SBMLdoc = SBMLReader.readSBMLFromString(currentSBML);
- } catch (XMLStreamException e1) {
- System.out.println("URL2URN : cannot read SBML from string, using JSBML.");
- e1.printStackTrace();
- return null;
- }
+ SBMLDocument SBMLdoc = sbmlModel.getSBMLDocument();
System.out.println("URL2URN : trying to convert annotation from identifiers.org URL to Miriam URN");
SBMLDocument targetSBMLdoc = IdentifiersUtil.urlToUrn(SBMLdoc);
-
- SBMLWriter SBMLWriter = new SBMLWriter();
- String targetSBML;
- try {
- targetSBML = SBMLWriter.writeSBMLToString(targetSBMLdoc);
- } catch (SBMLException e1) {
- System.out.println("URL2URN : the model you are trying to write is not in SBML format.");
- e1.printStackTrace();
- return null;
- } catch (XMLStreamException e1) {
- System.out.println("URL2URN : cannot read SBML from string, using JSBML.");
- e1.printStackTrace();
- return null;
- }
- System.out.println("URL2URN : converted model : \n" + targetSBML.substring(0, 150));
-
- SBMLModel targetModel = new SBMLModel();
- try {
- targetModel.modelFromString(targetSBML);
- return targetModel;
- } catch (ReadModelException e) {
- e.printStackTrace();
- return null;
- }
-
+
+ SBMLModel targetModel = new SBMLModel(targetSBMLdoc);
+ return targetModel;
}
@Override
Modified: trunk/src/org/sbfc/converter/sbml2sbml/URN2URL.java
===================================================================
--- trunk/src/org/sbfc/converter/sbml2sbml/URN2URL.java 2016-02-05 14:19:31 UTC (rev 621)
+++ trunk/src/org/sbfc/converter/sbml2sbml/URN2URL.java 2016-02-05 15:06:27 UTC (rev 622)
@@ -7,7 +7,7 @@
* Please visit <http://sbfc.sf.net> to have more information about
* SBFC.
*
- * Copyright (c) 2010-2015 jointly by the following organizations:
+ * Copyright (c) 2010-2016 jointly by the following organizations:
* 1. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK
* 2. The Babraham Institute, Cambridge, UK
* 3. Department of Bioinformatics, BiGCaT, Maastricht University
@@ -24,18 +24,12 @@
*/
package org.sbfc.converter.sbml2sbml;
-import javax.xml.stream.XMLStreamException;
-
import org.sbfc.converter.GeneralConverter;
import org.sbfc.converter.exceptions.ConversionException;
import org.sbfc.converter.exceptions.ReadModelException;
-import org.sbfc.converter.exceptions.WriteModelException;
import org.sbfc.converter.models.GeneralModel;
import org.sbfc.converter.models.SBMLModel;
import org.sbml.jsbml.SBMLDocument;
-import org.sbml.jsbml.SBMLException;
-import org.sbml.jsbml.xml.stax.SBMLReader;
-import org.sbml.jsbml.xml.stax.SBMLWriter;
/**
@@ -57,52 +51,14 @@
}
inputModel = model;
SBMLModel sbmlModel = (SBMLModel) model;
- String currentSBML;
- try {
- currentSBML = sbmlModel.modelToString();
- } catch (WriteModelException e2) {
- e2.printStackTrace();
- return null;
- }
-
- // Code using jSBML directly
- SBMLReader SBMLReader = new SBMLReader();
- SBMLDocument SBMLdoc;
- try {
- SBMLdoc = SBMLReader.readSBMLFromString(currentSBML);
- } catch (XMLStreamException e1) {
- System.out.println("URN2URL : cannot read SBML from string, using JSBML.");
- e1.printStackTrace();
- return null;
- }
+ SBMLDocument SBMLdoc = sbmlModel.getSBMLDocument();
System.out.println("URN2URL : trying to convert annotation from Miriam URN to identifiers.org URL");
SBMLDocument targetSBMLdoc = IdentifiersUtil.urnToUrl(SBMLdoc);
- SBMLWriter SBMLWriter = new SBMLWriter();
- String targetSBML;
- try {
- targetSBML = SBMLWriter.writeSBMLToString(targetSBMLdoc);
- } catch (SBMLException e1) {
- System.out.println("URN2URL : the model you are trying to write is not in SBML format.");
- e1.printStackTrace();
- return null;
- } catch (XMLStreamException e1) {
- System.out.println("URN2URL : cannot read SBML from string, using JSBML.");
- e1.printStackTrace();
- return null;
- }
- System.out.println("URN2URL : converted model : \n" + targetSBML.substring(0, 150));
+ SBMLModel targetModel = new SBMLModel(targetSBMLdoc);
+ return targetModel;
- SBMLModel targetModel = new SBMLModel();
- try {
- targetModel.modelFromString(targetSBML);
- return targetModel;
- } catch (ReadModelException e) {
- e.printStackTrace();
- return null;
- }
-
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2016-02-05 14:19:33
|
Revision: 621
http://sourceforge.net/p/sbfc/code/621
Author: niko-rodrigue
Date: 2016-02-05 14:19:31 +0000 (Fri, 05 Feb 2016)
Log Message:
-----------
updated the sbfc jar file so that it contain the latest changes
Modified Paths:
--------------
trunk/lib/sbfc-1.3.6.jar
Modified: trunk/lib/sbfc-1.3.6.jar
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2016-02-05 13:54:52
|
Revision: 620
http://sourceforge.net/p/sbfc/code/620
Author: niko-rodrigue
Date: 2016-02-05 13:54:49 +0000 (Fri, 05 Feb 2016)
Log Message:
-----------
updated user manual to mention the new GUI in the how to use SBFC section + created a new method in ConvertGUI to help user to add the converter gui inside their application, this method return a new ConverterGui instance not yet visible and which does not exit on close
Modified Paths:
--------------
trunk/doc/sbfc_manual/sbfc_user_manual/download_and_installation.tex
trunk/doc/sbfc_manual/sbfc_user_manual/how_to_use_sbfc.tex
trunk/doc/sbfc_manual/sbfc_user_manual/more_about_sbfc.tex
trunk/doc/sbfc_manual/sbfc_user_manual.pdf
trunk/src/org/sbfc/converter/ConverterGUI.java
Added Paths:
-----------
trunk/doc/sbfc_manual/Makefile
Property Changed:
----------------
trunk/doc/sbfc_manual/
Index: trunk/doc/sbfc_manual
===================================================================
--- trunk/doc/sbfc_manual 2016-02-04 16:48:40 UTC (rev 619)
+++ trunk/doc/sbfc_manual 2016-02-05 13:54:49 UTC (rev 620)
Property changes on: trunk/doc/sbfc_manual
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,9 ##
+*.aux
+*.lof
+*.log
+*.out
+*.toc
+*.bbl
+*.blg
+*.ilg
+*.ind
Added: trunk/doc/sbfc_manual/Makefile
===================================================================
--- trunk/doc/sbfc_manual/Makefile (rev 0)
+++ trunk/doc/sbfc_manual/Makefile 2016-02-05 13:54:49 UTC (rev 620)
@@ -0,0 +1,21 @@
+
+all:
+
+ pdflatex sbfc_user_manual
+# pdflatex sbfc_user_manual
+# bibtex sbfc_user_manual
+# makeindex sbfc_user_manual
+# pdflatex sbfc_user_manual
+# pdflatex sbfc_user_manual
+# pdflatex sbfc_user_manual
+
+
+dev:
+
+ pdflatex sbfc_developer_manual
+# pdflatex sbfc_developer_manual
+# bibtex sbfc_developer_manual
+# makeindex sbfc_developer_manual
+# pdflatex sbfc_developer_manual
+# pdflatex sbfc_developer_manual
+# pdflatex sbfc_developer_manual
Modified: trunk/doc/sbfc_manual/sbfc_user_manual/download_and_installation.tex
===================================================================
--- trunk/doc/sbfc_manual/sbfc_user_manual/download_and_installation.tex 2016-02-04 16:48:40 UTC (rev 619)
+++ trunk/doc/sbfc_manual/sbfc_user_manual/download_and_installation.tex 2016-02-05 13:54:49 UTC (rev 620)
@@ -12,8 +12,8 @@
\subsection{Using SBFC as standalone package}
\label{subsec:Using SBFC alone}
-Download sbfc-x.y.z.zip or the specific converter of interest from the SBFC webpage in SourceForge. After downloading and uncompressing the package, you can put the extracted folder where you prefer. We suggest to create a folder containing the model you need to convert inside the SBFC folder.
+Download sbfc-x.y.z.zip or the specific converter of interest from the SBFC webpage in SourceForge. After downloading and uncompressing the package, you can put the extracted folder where you prefer. The sbfc folder contain some scripts that help you to launch conversion on the command line as well as a gui.
\subsection{Using SBFC within a program}
\label{subsec:Using SBFC within a program}
-Download sbfc-x.y.z.zip or the specific converter of interest from the SBFC web page in the SourceForge website. After downloading and uncompressing the package, you should put the file SBFC.jar in the library folder of your program and include this file in the program library path required for compilation. If you have downloaded the standalone version of SBFC, you do not need to do anything else. Otherwise, you should also install the dependencies libraries required by SBFC.
\ No newline at end of file
+Download sbfc-x.y.z.zip or the specific converter of interest from the SBFC web page in the SourceForge website. After downloading and uncompressing the package, you should put the file sbfc-x.y.z.jar in the library folder of your program and include this file in the program library path required for compilation. If you have downloaded the standalone version of SBFC (contain '-standalone' in the jar files), you do not need to do anything else. Otherwise, you should also install the dependencies libraries required by SBFC.
Modified: trunk/doc/sbfc_manual/sbfc_user_manual/how_to_use_sbfc.tex
===================================================================
--- trunk/doc/sbfc_manual/sbfc_user_manual/how_to_use_sbfc.tex 2016-02-04 16:48:40 UTC (rev 619)
+++ trunk/doc/sbfc_manual/sbfc_user_manual/how_to_use_sbfc.tex 2016-02-05 13:54:49 UTC (rev 620)
@@ -1,13 +1,13 @@
\section{How to use SBFC}
\label{sec:How to use SBFC}
-This section explains how to use the software SBFC, providing the user with some use case.
+This section explains how to use the software SBFC, providing the user with some use cases.
\subsection{Conversion using a console}
\label{subsec:Convert using a console}
After unpacking the file sbfc-x.y.z.zip, you will find several shell script files (.sh for Linux/OSX, .bat for windows). These file scripts are used for launching conversion jobs. To test the correct installation of SBFC, a set of {\bf model examples} is available in the folder {\it examples}:
\begin{itemize}
-\item examples\_SBML.xml : is a very simple model in SBML
-\item examples\_BioPAX.owl : is a very simple model in BioPAX
+\item examples/SBML.xml : is a very simple model in SBML
+\item examples/BioPAX.owl : is a very simple model in BioPAX
\end{itemize}
To retrieve the list of currently supported input models (Java Class names), run the command:
@@ -44,7 +44,7 @@
URL2URN
URN2URL
\end{lstlisting}
-For a detailed description of the available converters, please see Section \S\ref{sec:Overview of the available converters}.\\
+For a detailed description of the available converters, please see Section \ref{sec:Overview of the available converters}.\\
To convert a model file (or the models in a folder), run the command:
\begin{lstlisting}
@@ -64,7 +64,7 @@
\subsection{Conversion using Java}
\label{subsec:Convert using Java}
-To convert using Java directly in a terminal or in an IDE, you need to add all the jar files present in the {\it } folder to your CLASSPATH environment variable. Then you can:
+To convert using Java directly in a terminal or in an IDE, you need to add all the jar files present in the {\it } folder to your CLASSPATH environment variable or add only the sbfc-x.y.z-standalone.jar file that contains all needed dependencies. Then you can:
\begin{itemize}
\item run the Converter class located in the package org.sbfc.converter . In this case the general syntax is:
\begin{lstlisting}
@@ -74,15 +74,42 @@
\begin{lstlisting}
java org.sbfc.converter.Converter SBMLModel SBML2Octave examples/example/SBML.xml
\end{lstlisting}
-\item Alternatively, invoke one of the two following methods in the Converter class from your code directly:
+\item Alternatively, invoke one of the three following methods in the Converter class from your code directly:
\begin{lstlisting}
/* Input model given as a string */
-public static String ConvertFromString([InputModelClassName] [ConverterClassName] [ModelString])
-/* Input model given as a file */
-public static String ConvertFromFile([InputModelClassName] [ConverterClassName] [FilePath])
+public static String ConvertFromString([InputModelClassName], [ConverterClassName], [ModelString])
+/* Input model given as a file, output file path generated automatically */
+public static String ConvertFromFile([InputModelClassName], [ConverterClassName], [InputFilePath])
+/* Input model given as a file, output file path specified */
+public static String ConvertFromFile([InputModelClassName], [ConverterClassName], [InputFilePath], [OutputFilePath])
\end{lstlisting}
\end{itemize}
\subsection{Conversion using a GUI}
\label{subsec:ConvertGUI}
+
+If you don't need to convert a large number of files then instead of using directly the command line or some scripts, you
+can launch some conversion using a simple GUI:
+
+\begin{itemize}
+\item run the ConverterGUI class located in the package org.sbfc.converter . In this case the general syntax is:
+\begin{lstlisting}
+java -jar sbfc-x.y.z-standalone.jar org.sbfc.converter.ConverterGUI
+\end{lstlisting}
+
+If your system is configured to execute jar files, you can also double click on the sbfc-x.y.z-standalone.jar from a file
+explorer directly to start the gui.
+
+Once the gui open, you have to specify your input file and the converter you want to use. Optionaly you
+can specify an output file. If you don't specify one, an automatic output file path will be generated
+automatically, it will be located on the same folder as the input file.
+Then you just need to click on the 'Convert' button to start the conversion. If you let the 'open output file' checkbox
+selected, at the end of the conversion a new window will open showing the content of the output file. If you unchecked the
+checkbox, you will get a small dialog window to tell you once the conversion is done.
+
+\item Alternatively, invoke the following method in the ConverterGUI class from your code directly:
+\begin{lstlisting}
+ConverterGUI.getConverterGuiInstance().setVisible(true);
+\end{lstlisting}
+\end{itemize}
Modified: trunk/doc/sbfc_manual/sbfc_user_manual/more_about_sbfc.tex
===================================================================
--- trunk/doc/sbfc_manual/sbfc_user_manual/more_about_sbfc.tex 2016-02-04 16:48:40 UTC (rev 619)
+++ trunk/doc/sbfc_manual/sbfc_user_manual/more_about_sbfc.tex 2016-02-05 13:54:49 UTC (rev 620)
@@ -23,7 +23,7 @@
\end{itemize}
\begin{figure*}[tb]
-\centerline{\includegraphics[width=350pt]{../publication/BMC-Bioinformatics-2015/graphics/uml_class_diagram_converterLink_bn.png}}
+\centerline{\includegraphics[width=350pt]{../images/uml_class_diagram_converterLink_bn.png}}
\caption[UML class diagram shows how to use the class {\it ConverterLink}.]{UML class diagram shows how to use the class {\it ConverterLink}.}
\label{fig:UML class diagram for ConverterLink}
\end{figure*}
@@ -83,4 +83,4 @@
\label{subsec:Need another converter?}
If you need a converter not currently implemented in SBFC, you can request it using the Sourceforge project tracker in {\it Feature Request} in the SBFC page: \\
\href{https://sourceforge.net/p/sbfc/feature-requests/}{https://sourceforge.net/p/sbfc/feature-requests/}.\\
-Alternatively, you can develop it and submit it to the project. To find out more details about how to develop a new converter, please refer to the Developer Manual.
\ No newline at end of file
+Alternatively, you can develop it and submit it to the project. To find out more details about how to develop a new converter, please refer to the Developer Manual.
Modified: trunk/doc/sbfc_manual/sbfc_user_manual.pdf
===================================================================
(Binary files differ)
Modified: trunk/src/org/sbfc/converter/ConverterGUI.java
===================================================================
--- trunk/src/org/sbfc/converter/ConverterGUI.java 2016-02-04 16:48:40 UTC (rev 619)
+++ trunk/src/org/sbfc/converter/ConverterGUI.java 2016-02-05 13:54:49 UTC (rev 620)
@@ -25,6 +25,7 @@
package org.sbfc.converter;
+import java.awt.Component;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
@@ -45,12 +46,14 @@
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;
+import javax.swing.JLayeredPane;
import javax.swing.JList;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
+import javax.swing.JRootPane;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
@@ -226,9 +229,8 @@
converterClassNames.add(converterClassSimpleName);
addDisplayName(converterDisplayNames, converterClassSimpleName);
- System.out.println(instance.getName());
- System.out.println(instance.getDescription());
- System.out.println(instance.getHtmlDescription());
+ //System.out.println(instance.getName());
+ //System.out.println(instance.getDescription());
}
catch (InstantiationException e) {}
catch (IllegalAccessException e) {}
@@ -457,6 +459,40 @@
gui.pack();
gui.setVisible(true);
+ }
+
+ /**
+ * Creates and returns a new ConverterGui instance initialized and
+ * setup so that it does not exit on close. Once you want to display it, you just need
+ * to call the {@link JFrame#setVisible(true)} method.
+ *
+ * @return a new ConverterGui instance
+ */
+ public static ConverterGUI getConverterGuiInstance() {
+ final ConverterGUI gui = new ConverterGUI();
+ gui.setDefaultCloseOperation(HIDE_ON_CLOSE);
+
+ // getting the files menu and removing the exit menuitem
+ JPanel panel = (JPanel) ((JLayeredPane) ((JRootPane) gui.getComponent(0)).getComponent(1)).getComponent(0);
+
+ JMenu filesMenu = (JMenu) ((JMenuBar) panel.getComponent(0)).getComponent(0);
+ filesMenu.remove(0);
+
+ // adding a new menuitem to close the windows without exiting the application
+ JMenuItem closeMenuItem = new JMenuItem(new AbstractAction("Close") {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ gui.setVisible(false);
+ }
+ });
+ filesMenu.add(closeMenuItem);
+
+
+ gui.setMinimumSize(new Dimension(600, 300));
+ gui.setResizable(false);
+ gui.pack();
+
+ return gui;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2016-02-04 16:48:43
|
Revision: 619
http://sourceforge.net/p/sbfc/code/619
Author: niko-rodrigue
Date: 2016-02-04 16:48:40 +0000 (Thu, 04 Feb 2016)
Log Message:
-----------
changed the 'big jar' name to sbfc-x.y.z-standalone.jar + updated the Converter class to be able to specify the output file name of a conversion + update on the gui
Modified Paths:
--------------
trunk/build.xml
trunk/lib/sbfc-1.3.6.jar
trunk/src/org/sbfc/converter/Converter.java
trunk/src/org/sbfc/converter/ConverterGUI.java
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2016-02-04 16:44:21 UTC (rev 618)
+++ trunk/build.xml 2016-02-04 16:48:40 UTC (rev 619)
@@ -242,7 +242,7 @@
<jar
- jarfile="${dist.dir}/${name}-${version}-with-dependencies.jar"
+ jarfile="${dist.dir}/${name}-${version}-standalone.jar"
duplicate="preserve"
index="true"
>
@@ -309,7 +309,7 @@
<copy todir="${dist.dir}">
- <fileset dir="${basedir}/" includes="LICENSE.txt NEWS.txt README *.sh *.bat src/**/*.properties src/**/*.xml log4j.properties build.x miriam.xml">
+ <fileset dir="${basedir}/" includes="LICENSE.txt NEWS.txt README *.sh *.bat examples/** src/**/*.properties src/**/*.xml log4j.properties build.x miriam.xml">
</fileset>
</copy>
<chmod dir="${dist.dir}" perm="ugo+rx" includes="*.sh"/>
Modified: trunk/lib/sbfc-1.3.6.jar
===================================================================
(Binary files differ)
Modified: trunk/src/org/sbfc/converter/Converter.java
===================================================================
--- trunk/src/org/sbfc/converter/Converter.java 2016-02-04 16:44:21 UTC (rev 618)
+++ trunk/src/org/sbfc/converter/Converter.java 2016-02-04 16:48:40 UTC (rev 619)
@@ -7,7 +7,7 @@
* Please visit <http://sbfc.sf.net> to have more information about
* SBFC.
*
- * Copyright (c) 2010-2015 jointly by the following organizations:
+ * Copyright (c) 2010-2016 jointly by the following organizations:
* 1. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK
* 2. The Babraham Institute, Cambridge, UK
* 3. Department of Bioinformatics, BiGCaT, Maastricht University
@@ -118,18 +118,31 @@
}
/**
- * @param inputModelType
- * @param converterType
- * @param inputFileName
- * @return
+ * Converts the input file using the provided model and converter classes.
+ *
+ * @param inputModelType the className of the input model
+ * @param converterType the className of the converter to use
+ * @param inputFileName the path to the input file
+ * @return the path of the output file
*/
public static String convertFromFile(String inputModelType, String converterType, String inputFileName) {
-// String retModel = null;
+ return convertFromFile(inputModelType, converterType, inputFileName, null);
+
+ }
+
+ /**
+ * Converts the input file using the provided model and converter classes.
+ *
+ * @param inputModelType the className of the input model
+ * @param converterType the className of the converter to use
+ * @param inputFileName the path to the input file
+ * @param outputFileName the path of the output file (create one automatically if null is passed)
+ * @return the path of the output file
+ */
+ public static String convertFromFile(String inputModelType, String converterType, String inputFileName, String outputFileName) {
+
//Let's instantiate the proper Converter
- /*
- Class[] convertTypes;
- Class classConvert=null;*/
Map<String, String> converterOptions = new HashMap<String, String>();
converterOptions.put("save.result", "yes");
@@ -180,11 +193,14 @@
GeneralModel result = converter.convert(inputModel);
if (converterOptions.get("save.result").equals("yes")) {
- //Creating the OutputFile
- int pos = inputFileName.lastIndexOf(".");
- String outputFileName = inputFileName.substring(0,pos) + converter.getResultExtension();
- result.modelToFile(outputFileName);
- return outputFileName;
+ //Creating the OutputFile
+
+ if (outputFileName == null || outputFileName.trim().length() == 0) {
+ int pos = inputFileName.lastIndexOf(".");
+ outputFileName = inputFileName.substring(0,pos) + converter.getResultExtension();
+ }
+ result.modelToFile(outputFileName);
+ return outputFileName;
}
} catch (Exception e) {
@@ -224,24 +240,20 @@
- public static String convertFromString(String inputModelType, String converterType, String modelString) {
+ /**
+ * Converts the input String using the provided model and converter classes.
+ *
+ * @param inputModelType the className of the input model
+ * @param converterType the className of the converter to use
+ * @param modelInputString the content of the input model as a String
+ * @return a String representing the result of the conversion
+ */
+ public static String convertFromString(String inputModelType, String converterType, String modelInputString) {
String retModel = null;
//Let's instantiate the proper Converter
- /*
- Class[] convertTypes;
- Class classConvert=null;*/
+
try {
- /*//Let's get all available Classes in models
- ClassDigger digger = new ClassDigger();
- convertTypes = digger.digPackage(convertPackage);
-
- //Choosing the right Model to instantiate
- for(Class convertClass: convertTypes) {
- if(convertClass.getName().endsWith(converterType)) {
- classConvert = convertClass;
- }
- }*/
Map<String, String> converterOptions = new HashMap<String, String>();
converterOptions.put("save.result", "yes");
@@ -255,26 +267,10 @@
//Instantiating the converter
GeneralConverter converter = (GeneralConverter) Class.forName(converterPackage+"."+converterType).newInstance();
- /*
- Class[] modelTypes;
- Class inputClassModel=null;
-
-
- //Let's get all available Classes in models
- modelTypes = digger.digPackage(modelPackage);
-
-
- //Choosing the right Model to instantiate
- for(Class modelClass: modelTypes) {
- if(modelClass.getName().compareTo(modelPackage+"."+inputModelType) == 0) {
- inputClassModel = modelClass;
- }
- }*/
-
String modelPackage = "org.sbfc.converter.models";
//Instantiating the inputModel
GeneralModel inputModel = (GeneralModel) Class.forName(modelPackage+"."+inputModelType).newInstance();
- inputModel.setModelFromString(modelString);
+ inputModel.setModelFromString(modelInputString);
//Converting the Model
GeneralModel result = converter.convert(inputModel);
@@ -286,6 +282,9 @@
return retModel;
}
+ /**
+ * @param args
+ */
public static void main(String args[]) {
if(args.length < 3) {
// TODO : Allow to do several conversion at the same time ?
Modified: trunk/src/org/sbfc/converter/ConverterGUI.java
===================================================================
--- trunk/src/org/sbfc/converter/ConverterGUI.java 2016-02-04 16:44:21 UTC (rev 618)
+++ trunk/src/org/sbfc/converter/ConverterGUI.java 2016-02-04 16:48:40 UTC (rev 619)
@@ -25,7 +25,6 @@
package org.sbfc.converter;
-import java.awt.Desktop;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
@@ -42,6 +41,7 @@
import javax.swing.AbstractAction;
import javax.swing.JButton;
+import javax.swing.JCheckBox;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;
@@ -75,11 +75,19 @@
/**
*
*/
- JTextField inputFileTextField = new JTextField(30);
+ JTextField inputFileTextField = new JTextField(40);
/**
*
*/
JButton inputFileButton;
+ /**
+ *
+ */
+ JFileChooser outputFileChooser = new JFileChooser();
+ /**
+ *
+ */
+ JTextField outputFileTextField = new JTextField(40);
/**
*
@@ -115,7 +123,7 @@
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
final JPanel jpanel = new JPanel();
- add(jpanel);
+ setContentPane(jpanel); // add(jpanel);
jpanel.setLayout(new GridBagLayout());
// creates a constraints object
@@ -158,7 +166,6 @@
JMenuItem aboutMenuItem = new JMenuItem(new AbstractAction("About") {
@Override
public void actionPerformed(ActionEvent e) {
- //JOptionPane.showMessageDialog(jpanel, "Helper GUI to launch one or several conversions.");
new AboutDialog(application);
}
});
@@ -172,14 +179,13 @@
c.fill = GridBagConstraints.HORIZONTAL;
jpanel.add(inputFileTextField, c);
- AbstractAction inputAction = new AbstractAction("...") {
+ AbstractAction inputAction = new AbstractAction("...") { // TODO - reset the output file name if present
// This method is called when the button is pressed
public void actionPerformed(ActionEvent evt) {
// Perform action...
int r = inputFileChooser.showOpenDialog(new JFrame());
if (r == JFileChooser.APPROVE_OPTION) {
String name = inputFileChooser.getSelectedFile().getName();
- System.out.println("Input file name = '" + name + "'");
inputFileTextField.setText(inputFileChooser.getSelectedFile().getAbsolutePath());
}
}
@@ -198,7 +204,7 @@
c.ipadx = 10; // increases components width by 10 pixels
c.ipady = 0; // increases components height by 10 pixels
- jpanel.add(new JLabel("Select the converter to use"), c);
+ jpanel.add(new JLabel("Select the converter to use"), c); // TODO - reset the output file name if present
final ArrayList<String> converterClassNames = new ArrayList<String>();
final ArrayList<GeneralConverter> converterInstances = new ArrayList<GeneralConverter>();
@@ -277,9 +283,50 @@
jpanel.add(jList, c);
- // launch conversion button.
+ // Output file row
+ c.gridx = 0; // column 0
+ c.gridy = 3; // row 3
+ jpanel.add(new JLabel("Select output file"), c);
+
c.gridx = 1; // column 1
- c.gridy = 3; // row 2
+ c.ipadx = 300; // increases components width by 300 pixels
+ c.fill = GridBagConstraints.HORIZONTAL;
+ jpanel.add(outputFileTextField, c);
+
+ AbstractAction outputAction = new AbstractAction("...") {
+ // This method is called when the button is pressed
+ public void actionPerformed(ActionEvent evt) {
+ // Perform action...
+ int r = outputFileChooser.showOpenDialog(new JFrame());
+ if (r == JFileChooser.APPROVE_OPTION) {
+ String name = outputFileChooser.getSelectedFile().getName();
+ outputFileTextField.setText(outputFileChooser.getSelectedFile().getAbsolutePath());
+ }
+ }
+ };
+
+ c.fill = GridBagConstraints.NONE;
+ c.gridx = 2; // column 2
+ c.ipadx = 0; // increases components width by 0 pixels
+ JButton outputFileButton = new JButton(outputAction);
+ outputFileButton.setToolTipText("Open a file chooser dialog to select the output file");
+ jpanel.add(outputFileButton, c);
+
+ // open output file row
+ c.gridx = 0; // column 0
+ c.gridy = 4; // row 4
+ jpanel.add(new JLabel("Open output file"), c);
+
+ c.gridx = 1; // column 1
+ final JCheckBox openOutputCheckBox = new JCheckBox();
+ openOutputCheckBox.setSelected(true);
+ openOutputCheckBox.setToolTipText("If this checkbox is selected, the content of the ouput file will be displayed in a new window if the conversion is successful.");
+ jpanel.add(openOutputCheckBox, c);
+
+
+ // launch conversion button row.
+ c.gridx = 1; // column 1
+ c.gridy = 5; // row 5
c.insets = new Insets(10, 10, 10, 10); // insets for all components
c.anchor = GridBagConstraints.CENTER;
@@ -287,14 +334,14 @@
// This method is called when the button is pressed
public void actionPerformed(ActionEvent evt) {
// Perform action...
- String name = inputFileTextField.getText();
+ String inputFileName = inputFileTextField.getText();
- if (name == null || name.trim().length() == 0 || !(new File(name).exists())) {
+ if (inputFileName == null || inputFileName.trim().length() == 0 || !(new File(inputFileName).exists())) {
JOptionPane.showMessageDialog(null, "Please, select an input file first.");
return;
}
- System.out.println("Input file name = '" + name + "'");
+ System.out.println("Input file name = '" + inputFileName + "'");
int converterIndex = jList.getSelectedIndex();
@@ -312,18 +359,23 @@
inputModelType = "BioPAXModel";
}
- // GeneralConverter converter = converterInstances.get(converterIndex);
+ //GeneralConverter converter = converterInstances.get(converterIndex);
- String outputFileName = Converter.convertFromFile(inputModelType, converterClassNames.get(converterIndex), name);
+ String outputFileName = Converter.convertFromFile(inputModelType, converterClassNames.get(converterIndex), inputFileName, outputFileTextField.getText());
- if (outputFileName != null) {
+ if (outputFileName != null && openOutputCheckBox.isSelected()) {
System.out.println("\nOutput file: " + outputFileName);
- // System.err.println("\nOutput file: " + outputFileName);
displayFileinNewWindow(outputFileName);
- statusPanel.setText("Conversion file : " + outputFileName);
+ statusPanel.setText("Conversion succesfull and result saved on file : " + outputFileName);
+ } else if (outputFileName != null ) {
+ statusPanel.setText("Conversion succesfull and result saved on file : " + outputFileName);
+ JOptionPane.showMessageDialog(null, "Conversion succesfull and result saved on file: \n" + outputFileName);
} else {
+ int pos = inputFileName.lastIndexOf(".");
+ String errorFileName = inputFileName.substring(0,pos) + ".errorLog";
statusPanel.setText("Conversion FAILED!");
+ JOptionPane.showMessageDialog(null, "Conversion failed ! Check the sbfc-gui.log or \n" + errorFileName + " files for errors.");
}
}
@@ -332,11 +384,14 @@
launchButton = new JButton(launchAction);
jpanel.add(launchButton, c);
- c.gridx = 1; // column 1
- c.gridy = 1; // row 1
+ c.gridx = 0; // column 1
+ c.gridy = 6; // row 6
+ c.gridwidth = 3;
c.ipadx = 10; // increases components width by 10 pixels
- c.anchor = GridBagConstraints.SOUTH;
+ c.anchor = GridBagConstraints.WEST;
+ c.fill = GridBagConstraints.HORIZONTAL;
statusPanel = new StatusPanel();
+ statusPanel.setText("Status bar");
jpanel.add(statusPanel, c);
}
@@ -363,7 +418,7 @@
{
try {
String outputFileContent = readFile(outputFileName, Charset.forName("UTF-8"));
- JFrame outputFileJFrame = new JFrame(outputFileName);
+ JFrame outputFileJFrame = new JFrame("Conversion result saved on file : " + outputFileName);
JTextArea outputFileTA = new JTextArea(outputFileContent);
outputFileTA.setEditable(false);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2016-02-04 16:44:23
|
Revision: 618
http://sourceforge.net/p/sbfc/code/618
Author: niko-rodrigue
Date: 2016-02-04 16:44:21 +0000 (Thu, 04 Feb 2016)
Log Message:
-----------
changed the label into a text field in the status panel to allow the selection of text inside it.
Modified Paths:
--------------
trunk/src/org/sbfc/converter/gui/StatusPanel.java
Modified: trunk/src/org/sbfc/converter/gui/StatusPanel.java
===================================================================
--- trunk/src/org/sbfc/converter/gui/StatusPanel.java 2016-02-04 16:38:58 UTC (rev 617)
+++ trunk/src/org/sbfc/converter/gui/StatusPanel.java 2016-02-04 16:44:21 UTC (rev 618)
@@ -25,9 +25,13 @@
package org.sbfc.converter.gui;
import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Font;
+
import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JPanel;
+import javax.swing.JTextField;
import javax.swing.border.BevelBorder;
@@ -42,7 +46,7 @@
private static final long serialVersionUID = -1073513153341532991L;
/** The textLabel. */
- private JLabel textLabel = new JLabel(" ",JLabel.LEFT);
+ private JTextField textLabel = new JTextField(85);
/**
* Instantiates a new status panel.
@@ -51,6 +55,9 @@
setLayout(new BorderLayout());
add(textLabel,BorderLayout.WEST);
setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
+ textLabel.setBackground(null);
+ textLabel.setEditable(false);
+ textLabel.setFont(getFont().deriveFont(Font.BOLD));
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2016-02-04 16:39:01
|
Revision: 617
http://sourceforge.net/p/sbfc/code/617
Author: niko-rodrigue
Date: 2016-02-04 16:38:58 +0000 (Thu, 04 Feb 2016)
Log Message:
-----------
small improvments to the user manual + added the simple example files that we talked about in the manual
Modified Paths:
--------------
trunk/doc/sbfc_manual/sbfc_user_manual/how_to_use_sbfc.tex
Added Paths:
-----------
trunk/examples/BioPAX.owl
trunk/examples/SBML.xml
Modified: trunk/doc/sbfc_manual/sbfc_user_manual/how_to_use_sbfc.tex
===================================================================
--- trunk/doc/sbfc_manual/sbfc_user_manual/how_to_use_sbfc.tex 2016-02-04 16:36:18 UTC (rev 616)
+++ trunk/doc/sbfc_manual/sbfc_user_manual/how_to_use_sbfc.tex 2016-02-04 16:38:58 UTC (rev 617)
@@ -4,15 +4,15 @@
\subsection{Conversion using a console}
\label{subsec:Convert using a console}
-After unpacking the file sbfc-x.y.z.tar.gz, you will find several shell script files (.sh). These file scripts are used for launching conversion jobs. To test the correct installation of SBFC, a set of {\bf model examples} is available in the folder {\it examples}:
+After unpacking the file sbfc-x.y.z.zip, you will find several shell script files (.sh for Linux/OSX, .bat for windows). These file scripts are used for launching conversion jobs. To test the correct installation of SBFC, a set of {\bf model examples} is available in the folder {\it examples}:
\begin{itemize}
-\item example\_SBML.xml : is a very simple model in SBML
-\item example\_BioPAX.owl : is a very simple model in BioPAX
+\item examples\_SBML.xml : is a very simple model in SBML
+\item examples\_BioPAX.owl : is a very simple model in BioPAX
\end{itemize}
-To retrieve the list of currently supported converters (Java Class names), run the command:
+To retrieve the list of currently supported input models (Java Class names), run the command:
\begin{lstlisting}
-./sbfModelList.sh
+./sbfModelList.sh (sbfModelList.bat under windows)
# Example of output
APMModel
@@ -25,15 +25,14 @@
XPPModel
\end{lstlisting}
-To retrieve the list of the currently supported input models (Java Class names), run the command:
+To retrieve the list of the currently supported converters (Java Class names), run the command:
\begin{lstlisting}
-./sbfModelList.sh
+./sbfConverterList.sh (sbfConverterList.bat under windows)
# Example of output
Miriam registry file = Miriam.xml
BioPAXL3Converter
SBML2APM
-SBML2BioPAX
SBML2BioPAX_l2
SBML2BioPAX_l3
SBML2Dot
@@ -54,32 +53,36 @@
For instance, to convert an SBML model (e.g. SBML.xml) to an Octave model the command will be:
\begin{lstlisting}
-./sbfConverter.sh SBMLModel SBML2Octave examples/example/SBML.xml
+./sbfConverter.sh SBMLModel SBML2Octave examples/SBML.xml
\end{lstlisting}
A script file is also present for certain converters to simplify the command. To do the previous conversion, a user can also type the following command:
\begin{lstlisting}
-./sbml2octave.sh examples/example/SBML.xml
+./sbml2octave.sh examples/SBML.xml
\end{lstlisting}
\subsection{Conversion using Java}
\label{subsec:Convert using Java}
-To convert using Java directly, you can:
+To convert using Java directly in a terminal or in an IDE, you need to add all the jar files present in the {\it } folder to your CLASSPATH environment variable. Then you can:
\begin{itemize}
-\item run the Converter class located in /org/sbfc/converter/ . In this case the general syntax is:
+\item run the Converter class located in the package org.sbfc.converter . In this case the general syntax is:
\begin{lstlisting}
-java Converter [InputModelClassName] [ConverterClassName] [ModelFile]
+java org.sbfc.converter.Converter [InputModelClassName] [ConverterClassName] [ModelFile]
\end{lstlisting}
For instance:
\begin{lstlisting}
-java Converter SBMLModel SBML2Octave examples/example/SBML.xml
+java org.sbfc.converter.Converter SBMLModel SBML2Octave examples/example/SBML.xml
\end{lstlisting}
\item Alternatively, invoke one of the two following methods in the Converter class from your code directly:
\begin{lstlisting}
/* Input model given as a string */
public static String ConvertFromString([InputModelClassName] [ConverterClassName] [ModelString])
/* Input model given as a file */
-public static void ConvertFromFile([InputModelClassName] [ConverterClassName] [FilePath])
+public static String ConvertFromFile([InputModelClassName] [ConverterClassName] [FilePath])
\end{lstlisting}
-\end{itemize}
\ No newline at end of file
+\end{itemize}
+
+
+\subsection{Conversion using a GUI}
+\label{subsec:ConvertGUI}
Added: trunk/examples/BioPAX.owl
===================================================================
--- trunk/examples/BioPAX.owl (rev 0)
+++ trunk/examples/BioPAX.owl 2016-02-04 16:38:58 UTC (rev 617)
@@ -0,0 +1,242 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<rdf:RDF
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
+ xmlns:owl="http://www.w3.org/2002/07/owl#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:bp="http://www.biopax.org/release/biopax-level3.owl#">
+<owl:Ontology rdf:about="">
+ <owl:imports rdf:resource="http://www.biopax.org/release/biopax-level3.owl#" />
+</owl:Ontology>
+
+<bp:BiochemicalReaction rdf:about="id26">
+ <bp:right rdf:resource="f917f" />
+ <bp:right rdf:resource="da9a8" />
+ <bp:left rdf:resource="f9e19" />
+</bp:BiochemicalReaction>
+
+<bp:Catalysis rdf:about="id25">
+ <bp:controlled rdf:resource="id24" />
+ <bp:controller rdf:resource="f376f" />
+</bp:Catalysis>
+
+<bp:BiochemicalReaction rdf:about="id24">
+ <bp:right rdf:resource="a489f" />
+ <bp:left rdf:resource="da9a8" />
+</bp:BiochemicalReaction>
+
+<bp:BiochemicalReaction rdf:about="id23">
+ <bp:left rdf:resource="daafb" />
+</bp:BiochemicalReaction>
+
+<bp:Catalysis rdf:about="id22">
+ <bp:controlled rdf:resource="id21" />
+ <bp:controller rdf:resource="c7084" />
+</bp:Catalysis>
+
+<bp:BiochemicalReaction rdf:about="id21">
+ <bp:right rdf:resource="daafb" />
+ <bp:left rdf:resource="a489f" />
+</bp:BiochemicalReaction>
+
+<bp:RelationshipXref rdf:about="id20">
+ <bp:db rdf:datatype = "xsd:string">undefined</bp:db>
+ <bp:id rdf:datatype = "xsd:string">HMDB01532</bp:id>
+</bp:RelationshipXref>
+
+<bp:SmallMolecule rdf:about="d32e4">
+ <bp:displayName rdf:datatype = "xsd:string">Isocitric acid</bp:displayName>
+ <bp:entityReference rdf:resource="id13" />
+</bp:SmallMolecule>
+
+<bp:SmallMolecule rdf:about="f917f">
+ <bp:displayName rdf:datatype = "xsd:string">ADP</bp:displayName>
+ <bp:entityReference rdf:resource="id15" />
+</bp:SmallMolecule>
+
+<bp:PublicationXref rdf:about="fbe">
+ <bp:source rdf:datatype = "xsd:string">PLoS Biol</bp:source>
+ <bp:title rdf:datatype = "xsd:string">Finding the right questions: exploratory pathway analysis to enhance biological discovery in large datasets.</bp:title>
+ <bp:db rdf:datatype = "xsd:string">PubMed</bp:db>
+ <bp:author rdf:datatype = "xsd:string">Conklin BR</bp:author>
+ <bp:author rdf:datatype = "xsd:string">Evelo CT</bp:author>
+ <bp:author rdf:datatype = "xsd:string">Kelder T</bp:author>
+ <bp:author rdf:datatype = "xsd:string">Pico AR</bp:author>
+ <bp:year rdf:datatype = "xsd:int">2010</bp:year>
+ <bp:id rdf:datatype = "xsd:string">20824171</bp:id>
+</bp:PublicationXref>
+
+<bp:Protein rdf:about="c7084">
+ <bp:entityReference rdf:resource="id5" />
+ <bp:xref rdf:resource="fbe" />
+ <bp:displayName rdf:datatype = "xsd:string">BRCA1</bp:displayName>
+</bp:Protein>
+
+<bp:SmallMolecule rdf:about="a489f">
+ <bp:displayName rdf:datatype = "xsd:string">Substrate</bp:displayName>
+ <bp:entityReference rdf:resource="id3" />
+</bp:SmallMolecule>
+
+<bp:RelationshipXref rdf:about="id18">
+ <bp:db rdf:datatype = "xsd:string">undefined</bp:db>
+ <bp:id rdf:datatype = "xsd:string">843</bp:id>
+</bp:RelationshipXref>
+
+<bp:SmallMoleculeReference rdf:about="id19">
+ <bp:xref rdf:resource="id20" />
+</bp:SmallMoleculeReference>
+
+<bp:RelationshipXref rdf:about="id16">
+ <bp:db rdf:datatype = "xsd:string">undefined</bp:db>
+ <bp:id rdf:datatype = "xsd:string">HMDB01341</bp:id>
+</bp:RelationshipXref>
+
+<bp:ProteinReference rdf:about="id17">
+ <bp:xref rdf:resource="id18" />
+ <bp:organism rdf:resource="id2" />
+</bp:ProteinReference>
+
+<bp:SmallMolecule rdf:about="da9a8">
+ <bp:displayName rdf:datatype = "xsd:string">D-Glucose</bp:displayName>
+ <bp:entityReference rdf:resource="id7" />
+</bp:SmallMolecule>
+
+<bp:BioSource rdf:about="id2">
+ <bp:standardName rdf:datatype = "xsd:string">Homo sapiens</bp:standardName>
+</bp:BioSource>
+
+<bp:Protein rdf:about="a80da">
+ <bp:entityReference rdf:resource="id17" />
+ <bp:displayName rdf:datatype = "xsd:string">CASP10</bp:displayName>
+</bp:Protein>
+
+<bp:SmallMolecule rdf:about="daafb">
+ <bp:displayName rdf:datatype = "xsd:string">Product node</bp:displayName>
+ <bp:entityReference rdf:resource="id3" />
+</bp:SmallMolecule>
+
+<bp:Pathway rdf:about="http://www.wikipathways.org/index.php/Pathway:WP4">
+ <bp:comment rdf:datatype = "xsd:string">This is just one test pathway with a variety of object types including datanodes which can be connected to database entries (double-click on them when in edit mode). Feel free to edit anything on this page. (http://www.wikipathways.org/index.php/WikiPathways:License_Terms)</bp:comment>
+ <bp:comment rdf:datatype = "xsd:string">20160201000002 (BotTest)</bp:comment>
+ <bp:displayName rdf:datatype = "xsd:string">Sandbox Pathway</bp:displayName>
+ <bp:pathwayComponent rdf:resource="id28" />
+ <bp:pathwayComponent rdf:resource="id27" />
+ <bp:pathwayComponent rdf:resource="id21" />
+ <bp:pathwayComponent rdf:resource="id22" />
+ <bp:pathwayComponent rdf:resource="id25" />
+ <bp:pathwayComponent rdf:resource="id23" />
+ <bp:pathwayComponent rdf:resource="id24" />
+ <bp:pathwayComponent rdf:resource="id26" />
+ <bp:organism rdf:resource="id2" />
+</bp:Pathway>
+
+<bp:Protein rdf:about="d0619">
+ <bp:entityReference rdf:resource="id9" />
+ <bp:displayName rdf:datatype = "xsd:string">APC</bp:displayName>
+</bp:Protein>
+
+<bp:RelationshipXref rdf:about="id6">
+ <bp:db rdf:datatype = "xsd:string">undefined</bp:db>
+ <bp:id rdf:datatype = "xsd:string">ENSG00000012048</bp:id>
+</bp:RelationshipXref>
+
+<bp:ProteinReference rdf:about="id5">
+ <bp:xref rdf:resource="id6" />
+ <bp:organism rdf:resource="id2" />
+</bp:ProteinReference>
+
+<bp:Protein rdf:about="f376f">
+ <bp:entityReference rdf:resource="id11" />
+ <bp:displayName rdf:datatype = "xsd:string">TP53</bp:displayName>
+</bp:Protein>
+
+<bp:RelationshipXref rdf:about="id4">
+ <bp:db rdf:datatype = "xsd:string">undefined</bp:db>
+ <bp:id rdf:datatype = "xsd:string">undefined</bp:id>
+</bp:RelationshipXref>
+
+<bp:RelationshipXref rdf:about="id10">
+ <bp:db rdf:datatype = "xsd:string">undefined</bp:db>
+ <bp:id rdf:datatype = "xsd:string">ENSG00000134982</bp:id>
+</bp:RelationshipXref>
+
+<bp:SmallMoleculeReference rdf:about="id3">
+ <bp:xref rdf:resource="id4" />
+</bp:SmallMoleculeReference>
+
+<bp:ProteinReference rdf:about="id11">
+ <bp:xref rdf:resource="id12" />
+ <bp:organism rdf:resource="id2" />
+</bp:ProteinReference>
+
+<bp:RelationshipXref rdf:about="id12">
+ <bp:db rdf:datatype = "xsd:string">undefined</bp:db>
+ <bp:id rdf:datatype = "xsd:string">ENSG00000141510</bp:id>
+</bp:RelationshipXref>
+
+<bp:ProteinReference rdf:about="id9">
+ <bp:xref rdf:resource="id10" />
+ <bp:organism rdf:resource="id2" />
+</bp:ProteinReference>
+
+<bp:SmallMoleculeReference rdf:about="id13">
+ <bp:xref rdf:resource="id14" />
+</bp:SmallMoleculeReference>
+
+<bp:RelationshipXref rdf:about="id8">
+ <bp:db rdf:datatype = "xsd:string">undefined</bp:db>
+ <bp:id rdf:datatype = "xsd:string">HMDB00122</bp:id>
+</bp:RelationshipXref>
+
+<bp:RelationshipXref rdf:about="id14">
+ <bp:db rdf:datatype = "xsd:string">undefined</bp:db>
+ <bp:id rdf:datatype = "xsd:string">HMDB00193</bp:id>
+</bp:RelationshipXref>
+
+<bp:SmallMoleculeReference rdf:about="id7">
+ <bp:xref rdf:resource="id8" />
+</bp:SmallMoleculeReference>
+
+<bp:SmallMoleculeReference rdf:about="id15">
+ <bp:xref rdf:resource="id16" />
+</bp:SmallMoleculeReference>
+
+<bp:SmallMolecule rdf:about="f9e19">
+ <bp:displayName rdf:datatype = "xsd:string">2Isocitric acid</bp:displayName>
+ <bp:entityReference rdf:resource="id13" />
+</bp:SmallMolecule>
+
+<bp:Catalysis rdf:about="id27">
+ <bp:controlled rdf:resource="id26" />
+ <bp:controller rdf:resource="d6c00" />
+</bp:Catalysis>
+
+<bp:PublicationXref rdf:about="b25">
+ <bp:source rdf:datatype = "xsd:string">PLoS One</bp:source>
+ <bp:title rdf:datatype = "xsd:string">Mining biological pathways using WikiPathways web services.</bp:title>
+ <bp:db rdf:datatype = "xsd:string">PubMed</bp:db>
+ <bp:author rdf:datatype = "xsd:string">Conklin BR</bp:author>
+ <bp:author rdf:datatype = "xsd:string">van Iersel MP</bp:author>
+ <bp:author rdf:datatype = "xsd:string">Evelo C</bp:author>
+ <bp:author rdf:datatype = "xsd:string">Hanspers K</bp:author>
+ <bp:author rdf:datatype = "xsd:string">Kelder T</bp:author>
+ <bp:author rdf:datatype = "xsd:string">Pico AR</bp:author>
+ <bp:year rdf:datatype = "xsd:int">2009</bp:year>
+ <bp:id rdf:datatype = "xsd:string">19649250</bp:id>
+</bp:PublicationXref>
+
+<bp:BiochemicalReaction rdf:about="id28">
+ <bp:right rdf:resource="f9e19" />
+ <bp:left rdf:resource="d32e4" />
+</bp:BiochemicalReaction>
+
+<bp:Complex rdf:about="id29">
+ <bp:component rdf:resource="d0619" />
+ <bp:component rdf:resource="a80da" />
+ <bp:xref rdf:resource="b25" />
+</bp:Complex>
+
+<bp:SmallMolecule rdf:about="d6c00">
+ <bp:displayName rdf:datatype = "xsd:string">ATP</bp:displayName>
+ <bp:entityReference rdf:resource="id19" />
+</bp:SmallMolecule>
+</rdf:RDF>
Added: trunk/examples/SBML.xml
===================================================================
--- trunk/examples/SBML.xml (rev 0)
+++ trunk/examples/SBML.xml 2016-02-04 16:38:58 UTC (rev 617)
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sbml level="2" version="3" xmlns="http://www.sbml.org/sbml/level2/version3">
+ <model name="EnzymaticReaction">
+ <listOfUnitDefinitions>
+ <unitDefinition id="per_second">
+ <listOfUnits>
+ <unit kind="second" exponent="-1"/>
+ </listOfUnits>
+ </unitDefinition>
+ <unitDefinition id="litre_per_mole_per_second">
+ <listOfUnits>
+ <unit kind="mole" exponent="-1"/>
+ <unit kind="litre" exponent="1"/>
+ <unit kind="second" exponent="-1"/>
+ </listOfUnits>
+ </unitDefinition>
+ </listOfUnitDefinitions>
+ <listOfCompartments>
+ <compartment id="cytosol" size="1e-14"/>
+ </listOfCompartments>
+ <listOfSpecies>
+ <species compartment="cytosol" id="ES" initialAmount="0" name="ES"/>
+ <species compartment="cytosol" id="P" initialAmount="0" name="P"/>
+ <species compartment="cytosol" id="S" initialAmount="1e-20" name="S"/>
+ <species compartment="cytosol" id="E" initialAmount="5e-21" name="E"/>
+ </listOfSpecies>
+ <listOfReactions>
+ <reaction id="veq">
+ <listOfReactants>
+ <speciesReference species="E"/>
+ <speciesReference species="S"/>
+ </listOfReactants>
+ <listOfProducts>
+ <speciesReference species="ES"/>
+ </listOfProducts>
+ <kineticLaw>
+ <math xmlns="http://www.w3.org/1998/Math/MathML">
+ <apply>
+ <times/>
+ <ci>cytosol</ci>
+ <apply>
+ <minus/>
+ <apply>
+ <times/>
+ <ci>kon</ci>
+ <ci>E</ci>
+ <ci>S</ci>
+ </apply>
+ <apply>
+ <times/>
+ <ci>koff</ci>
+ <ci>ES</ci>
+ </apply>
+ </apply>
+ </apply>
+ </math>
+ <listOfParameters>
+ <parameter id="kon" value="1000000" units="litre_per_mole_per_second"/>
+ <parameter id="koff" value="0.2" units="per_second"/>
+ </listOfParameters>
+ </kineticLaw>
+ </reaction>
+ <reaction id="vcat" reversible="false">
+ <listOfReactants>
+ <speciesReference species="ES"/>
+ </listOfReactants>
+ <listOfProducts>
+ <speciesReference species="E"/>
+ <speciesReference species="P"/>
+ </listOfProducts>
+ <kineticLaw>
+ <math xmlns="http://www.w3.org/1998/Math/MathML">
+ <apply>
+ <times/>
+ <ci>cytosol</ci>
+ <ci>kcat</ci>
+ <ci>ES</ci>
+ </apply>
+ </math>
+ <listOfParameters>
+ <parameter id="kcat" value="0.1" units="per_second"/>
+ </listOfParameters>
+ </kineticLaw>
+ </reaction>
+ </listOfReactions>
+ </model>
+</sbml>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2016-02-04 16:36:20
|
Revision: 616
http://sourceforge.net/p/sbfc/code/616
Author: niko-rodrigue
Date: 2016-02-04 16:36:18 +0000 (Thu, 04 Feb 2016)
Log Message:
-----------
using the tidy SBMLWriter for SBMLModel to have better looking resulting xml + updated the version of jsbml used
Modified Paths:
--------------
trunk/lib/sbfc-1.3.6.jar
trunk/src/org/sbfc/converter/models/SBMLModel.java
Added Paths:
-----------
trunk/lib/jsbml-1.2-SNAPSHOT-20160204-with-dependencies.jar
trunk/lib/jsbml-tidy-1.1.jar
trunk/lib/jtidy-r938.jar
Removed Paths:
-------------
trunk/lib/jsbml-1.0-with-dependencies.jar
Deleted: trunk/lib/jsbml-1.0-with-dependencies.jar
===================================================================
(Binary files differ)
Added: trunk/lib/jsbml-1.2-SNAPSHOT-20160204-with-dependencies.jar
===================================================================
(Binary files differ)
Index: trunk/lib/jsbml-1.2-SNAPSHOT-20160204-with-dependencies.jar
===================================================================
--- trunk/lib/jsbml-1.2-SNAPSHOT-20160204-with-dependencies.jar 2016-02-03 13:32:09 UTC (rev 615)
+++ trunk/lib/jsbml-1.2-SNAPSHOT-20160204-with-dependencies.jar 2016-02-04 16:36:18 UTC (rev 616)
Property changes on: trunk/lib/jsbml-1.2-SNAPSHOT-20160204-with-dependencies.jar
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/lib/jsbml-tidy-1.1.jar
===================================================================
(Binary files differ)
Index: trunk/lib/jsbml-tidy-1.1.jar
===================================================================
--- trunk/lib/jsbml-tidy-1.1.jar 2016-02-03 13:32:09 UTC (rev 615)
+++ trunk/lib/jsbml-tidy-1.1.jar 2016-02-04 16:36:18 UTC (rev 616)
Property changes on: trunk/lib/jsbml-tidy-1.1.jar
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/lib/jtidy-r938.jar
===================================================================
(Binary files differ)
Index: trunk/lib/jtidy-r938.jar
===================================================================
--- trunk/lib/jtidy-r938.jar 2016-02-03 13:32:09 UTC (rev 615)
+++ trunk/lib/jtidy-r938.jar 2016-02-04 16:36:18 UTC (rev 616)
Property changes on: trunk/lib/jtidy-r938.jar
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: trunk/lib/sbfc-1.3.6.jar
===================================================================
(Binary files differ)
Modified: trunk/src/org/sbfc/converter/models/SBMLModel.java
===================================================================
--- trunk/src/org/sbfc/converter/models/SBMLModel.java 2016-02-03 13:32:09 UTC (rev 615)
+++ trunk/src/org/sbfc/converter/models/SBMLModel.java 2016-02-04 16:36:18 UTC (rev 616)
@@ -38,6 +38,7 @@
import org.sbml.jsbml.Model;
import org.sbml.jsbml.SBMLDocument;
import org.sbml.jsbml.SBMLException;
+import org.sbml.jsbml.TidySBMLWriter;
/**
@@ -98,7 +99,7 @@
public void modelToFile(String fileName) throws WriteModelException {
try {
- JSBML.writeSBML(document, fileName);
+ new TidySBMLWriter().writeSBMLToFile(document, fileName);
} catch (XMLStreamException e) {
throw new WriteModelException(e);
} catch (IOException e) {
@@ -108,7 +109,6 @@
}
}
-
public SBMLDocument modelFromFile(String fileName) throws ReadModelException {
try {
@@ -139,7 +139,7 @@
String reString =null;
try {
- reString = JSBML.writeSBMLToString(document);
+ reString = new TidySBMLWriter().writeSBMLToString(document);
} catch (XMLStreamException e) {
throw new WriteModelException(e);
} catch (SBMLException e) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pd...@us...> - 2016-02-03 13:32:11
|
Revision: 615
http://sourceforge.net/p/sbfc/code/615
Author: pdp10
Date: 2016-02-03 13:32:09 +0000 (Wed, 03 Feb 2016)
Log Message:
-----------
Now open a file in user home.
Modified Paths:
--------------
trunk/src/org/sbfc/converter/ConverterGUI.java
Modified: trunk/src/org/sbfc/converter/ConverterGUI.java
===================================================================
--- trunk/src/org/sbfc/converter/ConverterGUI.java 2016-02-03 13:19:58 UTC (rev 614)
+++ trunk/src/org/sbfc/converter/ConverterGUI.java 2016-02-03 13:32:09 UTC (rev 615)
@@ -142,7 +142,7 @@
});
filesMenu.add(exitMenuItem);
- inputFileChooser.setCurrentDirectory(new File("."));
+ inputFileChooser.setCurrentDirectory(new File(System.getProperty("user.home")));
inputFileChooser.setFileFilter(new javax.swing.filechooser.FileFilter() {
public boolean accept(File f) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pd...@us...> - 2016-02-03 13:20:01
|
Revision: 614
http://sourceforge.net/p/sbfc/code/614
Author: pdp10
Date: 2016-02-03 13:19:58 +0000 (Wed, 03 Feb 2016)
Log Message:
-----------
Added file header.
Modified Paths:
--------------
trunk/src/org/sbfc/converter/gui/AboutDialog.java
trunk/src/org/sbfc/converter/gui/StatusPanel.java
Modified: trunk/src/org/sbfc/converter/gui/AboutDialog.java
===================================================================
--- trunk/src/org/sbfc/converter/gui/AboutDialog.java 2016-02-03 13:19:22 UTC (rev 613)
+++ trunk/src/org/sbfc/converter/gui/AboutDialog.java 2016-02-03 13:19:58 UTC (rev 614)
@@ -1,3 +1,27 @@
+/*
+ * $Id: AboutDialog.java 612 2016-02-01 16:43:45Z pdp10 $
+ * $URL: svn+ssh://pdp10@svn.code.sf.net/p/sbfc/code/trunk/src/org/sbfc/converter/gui/AboutDialog.java $
+ *
+ * ==========================================================================
+ * This file is part of The System Biology Format Converter (SBFC).
+ * Please visit <http://sbfc.sf.net> to have more information about
+ * SBFC.
+ *
+ * Copyright (c) 2010-2016 jointly by the following organizations:
+ * 1. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK
+ * 2. The Babraham Institute, Cambridge, UK
+ * 3. Department of Bioinformatics, BiGCaT, Maastricht University
+ *
+ * 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. A copy of the license agreement is provided
+ * in the file named "LICENSE.txt" included with this software distribution
+ * and also available online as
+ * <http://sbfc.sf.net/mediawiki/index.php/License>.
+ *
+ * ==========================================================================
+ *
+ */
package org.sbfc.converter.gui;
import java.awt.BorderLayout;
@@ -42,10 +66,14 @@
container.add(aboutPanel,BorderLayout.SOUTH);
- setSize(650,280);
+ setSize(610,320);
setLocationRelativeTo(application);
setResizable(false);
setVisible(true);
}
+
+ public static void main(String[] args) {
+ new AboutDialog(null);
+ }
}
Modified: trunk/src/org/sbfc/converter/gui/StatusPanel.java
===================================================================
--- trunk/src/org/sbfc/converter/gui/StatusPanel.java 2016-02-03 13:19:22 UTC (rev 613)
+++ trunk/src/org/sbfc/converter/gui/StatusPanel.java 2016-02-03 13:19:58 UTC (rev 614)
@@ -1,3 +1,27 @@
+/*
+ * $Id: StatusPanel.java 612 2016-02-01 16:43:45Z pdp10 $
+ * $URL: svn+ssh://pdp10@svn.code.sf.net/p/sbfc/code/trunk/src/org/sbfc/converter/gui/StatusPanel.java $
+ *
+ * ==========================================================================
+ * This file is part of The System Biology Format Converter (SBFC).
+ * Please visit <http://sbfc.sf.net> to have more information about
+ * SBFC.
+ *
+ * Copyright (c) 2010-2016 jointly by the following organizations:
+ * 1. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK
+ * 2. The Babraham Institute, Cambridge, UK
+ * 3. Department of Bioinformatics, BiGCaT, Maastricht University
+ *
+ * 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. A copy of the license agreement is provided
+ * in the file named "LICENSE.txt" included with this software distribution
+ * and also available online as
+ * <http://sbfc.sf.net/mediawiki/index.php/License>.
+ *
+ * ==========================================================================
+ *
+ */
package org.sbfc.converter.gui;
import java.awt.BorderLayout;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pd...@us...> - 2016-02-03 13:19:25
|
Revision: 613
http://sourceforge.net/p/sbfc/code/613
Author: pdp10
Date: 2016-02-03 13:19:22 +0000 (Wed, 03 Feb 2016)
Log Message:
-----------
Added description text in About.
Modified Paths:
--------------
trunk/src/org/sbfc/converter/ConverterGUI.java
trunk/src/org/sbfc/converter/gui/SBFCTitlePanel.java
trunk/src/org/sbfc/converter/gui/SBFC_logo-small.png
Modified: trunk/src/org/sbfc/converter/ConverterGUI.java
===================================================================
--- trunk/src/org/sbfc/converter/ConverterGUI.java 2016-02-01 16:43:45 UTC (rev 612)
+++ trunk/src/org/sbfc/converter/ConverterGUI.java 2016-02-03 13:19:22 UTC (rev 613)
@@ -68,7 +68,7 @@
*/
public class ConverterGUI extends JFrame {
- /**
+/**
*
*/
JFileChooser inputFileChooser = new JFileChooser();
@@ -88,9 +88,11 @@
public static final String APPLICATION_NAME = "Systems Biology Format Converter";
+ public static final String APPLICATION_SHORTNAME = "SBFC";
+
public static final String VERSION = "1.3.6";
- public static final String WEBSITE = "http://sbfc.sourceforge.net/";
+ public static final String WEBSITE = "http://sbfc.sf.net/";
private ConverterGUI application;
Modified: trunk/src/org/sbfc/converter/gui/SBFCTitlePanel.java
===================================================================
--- trunk/src/org/sbfc/converter/gui/SBFCTitlePanel.java 2016-02-01 16:43:45 UTC (rev 612)
+++ trunk/src/org/sbfc/converter/gui/SBFCTitlePanel.java 2016-02-03 13:19:22 UTC (rev 613)
@@ -1,4 +1,27 @@
-
+/*
+ * $Id: SBFCTitlePanel.java 612 2016-02-01 16:43:45Z pdp10 $
+ * $URL: svn+ssh://pdp10@svn.code.sf.net/p/sbfc/code/trunk/src/org/sbfc/converter/gui/SBFCTitlePanel.java $
+ *
+ * ==========================================================================
+ * This file is part of The System Biology Format Converter (SBFC).
+ * Please visit <http://sbfc.sf.net> to have more information about
+ * SBFC.
+ *
+ * Copyright (c) 2010-2016 jointly by the following organizations:
+ * 1. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK
+ * 2. The Babraham Institute, Cambridge, UK
+ * 3. Department of Bioinformatics, BiGCaT, Maastricht University
+ *
+ * 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. A copy of the license agreement is provided
+ * in the file named "LICENSE.txt" included with this software distribution
+ * and also available online as
+ * <http://sbfc.sf.net/mediawiki/index.php/License>.
+ *
+ * ==========================================================================
+ *
+ */
package org.sbfc.converter.gui;
import java.awt.BorderLayout;
@@ -43,7 +66,7 @@
ClassLoader.getSystemResource("org/sbfc/converter/gui/SBFC_logo-small.png"));
JPanel logoPanel = new JPanel();
logoPanel.add(new JLabel("", logo, JLabel.CENTER));
- logoPanel.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
+ logoPanel.setBorder(BorderFactory.createEmptyBorder(32, 2, 2, 2));
add(logoPanel, BorderLayout.WEST);
JTextPane textPane = new JTextPane();
@@ -73,17 +96,30 @@
add(textPane, BorderLayout.CENTER);
try {
Document doc = textPane.getDocument();
- Style style = textPane.addStyle("Title", null);
- StyleConstants.setFontSize(style, 12);
+ Style styleTitle = textPane.addStyle("Title", null);
+ StyleConstants.setFontSize(styleTitle, 14);
+ StyleConstants.setBold(styleTitle, true);
+ Style styleText = textPane.addStyle("Text", null);
+ StyleConstants.setFontSize(styleText, 12);
+
doc.insertString(
+ doc.getLength(),
+ "\n\n" + ConverterGUI.APPLICATION_NAME + " (" + ConverterGUI.APPLICATION_SHORTNAME + ") " + ConverterGUI.VERSION + "\n\n",
+ styleTitle);
+
+ doc.insertString(
doc.getLength(),
- "\n\n\u00a9 Authors, 2015-16\n\n"
- + ConverterGUI.WEBSITE + "\n\n"
- + ConverterGUI.APPLICATION_NAME + " " + ConverterGUI.VERSION + " is a free software distributed under "
- + "the terms of the GNU Lesser General Public License (GNU LGPL v2).\n\n"
- + "This application uses the following third-party software libraries:\n"
- + "...",
- style);
+ "Website: " + ConverterGUI.WEBSITE + "\n\n"
+ + "Copyright \u00a9 2010-2016 jointly by the following organizations:\n"
+ + " 1. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK\n"
+ + " 2. The Babraham Institute, Cambridge, UK\n"
+ + " 3. Department of Bioinformatics, BiGCaT, Maastricht University, NL\n\n"
+ + "This library is free software; you can redistribute it and/or modify it\n"
+ + "under the terms of the GNU Lesser General Public License as published by\n"
+ + "the Free Software Foundation. A copy of the license agreement is provided\n"
+ + "in the file named LICENSE.txt included with this software distribution\n"
+ + "and also available online at http://sbfc.sf.net/mediawiki/index.php/License .",
+ styleText);
} catch (BadLocationException e) {
// send message to status bar?
Modified: trunk/src/org/sbfc/converter/gui/SBFC_logo-small.png
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pd...@us...> - 2016-02-01 16:43:47
|
Revision: 612
http://sourceforge.net/p/sbfc/code/612
Author: pdp10
Date: 2016-02-01 16:43:45 +0000 (Mon, 01 Feb 2016)
Log Message:
-----------
The StatusPanel is in ConverterGUI now. Not sure why it is not showing up though. I think it has to do with a wrong setting of GridBagLayout. Any idea?
Modified Paths:
--------------
trunk/src/org/sbfc/converter/ConverterGUI.java
Modified: trunk/src/org/sbfc/converter/ConverterGUI.java
===================================================================
--- trunk/src/org/sbfc/converter/ConverterGUI.java 2016-02-01 16:27:12 UTC (rev 611)
+++ trunk/src/org/sbfc/converter/ConverterGUI.java 2016-02-01 16:43:45 UTC (rev 612)
@@ -59,6 +59,7 @@
import javax.swing.event.ListDataListener;
import org.sbfc.converter.gui.AboutDialog;
+import org.sbfc.converter.gui.StatusPanel;
/**
@@ -78,12 +79,12 @@
/**
*
*/
- JButton inputFileButon;
+ JButton inputFileButton;
/**
*
*/
- JButton launchButon;
+ JButton launchButton;
public static final String APPLICATION_NAME = "Systems Biology Format Converter";
@@ -93,12 +94,14 @@
private ConverterGUI application;
+ private StatusPanel statusPanel;
+
/**
*
*/
public ConverterGUI() {
- super("SBFC Launcher");
+ super(APPLICATION_NAME);
application = this;
init();
}
@@ -183,9 +186,9 @@
c.fill = GridBagConstraints.NONE;
c.gridx = 2; // column 2
c.ipadx = 0; // increases components width by 0 pixels
- inputFileButon = new JButton(inputAction);
- inputFileButon.setToolTipText("Open a file chooser dialog to select the input file");
- jpanel.add(inputFileButon, c);
+ inputFileButton = new JButton(inputAction);
+ inputFileButton.setToolTipText("Open a file chooser dialog to select the input file");
+ jpanel.add(inputFileButton, c);
c.gridx = 0; // column 0
@@ -278,14 +281,14 @@
c.insets = new Insets(10, 10, 10, 10); // insets for all components
c.anchor = GridBagConstraints.CENTER;
- AbstractAction launchAction = new AbstractAction("Launch Conversion") {
+ AbstractAction launchAction = new AbstractAction("Convert") {
// This method is called when the button is pressed
public void actionPerformed(ActionEvent evt) {
// Perform action...
String name = inputFileTextField.getText();
if (name == null || name.trim().length() == 0 || !(new File(name).exists())) {
- JOptionPane.showMessageDialog(null, "You need to select an input file first.");
+ JOptionPane.showMessageDialog(null, "Please, select an input file first.");
return;
}
@@ -294,7 +297,7 @@
int converterIndex = jList.getSelectedIndex();
if (converterIndex == -1) {
- JOptionPane.showMessageDialog(null, "You need to select a converter.");
+ JOptionPane.showMessageDialog(null, "Please, select a converter.");
return;
}
@@ -316,12 +319,23 @@
// System.err.println("\nOutput file: " + outputFileName);
displayFileinNewWindow(outputFileName);
+ statusPanel.setText("Conversion file : " + outputFileName);
+ } else {
+ statusPanel.setText("Conversion FAILED!");
}
+
}
};
- launchButon = new JButton(launchAction);
- jpanel.add(launchButon, c);
+ launchButton = new JButton(launchAction);
+ jpanel.add(launchButton, c);
+
+ c.gridx = 1; // column 1
+ c.gridy = 1; // row 1
+ c.ipadx = 10; // increases components width by 10 pixels
+ c.anchor = GridBagConstraints.SOUTH;
+ statusPanel = new StatusPanel();
+ jpanel.add(statusPanel, c);
}
@@ -382,6 +396,7 @@
ConverterGUI gui = new ConverterGUI();
gui.setMinimumSize(new Dimension(600, 300));
+ gui.setResizable(false);
gui.pack();
gui.setVisible(true);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pd...@us...> - 2016-02-01 16:27:14
|
Revision: 611
http://sourceforge.net/p/sbfc/code/611
Author: pdp10
Date: 2016-02-01 16:27:12 +0000 (Mon, 01 Feb 2016)
Log Message:
-----------
Attached AboutDialog to application. Is there a better way to pass the application to AboutDialog without recurring to that awful
application = this; in the constructor? I inserted this temporarily as it does not recognise *this* otherwise. Possibly a solution is
to externalise the events..
Modified Paths:
--------------
trunk/src/org/sbfc/converter/ConverterGUI.java
Added Paths:
-----------
trunk/src/org/sbfc/converter/gui/AboutDialog.java
Modified: trunk/src/org/sbfc/converter/ConverterGUI.java
===================================================================
--- trunk/src/org/sbfc/converter/ConverterGUI.java 2016-02-01 16:22:02 UTC (rev 610)
+++ trunk/src/org/sbfc/converter/ConverterGUI.java 2016-02-01 16:27:12 UTC (rev 611)
@@ -58,7 +58,9 @@
import javax.swing.ListSelectionModel;
import javax.swing.event.ListDataListener;
+import org.sbfc.converter.gui.AboutDialog;
+
/**
* @author rodrigue
*
@@ -83,12 +85,21 @@
*/
JButton launchButon;
+ public static final String APPLICATION_NAME = "Systems Biology Format Converter";
+ public static final String VERSION = "1.3.6";
+
+ public static final String WEBSITE = "http://sbfc.sourceforge.net/";
+
+ private ConverterGUI application;
+
+
/**
*
*/
public ConverterGUI() {
super("SBFC Launcher");
+ application = this;
init();
}
@@ -142,7 +153,8 @@
JMenuItem aboutMenuItem = new JMenuItem(new AbstractAction("About") {
@Override
public void actionPerformed(ActionEvent e) {
- JOptionPane.showMessageDialog(jpanel, "Helper GUI to launch one or several conversions.");
+ //JOptionPane.showMessageDialog(jpanel, "Helper GUI to launch one or several conversions.");
+ new AboutDialog(application);
}
});
menuBar.add(aboutMenuItem);
Added: trunk/src/org/sbfc/converter/gui/AboutDialog.java
===================================================================
--- trunk/src/org/sbfc/converter/gui/AboutDialog.java (rev 0)
+++ trunk/src/org/sbfc/converter/gui/AboutDialog.java 2016-02-01 16:27:12 UTC (rev 611)
@@ -0,0 +1,51 @@
+package org.sbfc.converter.gui;
+
+import java.awt.BorderLayout;
+import java.awt.Container;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import javax.swing.JButton;
+import javax.swing.JDialog;
+import javax.swing.JPanel;
+
+import org.sbfc.converter.ConverterGUI;
+
+
+public class AboutDialog extends JDialog {
+
+ private static final long serialVersionUID = 621035395889088992L;
+
+ /**
+ * Instantiates a new about dialog.
+ * @param application The SBFC application.
+ */
+ public AboutDialog(ConverterGUI application) {
+ super(application);
+ setTitle("About SBFC...");
+ Container container = getContentPane();
+ container.setLayout(new BorderLayout());
+
+ add(new SBFCTitlePanel(),BorderLayout.CENTER);
+
+ JPanel aboutPanel = new JPanel();
+
+ JButton closeButton = new JButton("Close");
+ getRootPane().setDefaultButton(closeButton);
+ closeButton.addActionListener(new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent arg0) {
+ setVisible(false);
+ dispose();
+ }
+ });
+ aboutPanel.add(closeButton);
+
+ container.add(aboutPanel,BorderLayout.SOUTH);
+
+ setSize(650,280);
+ setLocationRelativeTo(application);
+ setResizable(false);
+ setVisible(true);
+ }
+
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pd...@us...> - 2016-02-01 16:22:04
|
Revision: 610
http://sourceforge.net/p/sbfc/code/610
Author: pdp10
Date: 2016-02-01 16:22:02 +0000 (Mon, 01 Feb 2016)
Log Message:
-----------
Added a title panel.
Added Paths:
-----------
trunk/src/org/sbfc/converter/gui/SBFC_logo-small.png
Added: trunk/src/org/sbfc/converter/gui/SBFC_logo-small.png
===================================================================
(Binary files differ)
Index: trunk/src/org/sbfc/converter/gui/SBFC_logo-small.png
===================================================================
--- trunk/src/org/sbfc/converter/gui/SBFC_logo-small.png 2016-02-01 16:21:52 UTC (rev 609)
+++ trunk/src/org/sbfc/converter/gui/SBFC_logo-small.png 2016-02-01 16:22:02 UTC (rev 610)
Property changes on: trunk/src/org/sbfc/converter/gui/SBFC_logo-small.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pd...@us...> - 2016-02-01 16:21:54
|
Revision: 609
http://sourceforge.net/p/sbfc/code/609
Author: pdp10
Date: 2016-02-01 16:21:52 +0000 (Mon, 01 Feb 2016)
Log Message:
-----------
Added a title panel.
Added Paths:
-----------
trunk/src/org/sbfc/converter/gui/SBFCTitlePanel.java
Added: trunk/src/org/sbfc/converter/gui/SBFCTitlePanel.java
===================================================================
--- trunk/src/org/sbfc/converter/gui/SBFCTitlePanel.java (rev 0)
+++ trunk/src/org/sbfc/converter/gui/SBFCTitlePanel.java 2016-02-01 16:21:52 UTC (rev 609)
@@ -0,0 +1,97 @@
+
+package org.sbfc.converter.gui;
+
+import java.awt.BorderLayout;
+
+import javax.swing.BorderFactory;
+import javax.swing.ImageIcon;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JTextPane;
+import javax.swing.text.BadLocationException;
+import javax.swing.text.Document;
+import javax.swing.text.Style;
+import javax.swing.text.StyleConstants;
+
+import org.sbfc.converter.ConverterGUI;
+
+
+/**
+ * The Class SBFC Title Panel.
+ * @author Piero Dalle Pezze
+ */
+public class SBFCTitlePanel extends JPanel {
+
+ private static final long serialVersionUID = -3374200663848185309L;
+
+ /**
+ * Constructor.
+ */
+ public SBFCTitlePanel() {
+ super();
+ initComponents();
+ }
+
+ /**
+ * This method is called from within the constructor to initialise the form.
+ */
+ private void initComponents() {
+
+ setLayout(new BorderLayout());
+
+ ImageIcon logo = new ImageIcon(
+ ClassLoader.getSystemResource("org/sbfc/converter/gui/SBFC_logo-small.png"));
+ JPanel logoPanel = new JPanel();
+ logoPanel.add(new JLabel("", logo, JLabel.CENTER));
+ logoPanel.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
+ add(logoPanel, BorderLayout.WEST);
+
+ JTextPane textPane = new JTextPane();
+ textPane.setEditable(false);
+ textPane.setOpaque(false);
+
+// Not safe to use Desktop.browse as it works 1 time out of 100.. So maybe we can skip this.
+// To have this we need to define a class which uses the correct browser by OS.
+// textPane.setEditorKit(JEditorPane
+// .createEditorKitForContentType("text/html"));
+// textPane.setText("<a href='" + ConverterGUI.WEBSITE + "'>"
+// + ConverterGUI.WEBSITE + "</a>");
+
+// textPane.addHyperlinkListener(new HyperlinkListener() {
+// @Override
+// public void hyperlinkUpdate(HyperlinkEvent hle) {
+// if (HyperlinkEvent.EventType.ACTIVATED.equals(hle
+// .getEventType())) {
+// try {
+// Desktop.browse(hle.getURL().toURI());
+// } catch (URISyntaxException e) {
+// }
+// }
+// }
+// });
+
+ add(textPane, BorderLayout.CENTER);
+ try {
+ Document doc = textPane.getDocument();
+ Style style = textPane.addStyle("Title", null);
+ StyleConstants.setFontSize(style, 12);
+ doc.insertString(
+ doc.getLength(),
+ "\n\n\u00a9 Authors, 2015-16\n\n"
+ + ConverterGUI.WEBSITE + "\n\n"
+ + ConverterGUI.APPLICATION_NAME + " " + ConverterGUI.VERSION + " is a free software distributed under "
+ + "the terms of the GNU Lesser General Public License (GNU LGPL v2).\n\n"
+ + "This application uses the following third-party software libraries:\n"
+ + "...",
+ style);
+
+ } catch (BadLocationException e) {
+ // send message to status bar?
+ }
+
+ }
+
+}
+
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pd...@us...> - 2016-02-01 16:21:20
|
Revision: 608
http://sourceforge.net/p/sbfc/code/608
Author: pdp10
Date: 2016-02-01 16:21:17 +0000 (Mon, 01 Feb 2016)
Log Message:
-----------
Added Status Panel.
Added Paths:
-----------
trunk/src/org/sbfc/converter/gui/
trunk/src/org/sbfc/converter/gui/StatusPanel.java
Added: trunk/src/org/sbfc/converter/gui/StatusPanel.java
===================================================================
--- trunk/src/org/sbfc/converter/gui/StatusPanel.java (rev 0)
+++ trunk/src/org/sbfc/converter/gui/StatusPanel.java 2016-02-01 16:21:17 UTC (rev 608)
@@ -0,0 +1,41 @@
+package org.sbfc.converter.gui;
+
+import java.awt.BorderLayout;
+import javax.swing.BorderFactory;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.border.BevelBorder;
+
+
+/**
+ * The Class StatusPanel shows the status bar at the bottom
+ * of the main application screen.
+ *
+ * @author Piero Dalle Pezze
+ */
+public class StatusPanel extends JPanel {
+
+ private static final long serialVersionUID = -1073513153341532991L;
+
+ /** The textLabel. */
+ private JLabel textLabel = new JLabel(" ",JLabel.LEFT);
+
+ /**
+ * Instantiates a new status panel.
+ */
+ public StatusPanel() {
+ setLayout(new BorderLayout());
+ add(textLabel,BorderLayout.WEST);
+ setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
+ }
+
+ /**
+ * Sets the file name.
+ *
+ * @param text the new file name
+ */
+ public void setText(String text) {
+ textLabel.setText(text);
+ }
+
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <nik...@us...> - 2016-02-01 13:14:15
|
Revision: 607
http://sourceforge.net/p/sbfc/code/607
Author: niko-rodrigue
Date: 2016-02-01 13:14:13 +0000 (Mon, 01 Feb 2016)
Log Message:
-----------
made the JTextArea displaying the conversion output file non editable.
Modified Paths:
--------------
trunk/lib/sbfc-1.3.6.jar
trunk/src/org/sbfc/converter/ConverterGUI.java
Modified: trunk/lib/sbfc-1.3.6.jar
===================================================================
(Binary files differ)
Modified: trunk/src/org/sbfc/converter/ConverterGUI.java
===================================================================
--- trunk/src/org/sbfc/converter/ConverterGUI.java 2016-02-01 13:04:40 UTC (rev 606)
+++ trunk/src/org/sbfc/converter/ConverterGUI.java 2016-02-01 13:14:13 UTC (rev 607)
@@ -337,6 +337,7 @@
String outputFileContent = readFile(outputFileName, Charset.forName("UTF-8"));
JFrame outputFileJFrame = new JFrame(outputFileName);
JTextArea outputFileTA = new JTextArea(outputFileContent);
+ outputFileTA.setEditable(false);
outputFileJFrame.add(new JScrollPane(outputFileTA));
outputFileJFrame.setMinimumSize(new Dimension(800, 600));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|