Add customMetadata to project metadata parsing test

This commit is contained in:
Antonin Delpeuch 2019-06-04 12:02:49 +01:00
parent 203cf8c20e
commit b9573d83e0
3 changed files with 4 additions and 4 deletions

View File

@ -114,7 +114,7 @@ public class ProjectMetadata {
private ArrayNode _userMetadata = ParsingUtilities.mapper.createArrayNode();
@JsonProperty("customMetadata")
private Map<String, Serializable> _customMetadata = new HashMap<String, Serializable>();
private Map<String, Object> _customMetadata = new HashMap<>();
@JsonProperty("preferences")
@JsonView(JsonViews.SaveMode.class)
private PreferenceStore _preferenceStore = new PreferenceStore();
@ -247,7 +247,7 @@ public class ProjectMetadata {
@JsonIgnore
public Serializable getCustomMetadata(String key) {
return _customMetadata.get(key);
return (Serializable)_customMetadata.get(key);
}
public void setCustomMetadata(String key, Serializable value) {

View File

@ -1 +1 @@
{"name":"numeric facet test","tags":[],"created":"2018-09-04T16:07:31Z","modified":"2018-09-04T17:02:31Z","creator":"","contributors":"","subject":"","description":"","rowCount":4,"title":"","homepage":"","image":"","license":"","version":"","customMetadata":{},"importOptionMetadata":[{"guessCellValueTypes":false,"projectTags":[""],"ignoreLines":-1,"processQuotes":true,"fileSource":"(clipboard)","encoding":"","separator":"\\t","storeBlankCellsAsNulls":true,"storeBlankRows":true,"skipDataLines":0,"includeFileSources":false,"headerLines":1,"limit":-1,"quoteCharacter":"\"","projectName":"numeric facet test"}]}
{"name":"numeric facet test","tags":[],"created":"2018-09-04T16:07:31Z","modified":"2018-09-04T17:02:31Z","creator":"","contributors":"","subject":"","description":"","rowCount":4,"title":"","homepage":"","image":"","license":"","version":"","customMetadata":{"hash":"a9f7bc0818ab566264e5b83d17eb745c"},"importOptionMetadata":[{"guessCellValueTypes":false,"projectTags":[""],"ignoreLines":-1,"processQuotes":true,"fileSource":"(clipboard)","encoding":"","separator":"\\t","storeBlankCellsAsNulls":true,"storeBlankRows":true,"skipDataLines":0,"includeFileSources":false,"headerLines":1,"limit":-1,"quoteCharacter":"\"","projectName":"numeric facet test"}]}

View File

@ -1 +1 @@
{"name":"numeric facet test","tags":[],"created":"2018-09-04T16:07:31Z","modified":"2018-09-04T17:02:31Z","creator":"","contributors":"","subject":"","description":"","rowCount":4,"title":"","homepage":"","image":"","license":"","version":"","customMetadata":{},"importOptionMetadata":[{"guessCellValueTypes":false,"projectTags":[""],"ignoreLines":-1,"processQuotes":true,"fileSource":"(clipboard)","encoding":"","separator":"\\t","storeBlankCellsAsNulls":true,"storeBlankRows":true,"skipDataLines":0,"includeFileSources":false,"headerLines":1,"limit":-1,"quoteCharacter":"\"","projectName":"numeric facet test"}],"password":"","encoding":"UTF-8","encodingConfidence":0,"preferences":{"entries":{"scripting.starred-expressions":{"class":"com.google.refine.preference.TopList","top":2147483647,"list":[]},"scripting.expressions":{"class":"com.google.refine.preference.TopList","top":100,"list":[]}}}}
{"name":"numeric facet test","tags":[],"created":"2018-09-04T16:07:31Z","modified":"2018-09-04T17:02:31Z","creator":"","contributors":"","subject":"","description":"","rowCount":4,"title":"","homepage":"","image":"","license":"","version":"","customMetadata":{"hash":"a9f7bc0818ab566264e5b83d17eb745c"},"importOptionMetadata":[{"guessCellValueTypes":false,"projectTags":[""],"ignoreLines":-1,"processQuotes":true,"fileSource":"(clipboard)","encoding":"","separator":"\\t","storeBlankCellsAsNulls":true,"storeBlankRows":true,"skipDataLines":0,"includeFileSources":false,"headerLines":1,"limit":-1,"quoteCharacter":"\"","projectName":"numeric facet test"}],"password":"","encoding":"UTF-8","encodingConfidence":0,"preferences":{"entries":{"scripting.starred-expressions":{"class":"com.google.refine.preference.TopList","top":2147483647,"list":[]},"scripting.expressions":{"class":"com.google.refine.preference.TopList","top":100,"list":[]}}}}