@@ -104,6 +104,10 @@ public KrillCollection (String jsonString) {
104104 if (json .has ("errors" ) && json .get ("errors" ).size () > 0 ) {
105105 this .addError (StatusCodes .INVALID_QUERY , "Json has errors." );
106106 }
107+ else if (json .has ("corpus" )) {
108+ this .fromKoral (json .get ("corpus" ));
109+ }
110+ // EM: legacy
107111 else if (json .has ("collection" )) {
108112 this .fromKoral (json .get ("collection" ));
109113 }
@@ -113,7 +117,7 @@ else if (json.has("collections")) {
113117 }
114118 else {
115119 this .addError (StatusCodes .MISSING_COLLECTION ,
116- "Collection is not found" );
120+ "VC is not found" );
117121 this .fromBuilder (this .build ().nothing ());
118122 }
119123 }
@@ -216,7 +220,7 @@ else if (KrillProperties.isTest
216220 }
217221 else {
218222 this .addError (StatusCodes .MISSING_COLLECTION ,
219- "Collection is not found " + fileName );
223+ "VC is not found " + fileName );
220224 return this ;
221225 };
222226
@@ -251,6 +255,10 @@ public KrillCollection fromKoral (JsonNode json) throws QueryException {
251255 private CollectionBuilder .Interface _fromKoral (JsonNode json )
252256 throws QueryException {
253257
258+ if (json .has ("corpus" )) {
259+ return this ._fromKoral (json .at ("/corpus" ));
260+ };
261+
254262 if (json .has ("collection" )) {
255263 return this ._fromKoral (json .at ("/collection" ));
256264 };
0 commit comments