diff --git a/analysis/pom.xml b/analysis/pom.xml index b40ab5a11..8be5f3ff9 100644 --- a/analysis/pom.xml +++ b/analysis/pom.xml @@ -30,7 +30,7 @@ package - assembly + single diff --git a/analysis/src/main/java/edu/utah/ece/async/ibiosim/analysis/properties/PropertiesUtil.java b/analysis/src/main/java/edu/utah/ece/async/ibiosim/analysis/properties/PropertiesUtil.java index f7d738ff9..c1b263965 100644 --- a/analysis/src/main/java/edu/utah/ece/async/ibiosim/analysis/properties/PropertiesUtil.java +++ b/analysis/src/main/java/edu/utah/ece/async/ibiosim/analysis/properties/PropertiesUtil.java @@ -47,6 +47,17 @@ public class PropertiesUtil { algorithm = new Algorithm(GlobalConstants.KISAO_EULER); } else if (sim.contains("rk8pd")) { algorithm = new Algorithm(GlobalConstants.KISAO_RUNGE_KUTTA_PRINCE_DORMAND); + } else if (sim.contains("rk4imp")) { + algorithm = new Algorithm(GlobalConstants.KISAO_RUNGE_KUTTA_IMPLICIT); + } else if (sim.contains("gear1")||sim.contains("gear2")) { + algorithm = new Algorithm(GlobalConstants.KISAO_GEAR); + AlgorithmParameter order; + if (sim.contains("gear1")) { + order = new AlgorithmParameter(GlobalConstants.KISAO_ORDER, "1"); + } else { + order = new AlgorithmParameter(GlobalConstants.KISAO_ORDER, "2"); + } + algorithm.addAlgorithmParameter(order); } else if (sim.contains("rkf45") || sim.contains("Runge-Kutta-Fehlberg")) { algorithm = new Algorithm(GlobalConstants.KISAO_RUNGE_KUTTA_FEHLBERG); para.setAttribute("method", sim); @@ -57,6 +68,10 @@ public class PropertiesUtil { } else if (properties.isSsa()) { if (sim.equals("gillespie")) { algorithm = new Algorithm(GlobalConstants.KISAO_GILLESPIE_DIRECT); + } else if (sim.equals("bunker")) { + algorithm = new Algorithm(GlobalConstants.KISAO_BUNKER); + } else if (sim.equals("emc")) { + algorithm = new Algorithm(GlobalConstants.KISAO_EMC); } else if (sim.contains("Mixed")) { @@ -146,6 +161,12 @@ public class PropertiesUtil { } else if (kisaoId.equals(GlobalConstants.KISAO_RUNGE_KUTTA_PRINCE_DORMAND)) { properties.setOde(); properties.setSim("rk8pd"); + } else if (kisaoId.equals(GlobalConstants.KISAO_BUNKER)) { + properties.setOde(); + properties.setSim("bunker"); + } else if (kisaoId.equals(GlobalConstants.KISAO_EMC)) { + properties.setOde(); + properties.setSim("emc"); } else if (kisaoId.equals(GlobalConstants.KISAO_GILLESPIE) || kisaoId.equals(GlobalConstants.KISAO_GILLESPIE_DIRECT)) { properties.setSsa(); properties.setSim("gillespie"); diff --git a/bin/iBioSim.mac64 b/bin/iBioSim.mac64 index 461b73e95..bb93ed21a 100755 --- a/bin/iBioSim.mac64 +++ b/bin/iBioSim.mac64 @@ -8,4 +8,4 @@ export PATH=$BIOSIM/bin:/usr/local/lib:$PATH export DYLD_LIBRARY_PATH=/usr/local/lib:$DYLD_LIBRARY_PATH export DDLD_LIBRARY_PATH=/usr/local/lib:$DDLD_LIBRARY_PATH -exec java -Xmx2048M -Xms2048M -Djava.library.path=/usr/local/lib -XX:+UseSerialGC -Dapple.laf.useScreenMenuBar=true -Xdock:name="iBioSim" -Xdock:icon=$BIOSIM/gui/src/main/resources/edu/utah/ece/async/ibiosim/gui/icons/iBioSim.jpg -jar iBioSim.jar +java --add-exports java.desktop/com.apple.eawt=ALL-UNNAMED -Xmx2048M -Xms2048M -Djava.library.path=/usr/local/lib -XX:+UseSerialGC -Dapple.laf.useScreenMenuBar=true -Xdock:name="iBioSim" -Xdock:icon=$BIOSIM/gui/src/main/resources/edu/utah/ece/async/ibiosim/gui/icons/iBioSim.jpg -jar iBioSim.jar diff --git a/conversion/pom.xml b/conversion/pom.xml index d77acbfb5..d77800f1a 100644 --- a/conversion/pom.xml +++ b/conversion/pom.xml @@ -30,7 +30,7 @@ package - assembly + single @@ -69,6 +69,16 @@ org.apache.jena jena-arq 3.0.0 + + + xml-apis + xml-apis + + + xerces + xercesImpl + + diff --git a/dataModels/pom.xml b/dataModels/pom.xml index 7d45dbe6c..405e768c1 100644 --- a/dataModels/pom.xml +++ b/dataModels/pom.xml @@ -16,21 +16,11 @@ The JSBML Snapshot repository https://oss.sonatype.org/content/repositories/snapshots/ - - ebi - ebi - http://www.ebi.ac.uk/intact/maven/nexus/content/repositories/ebi-repo/ - - + jboss jboss https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/ - - netbeans - netbeans - http://bits.netbeans.org/maven2/ - osgeo osgeo @@ -54,8 +44,26 @@ jaxen jaxen 1.1.4 + + + xml-apis + xml-apis + + + xerces + xercesImpl + + + xom + xom + + + dom4j + dom4j + + - + xom xom @@ -85,6 +93,20 @@ org.sbolstandard libSBOLj 2.4.1-SNAPSHOT + + + xml-apis + xml-apis + + + xerces + xercesImpl + + + dom4j + dom4j + + @@ -98,17 +120,56 @@ org.jfree jfreechart 1.0.14 + + + xml-apis + xml-apis + + + xml-apis + xml-apis-ext + + + xerces + xercesImpl + + - + + org.apache.xmlgraphics batik-dom - 1.8 + 1.16 + + + xml-apis + xml-apis + + + xml-apis + xml-apis-ext + + + xerces + xercesImpl + + org.apache.xmlgraphics batik-svggen - 1.8 + 1.16 + + + xml-apis + xml-apis + + + xerces + xercesImpl + + @@ -122,11 +183,29 @@ VectorGraphics2D 0.13 - + org.jlibsedml jlibsedml 2.3.0-SNAPSHOT + + + xml-apis + xml-apis + + + xerces + xercesImpl + + + xom + xom + + + jaxen + jaxen + + diff --git a/dataModels/src/main/java/edu/utah/ece/async/ibiosim/dataModels/graphData/GraphData.java b/dataModels/src/main/java/edu/utah/ece/async/ibiosim/dataModels/graphData/GraphData.java index d64636830..2ddc75f12 100644 --- a/dataModels/src/main/java/edu/utah/ece/async/ibiosim/dataModels/graphData/GraphData.java +++ b/dataModels/src/main/java/edu/utah/ece/async/ibiosim/dataModels/graphData/GraphData.java @@ -19,8 +19,6 @@ import java.util.Scanner; import javax.swing.JComboBox; -import org.apache.batik.dom.GenericDOMImplementation; -import org.apache.batik.svggen.SVGGraphics2D; import org.jfree.chart.ChartFactory; import org.jfree.chart.ChartUtilities; import org.jfree.chart.JFreeChart; @@ -53,7 +51,8 @@ import org.jlibsedml.SEDMLDocument; import org.jlibsedml.SedML; import org.jlibsedml.Variable; import org.jlibsedml.modelsupport.SBMLSupport; -import org.w3c.dom.DOMImplementation; +import org.apache.batik.svggen.SVGGraphics2D; +import org.apache.batik.dom.GenericDOMImplementation; import com.lowagie.text.Document; import com.lowagie.text.Rectangle; @@ -301,6 +300,7 @@ public class GraphData extends CoreObservable { doc.writeTo(new FileOutputStream(file)); } else if (output == 4) { + /* DOMImplementation domImpl = GenericDOMImplementation.getDOMImplementation(); org.w3c.dom.Document document = domImpl.createDocument(null, "svg", null); SVGGraphics2D svgGenerator = new SVGGraphics2D(document); @@ -311,6 +311,7 @@ public class GraphData extends CoreObservable { svgGenerator.stream(out, useCSS); out.close(); outStream.close(); + */ } else if ((output == 5) || (output == 6) || (output == 7)) { exportDataFile(file, output); diff --git a/gui/pom.xml b/gui/pom.xml index 70e1c7c81..322a69ba8 100644 --- a/gui/pom.xml +++ b/gui/pom.xml @@ -30,7 +30,7 @@ package - assembly + single @@ -38,31 +38,16 @@ - - staging - staging - https://oss.sonatype.org/service/local/staging/deploy/maven2 - ossrh ossrh https://oss.sonatype.org/content/repositories/snapshots - - ebi - ebi - https://www.ebi.ac.uk/intact/maven/nexus/content/repositories/ebi-repo/ - jboss jboss https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/ - - netbeans - netbeans - https://bits.netbeans.org/maven2/ - osgeo osgeo @@ -92,6 +77,20 @@ org.jfree jfreechart 1.0.14 + + + xml-apis + xml-apis + + + xerces + xercesImpl + + + dom4j + dom4j + + diff --git a/gui/src/main/java/edu/utah/ece/async/ibiosim/gui/Gui.java b/gui/src/main/java/edu/utah/ece/async/ibiosim/gui/Gui.java index 24f8c5dbd..e132a454f 100644 --- a/gui/src/main/java/edu/utah/ece/async/ibiosim/gui/Gui.java +++ b/gui/src/main/java/edu/utah/ece/async/ibiosim/gui/Gui.java @@ -36,6 +36,8 @@ import java.awt.event.MouseWheelEvent; import java.awt.event.MouseWheelListener; import java.awt.event.WindowEvent; import java.awt.event.WindowListener; +import java.awt.Desktop; + import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.ByteArrayOutputStream; @@ -210,7 +212,6 @@ import edu.utah.ece.async.ibiosim.gui.synthesisView.SynthesisView; import edu.utah.ece.async.ibiosim.gui.synthesisView.SynthesisViewATACS; import edu.utah.ece.async.ibiosim.gui.util.FileTree; import edu.utah.ece.async.ibiosim.gui.util.Log; -import edu.utah.ece.async.ibiosim.gui.util.OSXHandlers; import edu.utah.ece.async.ibiosim.gui.util.Utility; import edu.utah.ece.async.ibiosim.gui.util.preferences.EditPreferences; import edu.utah.ece.async.ibiosim.gui.util.preferences.PreferencesDialog; @@ -334,7 +335,7 @@ public class Gui implements BioObserver, MouseListener, ActionListener, MouseMot public static Object ICON_COLLAPSE = UIManager.get("Tree.collapsedIcon"); - protected static final String iBioSimVersion = "3.1.0"; + protected static final String iBioSimVersion = "3.2.0"; protected SEDMLDocument sedmlDocument = null; @@ -882,9 +883,31 @@ public class Gui implements BioObserver, MouseListener, ActionListener, MouseMot help.add(manual); help.add(bugReport); - if (System.getProperty("os.name").toLowerCase().startsWith("mac os")) { - OSXHandlers osxHandlers = new OSXHandlers(this); - osxHandlers.addEventHandlers(); + if (Desktop.isDesktopSupported()) { + Desktop desktop = Desktop.getDesktop(); + + // Set the "About" menu handler + desktop.setAboutHandler(e -> { + about(); + }); + + // Set the "Preferences" menu handler + desktop.setPreferencesHandler(e -> { + PreferencesDialog.showPreferences(Gui.frame); + getFileTree().setExpandibleIcons(!IBioSimPreferences.INSTANCE.isPlusMinusIconsEnabled()); + if (getSBOLDocument() != null) { + getSBOLDocument().setDefaultURIprefix(SBOLEditorPreferences.INSTANCE.getUserInfo().getURI().toString()); + } + }); + + // Set the "Quit" menu handler + desktop.setQuitHandler((e, response) -> { + exit(); + // If we have returned from the above call the user has decided not to quit + response.cancelQuit(); + // Perform cleanup before exiting + //response.performQuit(); // or response.cancelQuit(); + }); } else { edit.addSeparator(); edit.add(pref); @@ -1040,7 +1063,7 @@ public class Gui implements BioObserver, MouseListener, ActionListener, MouseMot final String developers; name = new JLabel("iBioSim", SwingConstants.CENTER); version = new JLabel("Version " + iBioSimVersion, SwingConstants.CENTER); - developers = "Nathan Barker\nScott Glass\nKevin Jones\nHiroyuki Kuwahara\n" + developers = "Nathan Barker\nLukas Buecherl\nPedro Fontanarrosa\nScott Glass\nKevin Jones\nHiroyuki Kuwahara\n" + "Curtis Madsen\nChris Myers\nNam Nguyen\nTramy Nguyen\nTyler Patterson\nNicholas Roehner\nJason Stevens\nLeandro Watanabe\nMichael Zhang\nZhen Zhang\nZach Zundel"; Font font = name.getFont(); font = font.deriveFont(Font.BOLD, 36.0f); @@ -2407,7 +2430,12 @@ public class Gui implements BioObserver, MouseListener, ActionListener, MouseMot } else if (e.getSource().equals(importArchive)) { importArchive(); } else if (e.getSource().equals(downloadSynBioHub)) { - downloadSynBioHub(); + try { + downloadSynBioHub(); + } catch (SBOLValidationException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } } else if (e.getSource() == downloadBioModel) { downloadBioModel(); } else if (e.getSource() == downloadVirtualPart) { @@ -4524,7 +4552,7 @@ public class Gui implements BioObserver, MouseListener, ActionListener, MouseMot } } - public void createCombineArchive(File archiveFile, String filename) throws IOException, JDOMException, ParseException, CombineArchiveException, TransformerException { + public void createCombineArchive(File archiveFile, String filename) throws IOException, JDOMException, ParseException, CombineArchiveException { CombineArchive archive = new CombineArchive(archiveFile); File baseDir = new File(root); if (filename == null) { @@ -4534,7 +4562,11 @@ public class Gui implements BioObserver, MouseListener, ActionListener, MouseMot } else { addFileToCombineArchive(archive,baseDir,filename); } - archive.pack(); + try { + archive.pack(); + } catch (Exception e) { + e.printStackTrace(); + } archive.close(); } @@ -4569,8 +4601,7 @@ public class Gui implements BioObserver, MouseListener, ActionListener, MouseMot try { createCombineArchive(file,null); } - catch (IOException | JDOMException | ParseException | CombineArchiveException - | TransformerException e) { + catch (IOException | JDOMException | ParseException | CombineArchiveException e) { JOptionPane.showMessageDialog(frame, "Unable to export COMBINE Archive file.", "Error", JOptionPane.ERROR_MESSAGE); } @@ -4605,7 +4636,7 @@ public class Gui implements BioObserver, MouseListener, ActionListener, MouseMot return null; } - public void downloadSynBioHub() { + public void downloadSynBioHub() throws SBOLValidationException { RegistryInputDialog registryInputDialog = new RegistryInputDialog(Gui.frame, RegistryInputDialog.ALL_PARTS, edu.utah.ece.async.sboldesigner.sbol.SBOLUtils.Types.All_types, null, sbolDocument); registryInputDialog.allowCollectionSelection(); @@ -4638,7 +4669,7 @@ public class Gui implements BioObserver, MouseListener, ActionListener, MouseMot getSBOLDocument().createCopy(selection); writeSBOLDocument(); } - catch (SBOLValidationException | SynBioHubException | IOException e) { + catch (SynBioHubException | IOException e) { // TODO Auto-generated catch block e.printStackTrace(); JOptionPane.showMessageDialog(frame, "Unable to download from SynBioHub.", "Error Exporting to SynBioHub", diff --git a/gui/src/main/java/edu/utah/ece/async/ibiosim/gui/util/OSXHandlers.java b/gui/src/main/java/edu/utah/ece/async/ibiosim/gui/util/OSXHandlers.java deleted file mode 100644 index fc80ff0a6..000000000 --- a/gui/src/main/java/edu/utah/ece/async/ibiosim/gui/util/OSXHandlers.java +++ /dev/null @@ -1,104 +0,0 @@ -package edu.utah.ece.async.ibiosim.gui.util; - -import java.io.File; -import java.lang.reflect.InvocationHandler; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.lang.reflect.Proxy; -import java.util.List; - -import javax.swing.JFrame; - -import org.apache.commons.lang3.JavaVersion; - -import com.apple.eawt.AboutHandler; -import com.apple.eawt.Application; -import com.apple.eawt.PreferencesHandler; -import com.apple.eawt.QuitHandler; -import com.apple.eawt.QuitResponse; -import com.apple.eawt.AppEvent.AboutEvent; -import com.apple.eawt.AppEvent.PreferencesEvent; -import com.apple.eawt.AppEvent.QuitEvent; - -import edu.utah.ece.async.ibiosim.dataModels.util.IBioSimPreferences; -import edu.utah.ece.async.ibiosim.gui.Gui; -import edu.utah.ece.async.ibiosim.gui.util.preferences.PreferencesDialog; -import edu.utah.ece.async.sboldesigner.sbol.editor.SBOLEditorPreferences; - -public class OSXHandlers implements InvocationHandler { - - Gui gui; - - public OSXHandlers(Gui gui) { - this.gui = gui; - } - - public void addEventHandlers() throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, - InvocationTargetException, InstantiationException { - - // using reflection to avoid Mac specific classes being required for compiling KSE on other platforms - Class applicationClass = Class.forName("com.apple.eawt.Application"); - Class quitHandlerClass; - Class aboutHandlerClass; - Class openFilesHandlerClass; - Class preferencesHandlerClass; - - String version = System.getProperty("java.version"); - String[] versionElements = version.split("\\.|_|-b"); - - if (Double.parseDouble(versionElements[0]) >= 9) { - quitHandlerClass = Class.forName("java.awt.desktop.QuitHandler"); - aboutHandlerClass = Class.forName("java.awt.desktop.AboutHandler"); - openFilesHandlerClass = Class.forName("java.awt.desktop.OpenFilesHandler"); - preferencesHandlerClass = Class.forName("java.awt.desktop.PreferencesHandler"); - } else { - quitHandlerClass = Class.forName("com.apple.eawt.QuitHandler"); - aboutHandlerClass = Class.forName("com.apple.eawt.AboutHandler"); - openFilesHandlerClass = Class.forName("com.apple.eawt.OpenFilesHandler"); - preferencesHandlerClass = Class.forName("com.apple.eawt.PreferencesHandler"); - } - - Object application = applicationClass.getConstructor((Class[]) null).newInstance((Object[]) null); - Object proxy = Proxy.newProxyInstance(OSXHandlers.class.getClassLoader(), new Class[]{ - quitHandlerClass, aboutHandlerClass, openFilesHandlerClass, preferencesHandlerClass}, this); - - applicationClass.getDeclaredMethod("setQuitHandler", quitHandlerClass).invoke(application, proxy); - applicationClass.getDeclaredMethod("setAboutHandler", aboutHandlerClass).invoke(application, proxy); - applicationClass.getDeclaredMethod("setOpenFileHandler", openFilesHandlerClass).invoke(application, proxy); - applicationClass.getDeclaredMethod("setPreferencesHandler", preferencesHandlerClass).invoke(application, - proxy); - } - - @Override - public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { - /*if ("openFiles".equals(method.getName())) { - if (args[0] != null) { - Object files = args[0].getClass().getMethod("getFiles").invoke(args[0]); - if (files instanceof List) { - OpenAction openAction = new OpenAction(kseFrame); - for (File file : (List) files) { - openAction.openKeyStore(file); - } - } - } - } else */if ("handleQuitRequestWith".equals(method.getName())) { - gui.exit(); - // If we have returned from the above call the user has decied not to quit - if (args[1] != null) { - args[1].getClass().getDeclaredMethod("cancelQuit").invoke(args[1]); - } - } else if ("handleAbout".equals(method.getName())) { - gui.about(); - } else if ("handlePreferences".equals(method.getName())) { - PreferencesDialog.showPreferences(Gui.frame); - //EditPreferences editPreferences = new EditPreferences(frame, async); - //editPreferences.preferences(); - gui.getFileTree().setExpandibleIcons(!IBioSimPreferences.INSTANCE.isPlusMinusIconsEnabled()); - if (gui.getSBOLDocument() != null) { - gui.getSBOLDocument().setDefaultURIprefix(SBOLEditorPreferences.INSTANCE.getUserInfo().getURI().toString()); - } - } - return null; - } - -} diff --git a/learn/pom.xml b/learn/pom.xml index b895aedc9..caa9580e4 100644 --- a/learn/pom.xml +++ b/learn/pom.xml @@ -30,7 +30,7 @@ package - assembly + single diff --git a/pom.xml b/pom.xml index 26c6a02ae..2f925067c 100644 --- a/pom.xml +++ b/pom.xml @@ -72,10 +72,10 @@ maven-compiler-plugin - 3.5.1 + 3.8.1 - 1.8 - 1.8 + 11 + 11 edu/utah/ece/async/ibiosim/conversion/gcm2sbml/*.java diff --git a/synthesis/pom.xml b/synthesis/pom.xml index d58943113..a1ff86f1c 100644 --- a/synthesis/pom.xml +++ b/synthesis/pom.xml @@ -124,7 +124,7 @@ package - assembly + single diff --git a/verification/pom.xml b/verification/pom.xml index 1c226ea70..9ec33ccef 100644 --- a/verification/pom.xml +++ b/verification/pom.xml @@ -30,7 +30,7 @@ package - assembly + single