test_class.file: app/src/test/java/org/hwyl/sexytopo/control/io/basic/MetadataTranslaterTest.java
test_class.identifier: MetadataTranslaterTest
test_case.body: @Test
      public void testJsonIsTranslatedToSurveyWithActiveStation() throws Exception {
          String json = "{\"active-station\":\"1\",\"connections\":{}}";
  
          Survey testSurvey = BasicTestSurveyCreator.createStraightNorth();
          testSurvey.setActiveStation(testSurvey.getStationByName("2"));
  
          MetadataTranslater.translateAndUpdate(null, testSurvey, json);
          Assert.assertEquals("1", testSurvey.getActiveStation().getName());
          Assert.assertEquals(0, testSurvey.getConnectedSurveys().size());
  
      }
test_case.class_method_signature: MetadataTranslaterTest.testJsonIsTranslatedToSurveyWithActiveStation()
test_case.full_signature: @Test public void testJsonIsTranslatedToSurveyWithActiveStation()
test_case.identifier: testJsonIsTranslatedToSurveyWithActiveStation
test_case.invocations: createStraightNorth setActiveStation getStationByName translateAndUpdate assertEquals getName getActiveStation assertEquals size getConnectedSurveys
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testJsonIsTranslatedToSurveyWithActiveStation()
focal_class.declarator: CONNECTIONS_TAG = "connections"
focal_class.modifier: public static final
focal_class.original_string: public static final String CONNECTIONS_TAG = "connections";
focal_class.type: String
focal_class.var_name: CONNECTIONS_TAG
focal_class.declarator: ACTIVE_STATION_TAG = "active-station"
focal_class.modifier: public static final
focal_class.original_string: public static final String ACTIVE_STATION_TAG = "active-station";
focal_class.type: String
focal_class.var_name: ACTIVE_STATION_TAG
focal_class.file: app/src/main/java/org/hwyl/sexytopo/control/io/basic/MetadataTranslater.java
focal_class.identifier: MetadataTranslater
focal_class.class_method_signature: MetadataTranslater.translate(Survey survey)
focal_class.full_signature: public static String translate(Survey survey)
focal_class.identifier: translate
focal_class.modifiers: public static
focal_class.parameters: (Survey survey)
focal_class.return: String
focal_class.signature: String translate(Survey survey)
focal_class.class_method_signature: MetadataTranslater.translateAndUpdate(Context context, Survey survey, String string)
focal_class.full_signature: public static void translateAndUpdate(Context context, Survey survey, String string)
focal_class.identifier: translateAndUpdate
focal_class.modifiers: public static
focal_class.parameters: (Context context, Survey survey, String string)
focal_class.return: void
focal_class.signature: void translateAndUpdate(Context context, Survey survey, String string)
focal_class.class_method_signature: MetadataTranslater.translateAndUpdate(
              Context context,
              Survey survey,
              String string,
              Set<String> surveyNamesNotToLoad)
focal_class.full_signature: public static void translateAndUpdate(
              Context context,
              Survey survey,
              String string,
              Set<String> surveyNamesNotToLoad)
focal_class.identifier: translateAndUpdate
focal_class.modifiers: public static
focal_class.parameters: (
              Context context,
              Survey survey,
              String string,
              Set<String> surveyNamesNotToLoad)
focal_class.return: void
focal_class.signature: void translateAndUpdate(
              Context context,
              Survey survey,
              String string,
              Set<String> surveyNamesNotToLoad)
focal_class.class_method_signature: MetadataTranslater.toJson(Survey survey)
focal_class.full_signature: public static JSONObject toJson(Survey survey)
focal_class.identifier: toJson
focal_class.modifiers: public static
focal_class.parameters: (Survey survey)
focal_class.return: JSONObject
focal_class.signature: JSONObject toJson(Survey survey)
focal_class.class_method_signature: MetadataTranslater.toJson(Map<Station, Set<SurveyConnection>> connectedSurveys)
focal_class.full_signature: private static JSONObject toJson(Map<Station, Set<SurveyConnection>> connectedSurveys)
focal_class.identifier: toJson
focal_class.modifiers: private static
focal_class.parameters: (Map<Station, Set<SurveyConnection>> connectedSurveys)
focal_class.return: JSONObject
focal_class.signature: JSONObject toJson(Map<Station, Set<SurveyConnection>> connectedSurveys)
focal_class.class_method_signature: MetadataTranslater.toJson(SurveyConnection connection)
focal_class.full_signature: private static JSONArray toJson(SurveyConnection connection)
focal_class.identifier: toJson
focal_class.modifiers: private static
focal_class.parameters: (SurveyConnection connection)
focal_class.return: JSONArray
focal_class.signature: JSONArray toJson(SurveyConnection connection)
focal_class.class_method_signature: MetadataTranslater.translateAndUpdate(
              Context context, Survey survey, JSONObject json, Set<String> surveyNamesNotToLoad)
focal_class.full_signature: private static void translateAndUpdate(
              Context context, Survey survey, JSONObject json, Set<String> surveyNamesNotToLoad)
focal_class.identifier: translateAndUpdate
focal_class.modifiers: private static
focal_class.parameters: (
              Context context, Survey survey, JSONObject json, Set<String> surveyNamesNotToLoad)
focal_class.return: void
focal_class.signature: void translateAndUpdate(
              Context context, Survey survey, JSONObject json, Set<String> surveyNamesNotToLoad)
focal_class.class_method_signature: MetadataTranslater.translateAndUpdateActiveStation(Survey survey, JSONObject json)
focal_class.full_signature: private static void translateAndUpdateActiveStation(Survey survey, JSONObject json)
focal_class.identifier: translateAndUpdateActiveStation
focal_class.modifiers: private static
focal_class.parameters: (Survey survey, JSONObject json)
focal_class.return: void
focal_class.signature: void translateAndUpdateActiveStation(Survey survey, JSONObject json)
focal_class.class_method_signature: MetadataTranslater.translateAndUpdateConnections(
              Context context,
              Survey survey,
              JSONObject json,
              Set<String> surveyNamesNotToLoad)
focal_class.full_signature: private static void translateAndUpdateConnections(
              Context context,
              Survey survey,
              JSONObject json,
              Set<String> surveyNamesNotToLoad)
focal_class.identifier: translateAndUpdateConnections
focal_class.modifiers: private static
focal_class.parameters: (
              Context context,
              Survey survey,
              JSONObject json,
              Set<String> surveyNamesNotToLoad)
focal_class.return: void
focal_class.signature: void translateAndUpdateConnections(
              Context context,
              Survey survey,
              JSONObject json,
              Set<String> surveyNamesNotToLoad)
focal_class.class_method_signature: MetadataTranslater.toListOfArrays(JSONArray array)
focal_class.full_signature: public static List<JSONArray> toListOfArrays(JSONArray array)
focal_class.identifier: toListOfArrays
focal_class.modifiers: public static
focal_class.parameters: (JSONArray array)
focal_class.return: List<JSONArray>
focal_class.signature: List<JSONArray> toListOfArrays(JSONArray array)
focal_method.body: public static void translateAndUpdate(Context context, Survey survey, String string)
              throws Exception {
          Set<String> surveyNamesNotToLoad = new HashSet<>();
          translateAndUpdate(context, survey, string, surveyNamesNotToLoad);
      }
focal_method.class_method_signature: MetadataTranslater.translateAndUpdate(Context context, Survey survey, String string)
focal_method.full_signature: public static void translateAndUpdate(Context context, Survey survey, String string)
focal_method.identifier: translateAndUpdate
focal_method.invocations: translateAndUpdate
focal_method.modifiers: public static
focal_method.parameters: (Context context, Survey survey, String string)
focal_method.return: void
focal_method.signature: void translateAndUpdate(Context context, Survey survey, String string)