Fixed minor bug: recon wasn't saving out its candidates if its judgment is Matched. So when a project is saved and reloaded, it loses all of the recon candidates except for the matches.
git-svn-id: http://google-refine.googlecode.com/svn/trunk@344 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
ac57dea9c7
commit
85d1671d6e
@ -154,6 +154,8 @@ public class Recon implements HasFields, Jsonizable {
|
||||
public void write(JSONWriter writer, Properties options)
|
||||
throws JSONException {
|
||||
|
||||
boolean saveMode = "save".equals(options.getProperty("mode"));
|
||||
|
||||
writer.object();
|
||||
writer.key("id"); writer.value(id);
|
||||
writer.key("j"); writer.value(judgmentToString());
|
||||
@ -161,7 +163,8 @@ public class Recon implements HasFields, Jsonizable {
|
||||
if (match != null) {
|
||||
writer.key("m");
|
||||
match.write(writer, options);
|
||||
} else {
|
||||
}
|
||||
if (match == null || saveMode) {
|
||||
writer.key("c"); writer.array();
|
||||
if (candidates != null) {
|
||||
for (ReconCandidate c : candidates) {
|
||||
@ -171,7 +174,7 @@ public class Recon implements HasFields, Jsonizable {
|
||||
writer.endArray();
|
||||
}
|
||||
|
||||
if ("save".equals(options.getProperty("mode"))) {
|
||||
if (saveMode) {
|
||||
writer.key("f");
|
||||
writer.array();
|
||||
for (Object o : features) {
|
||||
|
Loading…
Reference in New Issue
Block a user