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 org.slf4j.LoggerFactory;
import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonParseException; 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 * @return the site IRI of the Wikibase instance referenced by this schema
*/ */
@JsonIgnore
public String getBaseIri() { public String getBaseIri() {
return baseIri; return baseIri;
} }
@ -91,6 +93,7 @@ public class WikibaseSchema implements OverlayModel {
/** /**
* @return the list of document expressions for this schema * @return the list of document expressions for this schema
*/ */
@JsonIgnore
public List<WbItemDocumentExpr> getItemDocumentExpressions() { public List<WbItemDocumentExpr> getItemDocumentExpressions() {
return itemDocumentExprs; 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_ROW_BASED = "row-based";
public final static String MODE_RECORD_BASED = "record-based"; public final static String MODE_RECORD_BASED = "record-based";
@JsonIgnore
protected Project _project; protected Project _project;
@JsonProperty("facets") @JsonProperty("facets")
protected List<Facet> _facets = new LinkedList<Facet>(); protected List<Facet> _facets = new LinkedList<Facet>();
@ -93,6 +94,7 @@ public class Engine {
_config = new EngineConfig(_config.getFacetConfigs(), mode); _config = new EngineConfig(_config.getFacetConfigs(), mode);
} }
@JsonIgnore
public FilteredRows getAllRows() { public FilteredRows getAllRows() {
return new FilteredRows() { return new FilteredRows() {
@Override @Override
@ -114,6 +116,7 @@ public class Engine {
}; };
} }
@JsonIgnore
public FilteredRows getAllFilteredRows() { public FilteredRows getAllFilteredRows() {
return getFilteredRows(null); return getFilteredRows(null);
} }
@ -136,6 +139,7 @@ public class Engine {
throw new InternalError("Unknown mode."); throw new InternalError("Unknown mode.");
} }
@JsonIgnore
public FilteredRecords getAllRecords() { public FilteredRecords getAllRecords() {
return new FilteredRecords() { return new FilteredRecords() {
@Override @Override
@ -154,6 +158,7 @@ public class Engine {
}; };
} }
@JsonIgnore
public FilteredRecords getFilteredRecords() { public FilteredRecords getFilteredRecords() {
return getFilteredRecords(null); return getFilteredRecords(null);
} }

View File

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

View File

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