added annotation to ignore method during the serialization

This commit is contained in:
Claudio Atzori 2020-01-30 17:45:28 +01:00
parent fcbc4ccd70
commit 1ecca69f49
3 changed files with 15 additions and 5 deletions

View File

@ -1,5 +1,6 @@
package eu.dnetlib.dhp.schema.oaf; package eu.dnetlib.dhp.schema.oaf;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import java.io.Serializable; import java.io.Serializable;
@ -36,7 +37,7 @@ public class GeoLocation implements Serializable {
this.place = place; this.place = place;
} }
@JsonIgnore
public boolean isBlank() { public boolean isBlank() {
return StringUtils.isBlank(point) && return StringUtils.isBlank(point) &&
StringUtils.isBlank(box) && StringUtils.isBlank(box) &&

View File

@ -1,5 +1,6 @@
package eu.dnetlib.dhp.schema.oaf; package eu.dnetlib.dhp.schema.oaf;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import java.io.Serializable; import java.io.Serializable;
@ -40,6 +41,7 @@ public class KeyValue implements Serializable {
return isBlank()?"":String.format("%s::%s", key != null ? key.toLowerCase() : "", value != null ? value.toLowerCase() : ""); return isBlank()?"":String.format("%s::%s", key != null ? key.toLowerCase() : "", value != null ? value.toLowerCase() : "");
} }
@JsonIgnore
public boolean isBlank() { public boolean isBlank() {
return StringUtils.isBlank(key) && StringUtils.isBlank(value); return StringUtils.isBlank(key) && StringUtils.isBlank(value);
} }

View File

@ -1,5 +1,6 @@
package eu.dnetlib.dhp.schema.oaf; package eu.dnetlib.dhp.schema.oaf;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import java.io.Serializable; import java.io.Serializable;
@ -15,32 +16,36 @@ public class Qualifier implements Serializable {
return classid; return classid;
} }
public void setClassid(String classid) { public Qualifier setClassid(String classid) {
this.classid = classid; this.classid = classid;
return this;
} }
public String getClassname() { public String getClassname() {
return classname; return classname;
} }
public void setClassname(String classname) { public Qualifier setClassname(String classname) {
this.classname = classname; this.classname = classname;
return this;
} }
public String getSchemeid() { public String getSchemeid() {
return schemeid; return schemeid;
} }
public void setSchemeid(String schemeid) { public Qualifier setSchemeid(String schemeid) {
this.schemeid = schemeid; this.schemeid = schemeid;
return this;
} }
public String getSchemename() { public String getSchemename() {
return schemename; return schemename;
} }
public void setSchemename(String schemename) { public Qualifier setSchemename(String schemename) {
this.schemename = schemename; this.schemename = schemename;
return this;
} }
public String toComparableString() { public String toComparableString() {
@ -50,6 +55,8 @@ public class Qualifier implements Serializable {
schemeid != null ? schemeid : "", schemeid != null ? schemeid : "",
schemename != null ? schemename : ""); schemename != null ? schemename : "");
} }
@JsonIgnore
public boolean isBlank() { public boolean isBlank() {
return StringUtils.isBlank(classid) && return StringUtils.isBlank(classid) &&
StringUtils.isBlank(classname) && StringUtils.isBlank(classname) &&