diff --git a/main/src/com/google/refine/ProjectMetadata.java b/main/src/com/google/refine/ProjectMetadata.java index b1cf896f3..7fc67da3e 100644 --- a/main/src/com/google/refine/ProjectMetadata.java +++ b/main/src/com/google/refine/ProjectMetadata.java @@ -71,7 +71,7 @@ public class ProjectMetadata implements Jsonizable { private int _rowNumber; // at the creation. Essential for cleaning old projects too heavy // import options is an array for 1-n data sources - private JSONArray _importOptionMetaData = new JSONArray(); + private JSONArray _importOptionMetadata = new JSONArray(); // user metadata private JSONArray _userMetadata = new JSONArray();; @@ -120,9 +120,9 @@ public class ProjectMetadata implements Jsonizable { writer.endObject(); // write JSONArray directly - if (_importOptionMetaData.length() > 0 ) { - writer.key("importOptionMetaData"); - writer.value(_importOptionMetaData); + if (_importOptionMetadata.length() > 0 ) { + writer.key("importOptionMetadata"); + writer.value(_importOptionMetadata); } // write user metadata in {name, value, display} form: @@ -231,10 +231,10 @@ public class ProjectMetadata implements Jsonizable { } } - if (obj.has("importOptionMetaData") && !obj.isNull("importOptionMetaData")) { + if (obj.has("importOptionMetadata") && !obj.isNull("importOptionMetadata")) { try { - JSONArray jsonArray = obj.getJSONArray("importOptionMetaData"); - pm._importOptionMetaData = jsonArray; + JSONArray jsonArray = obj.getJSONArray("importOptionMetadata"); + pm._importOptionMetadata = jsonArray; } catch (JSONException e) { logger.error(ExceptionUtils.getFullStackTrace(e)); } @@ -330,17 +330,17 @@ public class ProjectMetadata implements Jsonizable { updateModified(); } - public JSONArray getImportOptionMetaData() { - return _importOptionMetaData; + public JSONArray getImportOptionMetadata() { + return _importOptionMetadata; } - public void setImportOptionMetaData(JSONArray jsonArray) { - _importOptionMetaData = jsonArray; + public void setImportOptionMetadata(JSONArray jsonArray) { + _importOptionMetadata = jsonArray; updateModified(); } - public void appendImportOptionMetaData(JSONObject obj) { - _importOptionMetaData.put(obj); + public void appendImportOptionMetadata(JSONObject obj) { + _importOptionMetadata.put(obj); updateModified(); } diff --git a/main/src/com/google/refine/commands/project/SetProjectMetaDataCommand.java b/main/src/com/google/refine/commands/project/SetProjectMetadataCommand.java similarity index 96% rename from main/src/com/google/refine/commands/project/SetProjectMetaDataCommand.java rename to main/src/com/google/refine/commands/project/SetProjectMetadataCommand.java index 0995f781b..28399a733 100644 --- a/main/src/com/google/refine/commands/project/SetProjectMetaDataCommand.java +++ b/main/src/com/google/refine/commands/project/SetProjectMetadataCommand.java @@ -13,7 +13,7 @@ import com.google.refine.ProjectMetadata; import com.google.refine.commands.Command; import com.google.refine.model.Project; -public class SetProjectMetaDataCommand extends Command { +public class SetProjectMetadataCommand extends Command { @Override public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { diff --git a/main/src/com/google/refine/commands/workspace/GetAllProjectMetadataCommand.java b/main/src/com/google/refine/commands/workspace/GetAllProjectMetadataCommand.java index 018cbb7cb..5e768f656 100644 --- a/main/src/com/google/refine/commands/workspace/GetAllProjectMetadataCommand.java +++ b/main/src/com/google/refine/commands/workspace/GetAllProjectMetadataCommand.java @@ -76,11 +76,11 @@ public class GetAllProjectMetadataCommand extends Command { } writer.endObject(); - String userMeta = (String)ProjectManager.singleton.getPreferenceStore().get("userMetaData"); + String userMeta = (String)ProjectManager.singleton.getPreferenceStore().get("userMetadata"); if (userMeta != null) { - writer.key("customMetaDataColumns"); - JSONArray customMetaDataColumns = new JSONArray(userMeta); - writer.value(customMetaDataColumns); + writer.key("customMetadataColumns"); + JSONArray customMetadataColumns = new JSONArray(userMeta); + writer.value(customMetadataColumns); } writer.endObject(); diff --git a/main/src/com/google/refine/importers/ImportingParserBase.java b/main/src/com/google/refine/importers/ImportingParserBase.java index 5d9ed1c60..b77206a8a 100644 --- a/main/src/com/google/refine/importers/ImportingParserBase.java +++ b/main/src/com/google/refine/importers/ImportingParserBase.java @@ -155,7 +155,7 @@ abstract public class ImportingParserBase implements ImportingParser { // ignore } // set the import options to metadata: - metadata.appendImportOptionMetaData(options); + metadata.appendImportOptionMetadata(options); } public void parseOneFile( diff --git a/main/src/com/google/refine/io/FileProjectManager.java b/main/src/com/google/refine/io/FileProjectManager.java index 04cfc8cbc..ffbef0731 100644 --- a/main/src/com/google/refine/io/FileProjectManager.java +++ b/main/src/com/google/refine/io/FileProjectManager.java @@ -431,7 +431,7 @@ public class FileProjectManager extends ProjectManager { boolean found = false; JSONObject placeHolderJsonObj = userMetadataPreference.getJSONObject(index); - if (!isValidUserMetaDataDefinition(placeHolderJsonObj)) { + if (!isValidUserMetadataDefinition(placeHolderJsonObj)) { logger.warn("Skipped invalid user metadata definition" + placeHolderJsonObj.toString()); continue; } @@ -463,7 +463,7 @@ public class FileProjectManager extends ProjectManager { * @param placeHolderJsonObj * @return */ - private boolean isValidUserMetaDataDefinition(JSONObject placeHolderJsonObj) { + private boolean isValidUserMetadataDefinition(JSONObject placeHolderJsonObj) { return (placeHolderJsonObj != null && placeHolderJsonObj.has("name") && placeHolderJsonObj.has("display")); diff --git a/main/src/com/google/refine/preference/PreferenceStore.java b/main/src/com/google/refine/preference/PreferenceStore.java index 93b4d9c38..314bfefbf 100644 --- a/main/src/com/google/refine/preference/PreferenceStore.java +++ b/main/src/com/google/refine/preference/PreferenceStore.java @@ -48,7 +48,7 @@ import com.google.refine.Jsonizable; import com.google.refine.RefineServlet; public class PreferenceStore implements Jsonizable { - public static final String USER_METADATA_KEY = "userMetaData"; + public static final String USER_METADATA_KEY = "userMetadata"; private boolean dirty = false; protected Map _prefs = new HashMap(); diff --git a/main/webapp/modules/core/MOD-INF/controller.js b/main/webapp/modules/core/MOD-INF/controller.js index 089d27cbb..130bc507c 100644 --- a/main/webapp/modules/core/MOD-INF/controller.js +++ b/main/webapp/modules/core/MOD-INF/controller.js @@ -68,11 +68,11 @@ function registerCommands() { RS.registerCommand(module, "get-project-metadata", new Packages.com.google.refine.commands.project.GetProjectMetadataCommand()); RS.registerCommand(module, "get-all-project-metadata", new Packages.com.google.refine.commands.workspace.GetAllProjectMetadataCommand()); - RS.registerCommand(module, "set-metaData", new Packages.com.google.refine.commands.project.SetProjectMetaDataCommand()); + RS.registerCommand(module, "set-metaData", new Packages.com.google.refine.commands.project.SetProjectMetadataCommand()); RS.registerCommand(module, "delete-project", new Packages.com.google.refine.commands.project.DeleteProjectCommand()); RS.registerCommand(module, "rename-project", new Packages.com.google.refine.commands.project.RenameProjectCommand()); - RS.registerCommand(module, "set-project-metadata", new Packages.com.google.refine.commands.project.SetProjectMetaDataCommand()); + RS.registerCommand(module, "set-project-metadata", new Packages.com.google.refine.commands.project.SetProjectMetadataCommand()); RS.registerCommand(module, "get-models", new Packages.com.google.refine.commands.project.GetModelsCommand()); RS.registerCommand(module, "get-rows", new Packages.com.google.refine.commands.row.GetRowsCommand()); diff --git a/main/webapp/modules/core/scripts/index/edit-metadata-dialog.js b/main/webapp/modules/core/scripts/index/edit-metadata-dialog.js index 2f85cf1cc..b09a085bb 100644 --- a/main/webapp/modules/core/scripts/index/edit-metadata-dialog.js +++ b/main/webapp/modules/core/scripts/index/edit-metadata-dialog.js @@ -4,7 +4,7 @@ function EditMetadataDialog(metaData, targetRowElem) { this._metaDataUIs = []; this._metaData = metaData; - this._MetaDataUI = function(tr, key, value, project) { + this._MetadataUI = function(tr, key, value, project) { var self = this; var td0 = tr.insertCell(0); $(td0).text(key); @@ -14,7 +14,7 @@ function EditMetadataDialog(metaData, targetRowElem) { var td2 = tr.insertCell(2); - if (key !== "modified" && key !== "rowNumber" && key !== "importOptionMetaData" && key !== "id") { + if (key !== "modified" && key !== "rowNumber" && key !== "importOptionMetadata" && key !== "id") { $('