|
25 | 25 | * <p>
|
26 | 26 | * Example usage:
|
27 | 27 | * <pre><code>
|
28 |
| - * ApiKeyCredentialsProvider credentials = new ApiKeyCredentialsProvider("xxx"); |
29 |
| - * Connection conn = new Connection("http://localhost:8080", credentials); |
30 |
| - * SaveRowsApiCommand saveCmd = new SaveRowsApiCommand(); |
| 28 | + * ApiKeyCredentialsProvider credentials = new ApiKeyCredentialsProvider("xxx"); |
| 29 | + * Connection conn = new Connection("http://localhost:8080", credentials); |
| 30 | + * SaveRowsApiCommand saveCmd = new SaveRowsApiCommand(); |
31 | 31 | *
|
32 |
| - * // Add new gene annotations |
33 |
| - * saveCmd.addCommand(new Command(CommandType.Insert, "genome", "GeneAnnotations", |
34 |
| - * List.of( |
35 |
| - * Map.of("name", "p53 binding site", "geneName", "TP53", "start", 1000, "end", 1020), |
36 |
| - * Map.of("name", "TATA box", "geneName", "BRCA1", "start", 2500, "end", 2506) |
37 |
| - * ))); |
| 32 | + * // Add new gene annotations |
| 33 | + * saveCmd.addCommand(new Command(CommandType.Insert, "genome", "GeneAnnotations", |
| 34 | + * List.of( |
| 35 | + * Map.of("name", "p53 binding site", "geneName", "TP53", "start", 1000, "end", 1020), |
| 36 | + * Map.of("name", "TATA box", "geneName", "BRCA1", "start", 2500, "end", 2506) |
| 37 | + * ))); |
38 | 38 | *
|
39 |
| - * // Update annotation positions |
40 |
| - * Command updateCmd = new Command(CommandType.Update, "genome", "GeneAnnotations", |
41 |
| - * List.of(Map.of( |
42 |
| - * "name", "Promoter region", |
43 |
| - * "geneName", "EGFR", |
44 |
| - * "start", 5000, |
45 |
| - * "end", 5500 |
46 |
| - * ))); |
47 |
| - * updateCmd.setAuditBehavior(SaveRowsCommand.AuditBehavior.DETAILED); |
48 |
| - * updateCmd.setAuditUserComment("Updated promoter region coordinates based on new assembly"); |
49 |
| - * saveCmd.addCommand(updateCmd); |
| 39 | + * // Update annotation positions |
| 40 | + * Command updateCmd = new Command(CommandType.Update, "genome", "GeneAnnotations", |
| 41 | + * List.of(Map.of( |
| 42 | + * "name", "Promoter region", |
| 43 | + * "geneName", "EGFR", |
| 44 | + * "start", 5000, |
| 45 | + * "end", 5500 |
| 46 | + * ))); |
| 47 | + * updateCmd.setAuditBehavior(SaveRowsCommand.AuditBehavior.DETAILED); |
| 48 | + * updateCmd.setAuditUserComment("Updated promoter region coordinates based on new assembly"); |
| 49 | + * saveCmd.addCommand(updateCmd); |
50 | 50 | *
|
51 |
| - * // Delete obsolete annotation |
52 |
| - * saveCmd.addCommand(new Command(CommandType.Delete, "genome", "GeneAnnotations", |
53 |
| - * List.of(Map.of("name", "Putative enhancer", "geneName", "MYC")))); |
| 51 | + * // Delete obsolete annotation |
| 52 | + * saveCmd.addCommand(new Command(CommandType.Delete, "genome", "GeneAnnotations", |
| 53 | + * List.of(Map.of("name", "Putative enhancer", "geneName", "MYC")))); |
54 | 54 | *
|
55 |
| - * // Execute all commands in a transaction |
56 |
| - * SaveRowsApiResponse response = saveCmd.execute(conn, "GenomeProject"); |
| 55 | + * // Execute all commands in a transaction |
| 56 | + * SaveRowsApiResponse response = saveCmd.execute(conn, "GenomeProject"); |
57 | 57 | * </code></pre>
|
58 | 58 | */
|
59 | 59 | public class SaveRowsApiCommand extends PostCommand<SaveRowsApiResponse>
|
|
0 commit comments