Skip to content

Commit 6dfd5c9

Browse files
authored
Migrate to new JSONObject/JSONArray (#162)
1 parent cbdb2a7 commit 6dfd5c9

File tree

54 files changed

+102
-97
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+102
-97
lines changed

GenotypeAssays/resources/assay/GenotypeAssay/queries/Batches.query.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<column columnName="Hypothesis">
1212
<shownInInsertView>false</shownInInsertView>
1313
</column>
14-
<column columnName="Comments">
14+
<column columnName="comments">
1515
<shownInInsertView>false</shownInInsertView>
1616
</column>
1717
<column columnName="importMethod">

GenotypeAssays/resources/assay/GenotypeAssay/queries/Runs.query.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<column columnName="Name">
88
<columnTitle>Run Name</columnTitle>
99
</column>
10-
<column columnName="Comments">
10+
<column columnName="comments">
1111
<columnTitle>Run Description</columnTitle>
1212
<nullable>true</nullable>
1313
</column>

GenotypeAssays/resources/assay/SnpAssay/queries/Batches.query.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<column columnName="Hypothesis">
1212
<shownInInsertView>false</shownInInsertView>
1313
</column>
14-
<column columnName="Comments">
14+
<column columnName="comments">
1515
<shownInInsertView>false</shownInInsertView>
1616
</column>
1717
<column columnName="importMethod">

GenotypeAssays/resources/assay/SnpAssay/queries/Runs.query.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<column columnName="Name">
88
<columnTitle>Run Name</columnTitle>
99
</column>
10-
<column columnName="Comments">
10+
<column columnName="comments">
1111
<columnTitle>Run Description</columnTitle>
1212
<nullable>true</nullable>
1313
</column>

GenotypeAssays/src/org/labkey/genotypeassays/GenotypeAssaysController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package org.labkey.genotypeassays;
1818

19-
import org.json.old.JSONArray;
19+
import org.json.JSONArray;
2020
import org.labkey.api.action.ApiResponse;
2121
import org.labkey.api.action.ApiSimpleResponse;
2222
import org.labkey.api.action.ConfirmAction;

GenotypeAssays/src/org/labkey/genotypeassays/GenotypeAssaysManager.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818

1919
import org.apache.logging.log4j.LogManager;
2020
import org.apache.logging.log4j.Logger;
21-
import org.json.old.JSONArray;
22-
import org.json.old.JSONObject;
21+
import org.json.JSONArray;
22+
import org.json.JSONObject;
2323
import org.labkey.api.assay.AssayProtocolSchema;
2424
import org.labkey.api.assay.AssayProvider;
2525
import org.labkey.api.assay.AssayService;
@@ -45,6 +45,7 @@
4545
import org.labkey.api.query.ValidationException;
4646
import org.labkey.api.security.User;
4747
import org.labkey.api.util.FileUtil;
48+
import org.labkey.api.util.JsonUtil;
4849
import org.labkey.api.util.PageFlowUtil;
4950
import org.labkey.api.util.Pair;
5051
import org.labkey.api.view.ViewContext;
@@ -197,7 +198,7 @@ public Pair<List<Integer>, List<Integer>> cacheHaplotypes(final ViewContext ctx,
197198

198199
Set<Integer> analysisIds = new HashSet<>();
199200
final Map<Integer, List<JSONObject>> haploMap = new HashMap<>();
200-
for (JSONObject row : data.toJSONObjectArray())
201+
for (JSONObject row : JsonUtil.toJSONObjectList(data))
201202
{
202203
Integer analysisId = row.getInt("analysisId");
203204
analysisIds.add(analysisId);

GenotypeAssays/src/org/labkey/genotypeassays/assay/DefaultGenotypeAssaysImportMethod.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package org.labkey.genotypeassays.assay;
22

3+
import org.apache.commons.lang3.StringUtils;
34
import org.labkey.api.data.Container;
4-
import org.labkey.api.gwt.client.util.StringUtils;
55
import org.labkey.api.laboratory.assay.AssayImportMethod;
66
import org.labkey.api.laboratory.assay.AssayParser;
77
import org.labkey.api.laboratory.assay.DefaultAssayImportMethod;
@@ -33,7 +33,7 @@ public AssayParser getFileParser(Container c, User u, int assayId)
3333
return new DefaultGenotypeAssayParser(this, c, u, assayId);
3434
}
3535

36-
public class DefaultGenotypeAssayParser extends DefaultAssayParser
36+
public static class DefaultGenotypeAssayParser extends DefaultAssayParser
3737
{
3838
public DefaultGenotypeAssayParser(AssayImportMethod method, Container c, User u, int assayId)
3939
{

GenotypeAssays/src/org/labkey/genotypeassays/assay/DefaultSnpAssayImportMethod.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.labkey.genotypeassays.assay;
22

3-
import org.json.old.JSONObject;
3+
import org.json.JSONObject;
44
import org.labkey.api.exp.api.ExpProtocol;
55
import org.labkey.api.laboratory.assay.DefaultAssayImportMethod;
66
import org.labkey.api.view.ViewContext;

GenotypeAssays/src/org/labkey/genotypeassays/assay/GenotypeAssayDataProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.labkey.genotypeassays.assay;
22

3-
import org.json.old.JSONObject;
3+
import org.json.JSONObject;
44
import org.labkey.api.data.Container;
55
import org.labkey.api.data.ContainerManager;
66
import org.labkey.api.laboratory.NavItem;

GenotypeAssays/src/org/labkey/genotypeassays/assay/SNPAssayDataProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.labkey.genotypeassays.assay;
22

3-
import org.json.old.JSONObject;
3+
import org.json.JSONObject;
44
import org.labkey.api.laboratory.assay.AbstractAssayDataProvider;
55
import org.labkey.api.module.Module;
66
import org.labkey.api.view.ViewContext;

0 commit comments

Comments
 (0)