<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Plugin.jar"/>
<classpathentry kind="lib" path="lib/jersey-client-1.19.jar"/>
<classpathentry kind="lib" path="lib/jersey-core-1.19.jar"/>
- <classpathentry kind="lib" path="lib/jersey-json-1.19.jar"/>
<classpathentry kind="lib" path="lib/jsr311-api-1.1.1.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/plugin.jar"/>
<classpathentry kind="lib" path="lib/jetty-server-9.2.10.v20150310.jar"/>
<classpathentry kind="lib" path="lib/jetty-util-9.2.10.v20150310.jar"/>
<classpathentry kind="lib" path="lib/jetty-http-9.2.10.v20150310.jar"/>
<classpathentry kind="lib" path="lib/jetty-io-9.2.10.v20150310.jar"/>
+ <classpathentry kind="lib" path="lib/java-json.jar"/>
<classpathentry kind="output" path="classes"/>
</classpath>
<!-- Jalview Applet JMol Jar Dependency -->
<property name="jmolJar" value="JmolApplet-12.2.4.jar" />
<property name="varnaJar" value="VARNAv3-91.jar" />
+ <property name="jsoup" value="jsoup-1.8.1.jar" />
+ <property name="jsonSimple" value="json_simple-1.1.jar" />
+ <property name="javaJson" value="java-json.jar" />
<property name="jalviewLiteJar" value="jalviewApplet.jar" />
<!-- switch to indicate if we should obfuscate jalviewLite -->
<!-- <property name="donotobfuscate" value="true"/> -->
</fileset>
<pathelement location="appletlib/${jmolJar}" />
<pathelement location="lib/${varnaJar}" />
+ <pathelement location="lib/${jsoup}" />
+ <pathelement location="lib/${jsonSimple}" />
+ <pathelement location="lib/${javaJson}" />
+
</path>
<!-- default location for outputting javadoc -->
<property name="javadocDir" value="${packageDir}/javadoc"/>
+/*
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ *
+ * This file is part of Jalview.
+ *
+ * Jalview is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * Jalview is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
+ */
+
package jalview.io;
-import jalview.gui.AlignFrame;
+import jalview.api.AlignViewControllerGuiI;
import jalview.schemes.ColourSchemeI;
import java.io.IOException;
String alignmentJsonString = content.val();
JSONFile jsonFile = new JSONFile().parse(alignmentJsonString);
- seqs = jsonFile.seqs;
- seqGroups = jsonFile.seqGroups;
- annotations = jsonFile.annotations;
+ seqs = jsonFile.getSeqs();
+ seqGroups = jsonFile.getSeqGroups();
+ annotations = jsonFile.getAnnotations();
showSeqFeatures = jsonFile.isShowSeqFeatures();
colourScheme = jsonFile.getColourScheme();
} catch (Exception e)
}
}
- public void applySettingsToAlignFrame(AlignFrame af)
+ public void applySettingsToAlignFrame(AlignViewControllerGuiI af)
{
af.setShowSeqFeatures(isShowSeqFeatures());
af.changeColour(getColourScheme());
+/*
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
+ *
+ * This file is part of Jalview.
+ *
+ * Jalview is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * Jalview is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
+ */
+
package jalview.io;
import jalview.api.AlignViewControllerGuiI;
if (jsonExportSettings.isExportJalviewSettings())
{
- jalviewVersion = jalview.bin.Cache.getProperty("VERSION");
- webStartLaunchServletUrl = jalview.bin.Cache.getDefault(
- "www.jalview.org", "http://www.jalview.org")
- + "/services/launchApp";
+ jalviewVersion = "";
+ webStartLaunchServletUrl = "www.jalview.org/services/launchApp";
JalviewSettingsPojo jvSettings = new JalviewSettingsPojo();
jvSettings.setGlobalColorScheme(globalColorScheme);
jsonAlignmentPojo.getSeqGroups().add(seqGrpPojo);
}
}
- com.json.JSONObject generatedJSon = new com.json.JSONObject(
+ org.json.JSONObject generatedJSon = new org.json.JSONObject(
jsonAlignmentPojo);
jsonOutput = generatedJSon.toString();
return jsonOutput.replaceAll("xstart", "xStart").replaceAll("xend",
String desc = annot.get("description") == null ? null : annot
.get("description").toString();
- char ss = annot.get("secondaryStructure") == null ? null
+ char ss = annot.get("secondaryStructure") == null ? ' '
: annot.get("secondaryStructure").toString().charAt(0);
String displayChar = annot.get("displayCharacter").toString();
this.showSeqFeatures = showSeqFeatures;
}
+ public Vector<AlignmentAnnotation> getAnnotations()
+ {
+ return annotations;
+ }
+
public class JSONExportSettings
{
private boolean exportSequence;
import com.sun.jersey.api.client.WebResource;
import com.sun.jersey.api.client.config.ClientConfig;
import com.sun.jersey.api.client.config.DefaultClientConfig;
-import com.sun.jersey.api.json.JSONConfiguration;
+
/**
* A rest client for querying the Search endpoing of the PDB REST API
try
{
ClientConfig clientConfig = new DefaultClientConfig();
- clientConfig.getFeatures().put(
- JSONConfiguration.FEATURE_POJO_MAPPING, Boolean.TRUE);
Client client = Client.create(clientConfig);
String wantedFields = getPDBDocFieldsAsCommaDelimitedString(pdbRestRequest