From 428f7dabf8d0154086fb426e1f150d949537ba27 Mon Sep 17 00:00:00 2001 From: Jacky Date: Wed, 8 Nov 2017 20:40:22 -0500 Subject: [PATCH] change the filed name from rowNumber to rowCount --- main/src/com/google/refine/ProjectMetadata.java | 14 +++++++------- .../com/google/refine/io/FileProjectManager.java | 2 +- main/webapp/modules/core/langs/translation-en.json | 2 +- .../core/scripts/index/edit-metadata-dialog.js | 2 +- .../modules/core/scripts/index/open-project-ui.js | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/main/src/com/google/refine/ProjectMetadata.java b/main/src/com/google/refine/ProjectMetadata.java index 7fc67da3e..ac02838db 100644 --- a/main/src/com/google/refine/ProjectMetadata.java +++ b/main/src/com/google/refine/ProjectMetadata.java @@ -68,7 +68,7 @@ public class ProjectMetadata implements Jsonizable { private String _contributors = ""; private String _subject = ""; // Several refine projects may be linked private String _description = ""; // free form of comment - private int _rowNumber; // at the creation. Essential for cleaning old projects too heavy + private int _rowCount; // 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(); @@ -109,7 +109,7 @@ public class ProjectMetadata implements Jsonizable { writer.key("contributors"); writer.value(_contributors); writer.key("subject"); writer.value(_subject); writer.key("description"); writer.value(_description); - writer.key("rowNumber"); writer.value(_rowNumber); + writer.key("rowCount"); writer.value(_rowCount); writer.key("customMetadata"); writer.object(); for (String key : _customMetadata.keySet()) { @@ -194,7 +194,7 @@ public class ProjectMetadata implements Jsonizable { pm._contributors = JSONUtilities.getString(obj, "contributors", ""); pm._subject = JSONUtilities.getString(obj, "subject", ""); pm._description = JSONUtilities.getString(obj, "description", ""); - pm._rowNumber = JSONUtilities.getInt(obj, "rowNumber", 0); + pm._rowCount = JSONUtilities.getInt(obj, "rowCount", 0); if (obj.has("preferences") && !obj.isNull("preferences")) { try { @@ -389,13 +389,13 @@ public class ProjectMetadata implements Jsonizable { } - public int getRowNumber() { - return _rowNumber; + public int getRowCount() { + return _rowCount; } - public void setRowNumber(int rowNumber) { - this._rowNumber = rowNumber; + public void setRowCount(int rowCount) { + this._rowCount = rowCount; updateModified(); } diff --git a/main/src/com/google/refine/io/FileProjectManager.java b/main/src/com/google/refine/io/FileProjectManager.java index ffbef0731..f0a5211d7 100644 --- a/main/src/com/google/refine/io/FileProjectManager.java +++ b/main/src/com/google/refine/io/FileProjectManager.java @@ -287,7 +287,7 @@ public class FileProjectManager extends ProjectManager { jsonWriter.value(id); if (metadata.isDirty()) { Project project = ProjectManager.singleton.getProject(id); - metadata.setRowNumber(project.rows.size()); + metadata.setRowCount(project.rows.size()); ProjectMetadataUtilities.save(metadata, getProjectDir(id)); saveWasNeeded = true; } diff --git a/main/webapp/modules/core/langs/translation-en.json b/main/webapp/modules/core/langs/translation-en.json index ac9fc0aad..c2ac93c05 100644 --- a/main/webapp/modules/core/langs/translation-en.json +++ b/main/webapp/modules/core/langs/translation-en.json @@ -93,7 +93,7 @@ "contributors": "Contributors", "subject": "Subject", "description": "Description", - "row-number": "Row Number", + "row-count": "Row Count", "last-mod": "Last modified", "del-title": "Delete this project", "del-body": "Are you sure you want to delete project \"", 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 b09a085bb..5afd5b3c5 100644 --- a/main/webapp/modules/core/scripts/index/edit-metadata-dialog.js +++ b/main/webapp/modules/core/scripts/index/edit-metadata-dialog.js @@ -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 !== "rowCount" && key !== "importOptionMetadata" && key !== "id") { $('