private void saveSemanticTypesInformation(
      Worksheet worksheet, VWorkspace vWorkspace, Collection<SemanticType> semanticTypes)
      throws JSONException {
    JSONArray typesArray = new JSONArray();

    // Add the vworksheet information
    JSONObject vwIDJObj = new JSONObject();
    vwIDJObj.put(ClientJsonKeys.name.name(), ParameterType.vWorksheetId.name());
    vwIDJObj.put(ClientJsonKeys.type.name(), ParameterType.vWorksheetId.name());
    vwIDJObj.put(ClientJsonKeys.value.name(), vWorksheetId);
    typesArray.put(vwIDJObj);

    // Add the check history information
    JSONObject chIDJObj = new JSONObject();
    chIDJObj.put(ClientJsonKeys.name.name(), ParameterType.checkHistory.name());
    chIDJObj.put(ClientJsonKeys.type.name(), ParameterType.other.name());
    chIDJObj.put(ClientJsonKeys.value.name(), false);
    typesArray.put(chIDJObj);

    for (SemanticType type : semanticTypes) {
      // Add the hNode information
      JSONObject hNodeJObj = new JSONObject();
      hNodeJObj.put(ClientJsonKeys.name.name(), ParameterType.hNodeId.name());
      hNodeJObj.put(ClientJsonKeys.type.name(), ParameterType.hNodeId.name());
      hNodeJObj.put(ClientJsonKeys.value.name(), type.getHNodeId());
      typesArray.put(hNodeJObj);

      // Add the semantic type information
      JSONObject typeJObj = new JSONObject();
      typeJObj.put(ClientJsonKeys.name.name(), ClientJsonKeys.SemanticType.name());
      typeJObj.put(ClientJsonKeys.type.name(), ParameterType.other.name());
      typeJObj.put(ClientJsonKeys.value.name(), type.getJSONArrayRepresentation());
      typesArray.put(typeJObj);
    }
    setInputParameterJson(typesArray.toString(4));
  }