Merge branch 'develop' into features/JAL-2295setChimeraAttributes
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Tue, 17 Jan 2017 16:07:49 +0000 (16:07 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Tue, 17 Jan 2017 16:07:49 +0000 (16:07 +0000)
1  2 
resources/lang/Messages.properties
src/jalview/ws/sifts/SiftsClient.java

@@@ -716,8 -716,6 +716,8 @@@ label.colour_with_chimera = Colour wit
  label.align_structures = Align Structures
  label.jmol = Jmol
  label.chimera = Chimera
 +label.create_chimera_attributes = Write Jalview features
 +label.create_chimera_attributes_tip = Set Chimera residue attributes for visible features
  label.sort_alignment_by_tree = Sort Alignment By Tree
  label.mark_unlinked_leaves = Mark Unlinked Leaves
  label.associate_leaves_with = Associate Leaves With
@@@ -837,7 -835,7 +837,7 @@@ label.colour_by = Colour by..
  label.muscle_multiple_protein_sequence_alignment = Muscle Multiple Protein Sequence Alignment
  label.mafft_multiple_sequence_alignment = MAFFT Multiple Sequence Alignment
  label.clustalw_multiple_sequence_alignment = ClustalW Multiple Sequence Alignment
- label.jnet_secondary_structure_prediction = JNet Secondary Structure Prediction
+ label.jnet_secondary_structure_prediction = JPred Secondary Structure Prediction
  label.multiharmony = Multi-Harmony
  label.unable_start_web_service_analysis = Unable to start web service analysis
  label.job_couldnt_be_started_check_input = The Job couldn't be started. Please check your input, and the Jalview console for any warning messages.
@@@ -971,7 -969,7 +971,7 @@@ error.cannot_have_zero_length_vector_re
  error.implementation_error_multiple_single_sequence_prediction_jobs_not_supported = Implementation Error! Multiple single sequence prediction jobs are not yet supported
  error.implementation_error_invalid_msa_index_for_job =Implementation Error! Invalid msaIndex for JPredJob on parent MSA input object!
  error.implementation_error_startjob_called = Implementation error - StartJob(JpredJob) called on {0}
- error.multiple_jnet_subjob_merge_not_implemented = Multiple JNet subjob merging not yet implemented
+ error.multiple_jnet_subjob_merge_not_implemented = Multiple JPred subjob merging not yet implemented
  label.job_never_ran = Job never ran - input returned to user.
  error.implementation_error_minlen_must_be_greater_zero = Implementation error: minlen must be zero or more
  error.implementation_error_msawbjob_called = Implementation error - StartJob(MsaWSJob) called on a WSJobInstance {0}
@@@ -1079,7 -1077,7 +1079,7 @@@ exception.unexpected_handling_rnaml_tra
  exception.couldnt_recover_sequence_properties_for_alignment = Couldn't recover sequence properties for alignment
  exception.unknown_format_for_file = Unknown format {0} for file \: \n{1}
  label.remove_gaps = Remove Gaps
- exception.couldnt_recover_sequence_props_for_jnet_query = Couldn't recover sequence properties for JNet Query sequence!
+ exception.couldnt_recover_sequence_props_for_jnet_query = Couldn't recover sequence properties for JPred Query sequence!
  exception.server_timeout_try_later = Server timed out - try again later\n
  exception.web_service_returned_null_try_later= Server at {0} returned null object, it probably cannot be contacted. Try again later.
  exception.cannot_contact_service_endpoint_at = Cannot contact service endpoint at {0}
@@@ -1101,7 -1099,7 +1101,7 @@@ info.job_couldnt_be_run_exceeded_hard_l
  info.job_couldnt_be_run_incorrect_param_setting = Job could not be run because some of the parameter settings are not supported by the server.\n{0}\nPlease check to make sure you have used the correct parameter set for this service\!\n
  info.no_jobs_ran = No jobs ran
  info.failed_to_submit_prediction = Failed to submit the prediction\:\n{0} {1}
- info.invalid_jnet_job_result_data ={0}\n{1}\nInvalid JNet job result data\!\n{2}
+ info.invalid_jnet_job_result_data ={0}\n{1}\nInvalid JPred job result data\!\n{2}
  info.failed_to_submit_sequences_for_alignment = Failed to submit sequences for alignment.\nIt is most likely that there is a problem with the server.\nJust close the window\n
  info.alignment_object_method_notes = \nAlignment Object Method Notes\n
  info.server_exception = \n{0} Server exception\!\n{1}
@@@ -74,12 -74,6 +74,12 @@@ import MCview.PDBChain
  
  public class SiftsClient implements SiftsClientI
  {
 +  /*
 +   * for use in mocking out file fetch for tests only
 +   * - reset to null after testing!
 +   */
 +  private static File mockSiftsFile;
 +
    private Entry siftsEntry;
  
    private StructureFile pdb;
     */
    public static File getSiftsFile(String pdbId) throws SiftsException
    {
 +    /*
 +     * return mocked file if it has been set
 +     */
 +    if (mockSiftsFile != null)
 +    {
 +      return mockSiftsFile;
 +    }
 +
      String siftsFileName = SiftsSettings.getSiftDownloadDirectory()
              + pdbId.toLowerCase() + ".xml.gz";
      File siftsFile = new File(siftsFileName);
        siftsDownloadDir.mkdirs();
      }
      // System.out.println(">> Download ftp url : " + siftsFileFTPURL);
+     // long now = System.currentTimeMillis();
      URL url = new URL(siftsFileFTPURL);
      URLConnection conn = url.openConnection();
      InputStream inputStream = conn.getInputStream();
      }
      outputStream.close();
      inputStream.close();
-     // System.out.println(">>> File downloaded : " + downloadedSiftsFile);
+ //    System.out.println(">>> File downloaded : " + downloadedSiftsFile
+ //            + " took " + (System.currentTimeMillis() - now) + "ms");
      return new File(downloadedSiftsFile);
    }
  
      return siftsEntry.getDbVersion();
    }
  
 +  public static void setMockSiftsFile(File file)
 +  {
 +    mockSiftsFile = file;
 +  }
 +
  }