@@ -132,6 +132,7 @@ public class ProjectMetadataImpl implements ProjectMetadata, Serializable {
132132 @ Setter
133133 private String lessonPlan ;
134134
135+ @ Column (name = "standards" , length = 5120000 , columnDefinition = "mediumtext" )
135136 @ Getter
136137 @ Setter
137138 private String standards ;
@@ -203,20 +204,6 @@ public class ProjectMetadataImpl implements ProjectMetadata, Serializable {
203204 @ Setter
204205 private String researchProjects ;
205206
206- @ Getter
207- @ Setter
208- private String disciplines ;
209-
210- @ Getter
211- @ Setter
212- private String resources ;
213-
214- private String standardsDefault = "{\" commonCore\" : [], \" ngss\" : [], \" learningForJustice\" : []}" ;
215-
216- @ Getter
217- @ Setter
218- private String unitType ;
219-
220207 public ProjectMetadataImpl () {
221208 }
222209
@@ -259,18 +246,6 @@ public void populateFromJSON(JSONObject metadataJSON) {
259246 }
260247 setResearchProjects (researchProjects .toString ());
261248
262- JSONArray disciplines = metadataJSON .optJSONArray ("disciplines" );
263- if (disciplines == null ) {
264- disciplines = new JSONArray ();
265- }
266- setDisciplines (disciplines .toString ());
267-
268- JSONArray resources = metadataJSON .optJSONArray ("resources" );
269- if (resources == null ) {
270- resources = new JSONArray ();
271- }
272- setResources (resources .toString ());
273-
274249 JSONArray parentProjects = metadataJSON .optJSONArray ("parentProjects" );
275250 if (parentProjects == null ) {
276251 parentProjects = new JSONArray ();
@@ -343,7 +318,10 @@ public void populateFromJSON(JSONObject metadataJSON) {
343318 }
344319 setLessonPlan (lessonPlan );
345320
346- String standards = metadataJSON .optString ("standards" , this .standardsDefault );
321+ String standards = metadataJSON .optString ("standards" , "" );
322+ if (standards .equals ("null" )) {
323+ standards = "" ;
324+ }
347325 setStandards (standards );
348326
349327 JSONObject standardsAddressed = metadataJSON .optJSONObject ("standardsAddressed" );
@@ -389,8 +367,6 @@ public void populateFromJSON(JSONObject metadataJSON) {
389367 postLevel = (long ) 5 ;
390368 }
391369 setPostLevel (postLevel );
392-
393- setUnitType (metadataJSON .optString ("unitType" , "Platform" ));
394370 }
395371
396372 /**
@@ -479,17 +455,12 @@ public String toJSONString() {
479455 metadata .put ("tools" , new JSONObject ());
480456 }
481457
482- String standardsString = metadata .getString ("standards" );
483- if (standardsString != null && standardsString != "null" ) {
484- JSONObject standardsJSON ;
485- try {
486- standardsJSON = new JSONObject (standardsString );
487- } catch (JSONException e ) {
488- standardsJSON = new JSONObject (standardsDefault );
489- }
490- metadata .put ("standards" , standardsJSON );
458+ String standardsAddressedString = metadata .getString ("standardsAddressed" );
459+ if (standardsAddressedString != null && standardsAddressedString != "null" ) {
460+ JSONObject standardsAddressedJSON = new JSONObject (standardsAddressedString );
461+ metadata .put ("standardsAddressed" , standardsAddressedJSON );
491462 } else {
492- metadata .put ("standards " , new JSONObject ());
463+ metadata .put ("standardsAddressed " , new JSONObject ());
493464 }
494465
495466 String parentProjectsString = metadata .getString ("parentProjects" );
@@ -508,21 +479,6 @@ public String toJSONString() {
508479 metadata .put ("researchProjects" , new JSONArray ());
509480 }
510481
511- String disciplinesString = metadata .getString ("disciplines" );
512- if (disciplinesString != null && disciplinesString != "null" ) {
513- JSONArray disciplinesJSON = new JSONArray (disciplinesString );
514- metadata .put ("disciplines" , disciplinesJSON );
515- } else {
516- metadata .put ("disciplines" , new JSONArray ());
517- }
518-
519- String resourcesString = metadata .getString ("resources" );
520- if (resourcesString != null && resourcesString != "null" ) {
521- JSONArray resourcesJSON = new JSONArray (resourcesString );
522- metadata .put ("resources" , resourcesJSON );
523- } else {
524- metadata .put ("resources" , new JSONArray ());
525- }
526482 } catch (JSONException e ) {
527483 e .printStackTrace ();
528484 }
0 commit comments