{ "HTML files" }, "HTML files");
jvFileChooser.setFileView(new JalviewFileView());
- // TODO uncomment when supported by MassageManager
jvFileChooser.setDialogTitle(MessageManager
.getString("label.save_as_biojs_html"));
jvFileChooser.setDialogTitle("save as BioJs HTML");
try
{
String gitRepoPkgJson = getURLContentAsString(BJS_TEMPLATE_GIT_REPO);
- BioJSRepositoryPojo release = new BioJSRepositoryPojo(
- gitRepoPkgJson);
- syncUpdates(BJS_TEMPLATES_LOCAL_DIRECTORY, release);
- refreshBioJSVersionsInfo(BJS_TEMPLATES_LOCAL_DIRECTORY);
+ if (gitRepoPkgJson != null)
+ {
+ BioJSRepositoryPojo release = new BioJSRepositoryPojo(
+ gitRepoPkgJson);
+ syncUpdates(BJS_TEMPLATES_LOCAL_DIRECTORY, release);
+ refreshBioJSVersionsInfo(BJS_TEMPLATES_LOCAL_DIRECTORY);
+ }
} catch (URISyntaxException e)
{
e.printStackTrace();
{
case SEARCH_SUMMARY:
columnNames = new String[]
- { "PDB Feild", "Show in search summary" };
+ { "PDB Field", "Show in search summary" };
break;
case STRUCTURE_CHOOSER:
columnNames = new String[]
- { "PDB Feild", "Show in structure summary" };
+ { "PDB Field", "Show in structure summary" };
break;
case PREFERENCES:
columnNames = new String[]
- { "PDB Feild", "Show in search summary", "Show in structure summary" };
+ { "PDB Field", "Show in search summary", "Show in structure summary" };
break;
default:
break;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
+import java.util.Objects;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
@SuppressWarnings("unchecked")
private void parse(String jsonString) throws ParseException
{
+ Objects.requireNonNull(jsonString,
+ "Supplied jsonString must not be null");
JSONParser jsonParser = new JSONParser();
JSONObject JsonObj = (JSONObject) jsonParser.parse(jsonString);
this.description = (String) JsonObj.get("description");
* table. The PDB Id serves as a unique identifier for a given row in the
* summary table
*
- * @param wantedFeilds
+ * @param wantedFields
* the available table columns in no particular order
* @return the pdb id field column index
*/
public static int getPDBIdColumIndex(
- Collection<PDBDocField> wantedFeilds, boolean hasRefSeq)
+ Collection<PDBDocField> wantedFields, boolean hasRefSeq)
{
// If a reference sequence is attached then start counting from 1 else
// start from zero
- int pdbFeildIndexCounter = hasRefSeq ? 1 : 0;
+ int pdbFieldIndexCounter = hasRefSeq ? 1 : 0;
- for (PDBDocField feild : wantedFeilds)
+ for (PDBDocField field : wantedFields)
{
- if (feild.equals(PDBDocField.PDB_ID))
+ if (field.equals(PDBDocField.PDB_ID))
{
break; // Once PDB Id index is determined exit iteration
}
- ++pdbFeildIndexCounter;
+ ++pdbFieldIndexCounter;
}
- return pdbFeildIndexCounter;
+ return pdbFieldIndexCounter;
}
/**