9d89ac753f2856a1fbd5dd7bce16f3134b295bf7
[jalview.git] / src / jalview / ext / rbvi / chimera / ChimeraXManager.java
1 package jalview.ext.rbvi.chimera;
2
3 import java.util.List;
4
5 import ext.edu.ucsf.rbvi.strucviz2.ChimeraManager;
6 import ext.edu.ucsf.rbvi.strucviz2.StructureManager;
7
8 /**
9  * A class to help Jalview start, stop and send commands to ChimeraX.
10  * <p>
11  * Much of the functionality is common with Chimera, so for convenience we
12  * extend ChimeraManager, however note this class is <em>not</em> based on the
13  * Cytoscape class at
14  * {@code https://github.com/RBVI/structureVizX/blob/master/src/main/java/edu/ucsf/rbvi/structureVizX/internal/model/ChimeraManager.java}.
15  * 
16  * @author gmcarstairs
17  *
18  */
19 public class ChimeraXManager extends ChimeraManager
20 {
21
22   public ChimeraXManager(StructureManager structureManager)
23   {
24     super(structureManager);
25   }
26
27   public boolean isChimeraX()
28   {
29     return true;
30   }
31
32   /**
33    * Returns "POST" as the HTTP request method to use for REST service calls to ChimeraX
34    * @return
35    */
36   protected String getHttpRequestMethod()
37   {
38     return "GET";
39   }
40
41   /**
42    * Adds command-line arguments to start the REST server
43    */
44   protected void addLaunchArguments(List<String> args)
45   {
46     args.add("--cmd");
47     args.add("remote rest start");
48   }
49
50 }