Restore JSON property autodetect

This commit is contained in:
Antonin Delpeuch 2018-10-12 10:42:30 +01:00
parent bc6f1b0146
commit 9c788769af
4 changed files with 11 additions and 1 deletions

View File

@ -36,6 +36,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonParseException;
@ -84,6 +85,7 @@ public class WikibaseSchema implements OverlayModel {
/**
* @return the site IRI of the Wikibase instance referenced by this schema
*/
@JsonIgnore
public String getBaseIri() {
return baseIri;
}
@ -91,6 +93,7 @@ public class WikibaseSchema implements OverlayModel {
/**
* @return the list of document expressions for this schema
*/
@JsonIgnore
public List<WbItemDocumentExpr> getItemDocumentExpressions() {
return itemDocumentExprs;
}

View File

@ -68,6 +68,7 @@ public class Engine {
public final static String MODE_ROW_BASED = "row-based";
public final static String MODE_RECORD_BASED = "record-based";
@JsonIgnore
protected Project _project;
@JsonProperty("facets")
protected List<Facet> _facets = new LinkedList<Facet>();
@ -93,6 +94,7 @@ public class Engine {
_config = new EngineConfig(_config.getFacetConfigs(), mode);
}
@JsonIgnore
public FilteredRows getAllRows() {
return new FilteredRows() {
@Override
@ -114,6 +116,7 @@ public class Engine {
};
}
@JsonIgnore
public FilteredRows getAllFilteredRows() {
return getFilteredRows(null);
}
@ -136,6 +139,7 @@ public class Engine {
throw new InternalError("Unknown mode.");
}
@JsonIgnore
public FilteredRecords getAllRecords() {
return new FilteredRecords() {
@Override
@ -154,6 +158,7 @@ public class Engine {
};
}
@JsonIgnore
public FilteredRecords getFilteredRecords() {
return getFilteredRecords(null);
}

View File

@ -52,6 +52,7 @@ import org.apache.commons.io.FileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.refine.RefineServlet;
@ -68,6 +69,7 @@ public class ImportingManager {
final public boolean download;
@JsonProperty("uiClass")
final public String uiClass;
@JsonIgnore
final public ImportingParser parser;
private Format(

View File

@ -84,7 +84,7 @@ public class ParsingUtilities {
mapper.registerModule(module);
mapper.setVisibility(PropertyAccessor.ALL, Visibility.NONE);
// mapper.setVisibility(PropertyAccessor.ALL, Visibility.NONE);
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
}