Skip to content

Commit d715f53

Browse files
committed
Fix HTML
1 parent 56f1d39 commit d715f53

File tree

2 files changed

+62
-62
lines changed

2 files changed

+62
-62
lines changed

src/org/labkey/remoteapi/query/SaveRowsApiCommand.java

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -25,35 +25,35 @@
2525
* <p>
2626
* Example usage:
2727
* <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();
3131
*
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+
* )));
3838
*
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);
5050
*
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"))));
5454
*
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");
5757
* </code></pre>
5858
*/
5959
public class SaveRowsApiCommand extends PostCommand<SaveRowsApiResponse>

src/org/labkey/remoteapi/query/SaveRowsApiResponse.java

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -20,46 +20,46 @@
2020
* <p>
2121
* Example usage:
2222
* <pre><code>
23-
* SaveRowsApiCommand cmd = new SaveRowsApiCommand();
24-
* // Add commands to insert/update/delete gene annotations...
25-
* SaveRowsApiResponse response = cmd.execute(connection, "GenomeProject");
23+
* SaveRowsApiCommand cmd = new SaveRowsApiCommand();
24+
* // Add commands to insert/update/delete gene annotations...
25+
* SaveRowsApiResponse response = cmd.execute(connection, "GenomeProject");
2626
*
27-
* if (response.isCommitted())
28-
* {
29-
* for (SaveRowsApiResponse.Result result : response.getResults())
30-
* {
31-
* System.out.println(String.format(
32-
* "%s operation affected %d rows in %s.%s",
33-
* result.getCommand(),
34-
* result.getRowsAffected(),
35-
* result.getSchemaName(),
36-
* result.getQueryName()
37-
* ));
27+
* if (response.isCommitted())
28+
* {
29+
* for (SaveRowsApiResponse.Result result : response.getResults())
30+
* {
31+
* System.out.println(String.format(
32+
* "%s operation affected %d rows in %s.%s",
33+
* result.getCommand(),
34+
* result.getRowsAffected(),
35+
* result.getSchemaName(),
36+
* result.getQueryName()
37+
* ));
3838
*
39-
* // For detailed examination of affected rows
40-
* for (Map<String, Object> row : result.getRows())
41-
* {
42-
* System.out.println(String.format(
43-
* "Gene %s annotation at position %d-%d",
44-
* row.get("geneName"),
45-
* row.get("start"),
46-
* row.get("end")
47-
* ));
48-
* }
39+
* // For detailed examination of affected rows
40+
* for (Map&gt;String, Object> row : result.getRows())
41+
* {
42+
* System.out.println(String.format(
43+
* "Gene %s annotation at position %d-%d",
44+
* row.get("geneName"),
45+
* row.get("start"),
46+
* row.get("end")
47+
* ));
48+
* }
4949
*
50-
* // Check if operation was audited
51-
* if (result.getTransactionAuditId() > 0)
52-
* {
53-
* System.out.println("Audit record created with ID: " +
54-
* result.getTransactionAuditId());
55-
* }
56-
* }
57-
* }
58-
* else
59-
* {
60-
* System.out.println("Transaction failed with " +
61-
* response.getErrorCount() + " errors");
62-
* }
50+
* // Check if operation was audited
51+
* if (result.getTransactionAuditId() > 0)
52+
* {
53+
* System.out.println("Audit record created with ID: " +
54+
* result.getTransactionAuditId());
55+
* }
56+
* }
57+
* }
58+
* else
59+
* {
60+
* System.out.println("Transaction failed with " +
61+
* response.getErrorCount() + " errors");
62+
* }
6363
* </code></pre>
6464
*/
6565
public class SaveRowsApiResponse extends CommandResponse

0 commit comments

Comments
 (0)