Model updates for Dataset fields size and geolocation #35

Open
claudio.atzori wants to merge 1 commits from size_geolocation into master
5 changed files with 239 additions and 23 deletions

View File

@ -9,12 +9,13 @@ import eu.dnetlib.dhp.schema.common.ModelConstants;
public class Dataset extends Result implements Serializable { public class Dataset extends Result implements Serializable {
private static final long serialVersionUID = 916526716184645549L; private static final long serialVersionUID = 916526716184645549L;
private Field<String> storagedate; private Field<String> storagedate;
// candidate for removal // candidate for removal
private Field<String> device; private Field<String> device;
private Field<String> size; private List<String> size;
private Field<String> version; private Field<String> version;
@ -44,11 +45,11 @@ public class Dataset extends Result implements Serializable {
this.device = device; this.device = device;
} }
public Field<String> getSize() { public List<String> getSize() {
return size; return size;
} }
public void setSize(Field<String> size) { public void setSize(List<String> size) {
this.size = size; this.size = size;
} }

View File

@ -2,43 +2,99 @@
package eu.dnetlib.dhp.schema.oaf; package eu.dnetlib.dhp.schema.oaf;
import java.io.Serializable; import java.io.Serializable;
import java.util.Objects;
import org.apache.commons.lang3.StringUtils;
import com.fasterxml.jackson.annotation.JsonIgnore;
/**
* <geoLocation>
* <geoLocationPlace>Atlantic Ocean</geoLocationPlace>
* <geoLocationPoint>
* <pointLongitude>-67.302</pointLongitude>
* <pointLatitude>31.233</pointLatitude>
* </geoLocationPoint>
* <geoLocationBox>
* <westBoundLongitude>-71.032</westBoundLongitude>
* <eastBoundLongitude>-68.211</eastBoundLongitude>
* <southBoundLatitude>41.090</southBoundLatitude>
* <northBoundLatitude>42.893</northBoundLatitude>
* </geoLocationBox>
* <geoLocationPolygon>
* <polygonPoint>
* <pointLatitude>41.991</pointLatitude>
* <pointLongitude>-71.032</pointLongitude>
* </polygonPoint>
* <polygonPoint>
* <pointLatitude>42.893</pointLatitude>
* <pointLongitude>-69.622</pointLongitude>
* </polygonPoint>
* <polygonPoint>
* <pointLatitude>41.991</pointLatitude>
* <pointLongitude>-68.211</pointLongitude>
* </polygonPoint>
* <polygonPoint>
* <pointLatitude>41.090</pointLatitude>
* <pointLongitude>-69.622</pointLongitude>
* </polygonPoint>
* <polygonPoint>
* <pointLatitude>41.991</pointLatitude>
* <pointLongitude>-71.032</pointLongitude>
* </polygonPoint>
* <inPolygonPoint>
* <pointLatitude>41.991</pointLatitude>
* <pointLongitude>-71.032</pointLongitude>
* </inPolygonPoint>
* </geoLocationPolygon>
* </geoLocation>
*/
public class GeoLocation implements Serializable { public class GeoLocation implements Serializable {
private static final long serialVersionUID = 8096534610208458404L; private static final long serialVersionUID = 8096534610208458404L;
private String point;
private String box; private String geoLocationPlace;
private String place; private GeoLocationPoint geoLocationPoint;
public String getPoint() { private GeoLocationBox geoLocationBox;
return point;
private GeoLocationPolygon geoLocationPolygon;
public GeoLocation() {
} }
public void setPoint(String point) { public GeoLocation(String geoLocationPlace, GeoLocationPoint geoLocationPoint, GeoLocationBox geoLocationBox, GeoLocationPolygon geoLocationPolygon) {
this.point = point; this.geoLocationPlace = geoLocationPlace;
this.geoLocationPoint = geoLocationPoint;
this.geoLocationBox = geoLocationBox;
this.geoLocationPolygon = geoLocationPolygon;
} }
public String getBox() { public String getGeoLocationPlace() {
return box; return geoLocationPlace;
} }
public void setBox(String box) { public void setGeoLocationPlace(String geoLocationPlace) {
this.box = box; this.geoLocationPlace = geoLocationPlace;
} }
public String getPlace() { public GeoLocationPoint getGeoLocationPoint() {
return place; return geoLocationPoint;
} }
public void setPlace(String place) { public void setGeoLocationPoint(GeoLocationPoint geoLocationPoint) {
this.place = place; this.geoLocationPoint = geoLocationPoint;
} }
public GeoLocationBox getGeoLocationBox() {
return geoLocationBox;
}
public void setGeoLocationBox(GeoLocationBox geoLocationBox) {
this.geoLocationBox = geoLocationBox;
}
public GeoLocationPolygon getGeoLocationPolygon() {
return geoLocationPolygon;
}
public void setGeoLocationPolygon(GeoLocationPolygon geoLocationPolygon) {
this.geoLocationPolygon = geoLocationPolygon;
}
} }

View File

@ -0,0 +1,62 @@
package eu.dnetlib.dhp.schema.oaf;
/**
* <geoLocationBox>
* <westBoundLongitude>-71.032</westBoundLongitude>
* <eastBoundLongitude>-68.211</eastBoundLongitude>
* <southBoundLatitude>41.090</southBoundLatitude>
* <northBoundLatitude>42.893</northBoundLatitude>
* </geoLocationBox>
*/
public class GeoLocationBox {
private Double westBoundLongitude;
private Double eastBoundLongitude;
private Double southBoundLatitude;
private Double northBoundLatitude;
public GeoLocationBox() {
}
public GeoLocationBox(Double westBoundLongitude, Double eastBoundLongitude, Double southBoundLatitude, Double northBoundLatitude) {
this.westBoundLongitude = westBoundLongitude;
this.eastBoundLongitude = eastBoundLongitude;
this.southBoundLatitude = southBoundLatitude;
this.northBoundLatitude = northBoundLatitude;
}
public Double getWestBoundLongitude() {
return westBoundLongitude;
}
public void setWestBoundLongitude(Double westBoundLongitude) {
this.westBoundLongitude = westBoundLongitude;
}
public Double getEastBoundLongitude() {
return eastBoundLongitude;
}
public void setEastBoundLongitude(Double eastBoundLongitude) {
this.eastBoundLongitude = eastBoundLongitude;
}
public Double getSouthBoundLatitude() {
return southBoundLatitude;
}
public void setSouthBoundLatitude(Double southBoundLatitude) {
this.southBoundLatitude = southBoundLatitude;
}
public Double getNorthBoundLatitude() {
return northBoundLatitude;
}
public void setNorthBoundLatitude(Double northBoundLatitude) {
this.northBoundLatitude = northBoundLatitude;
}
}

View File

@ -0,0 +1,39 @@
package eu.dnetlib.dhp.schema.oaf;
/**
*
* <geoLocationPoint>
* <pointLongitude>-67.302</pointLongitude>
* <pointLatitude>31.233</pointLatitude>
* </geoLocationPoint>
*/
public class GeoLocationPoint {
private Double pointLongitude;
private Double pointLatitude;
public GeoLocationPoint() {
}
public GeoLocationPoint(Double pointLongitude, Double pointLatitude) {
this.pointLongitude = pointLongitude;
this.pointLatitude = pointLatitude;
}
public Double getPointLongitude() {
return pointLongitude;
}
public void setPointLongitude(Double pointLongitude) {
this.pointLongitude = pointLongitude;
}
public Double getPointLatitude() {
return pointLatitude;
}
public void setPointLatitude(Double pointLatitude) {
this.pointLatitude = pointLatitude;
}
}

View File

@ -0,0 +1,58 @@
package eu.dnetlib.dhp.schema.oaf;
import java.util.List;
/**
* <geoLocationPolygon>
* <polygonPoint>
* <pointLatitude>41.991</pointLatitude>
* <pointLongitude>-71.032</pointLongitude>
* </polygonPoint>
* <polygonPoint>
* <pointLatitude>42.893</pointLatitude>
* <pointLongitude>-69.622</pointLongitude>
* </polygonPoint>
* <polygonPoint>
* <pointLatitude>41.991</pointLatitude>
* <pointLongitude>-68.211</pointLongitude>
* </polygonPoint>
* <polygonPoint>
* <pointLatitude>41.090</pointLatitude>
* <pointLongitude>-69.622</pointLongitude>
* </polygonPoint>
* <polygonPoint>
* <pointLatitude>41.991</pointLatitude>
* <pointLongitude>-71.032</pointLongitude>
* </polygonPoint>
* </geoLocationPolygon>
*/
public class GeoLocationPolygon {
private List<GeoLocationPoint> polygonPint;
private GeoLocationPoint inPolygonPoint;
public GeoLocationPolygon() {
}
public GeoLocationPolygon(List<GeoLocationPoint> polygonPint, GeoLocationPoint inPolygonPoint) {
this.polygonPint = polygonPint;
this.inPolygonPoint = inPolygonPoint;
}
public List<GeoLocationPoint> getPolygonPint() {
return polygonPint;
}
public void setPolygonPint(List<GeoLocationPoint> polygonPint) {
this.polygonPint = polygonPint;
}
public GeoLocationPoint getInPolygonPoint() {
return inPolygonPoint;
}
public void setInPolygonPoint(GeoLocationPoint inPolygonPoint) {
this.inPolygonPoint = inPolygonPoint;
}
}