Commit 42abdb40 authored by Matija Obreza's avatar Matija Obreza
Browse files

Fixed coll.collSite

parent fa8c8644
......@@ -64,10 +64,10 @@ public class GenesysJSON {
}
public JsonField setRequired(boolean b) {
this.required=b;
this.required = b;
return this;
}
public boolean isRequired() {
return required;
}
......@@ -84,27 +84,13 @@ public class GenesysJSON {
JsonField acceNumb = new JsonField("acceNumb", RdfMCPD.ACCENUMB).setRequired(true);
columns.add(acceNumb);
JsonField columnDef = new JsonField("coll.collNumb", RdfMCPD.COLLNUMB);
columns.add(columnDef);
columnDef = new JsonField("coll.collCode", RdfMCPD.COLLCODE).setAllowMultiple(true);
columns.add(columnDef);
columnDef = new JsonField("coll.collName", RdfMCPD.COLLNAME).setAllowMultiple(true);
columns.add(columnDef);
columnDef = new JsonField("coll.collInstAddr", RdfMCPD.COLLINSTADDRESS).setAllowMultiple(true);
columns.add(columnDef);
columnDef = new JsonField("coll.collMissId", RdfMCPD.COLLMISSID);
columns.add(columnDef);
JsonField genus = new JsonField("genus", RdfMCPD.GENUS).setRequired(true);
columns.add(genus);
JsonField species = new JsonField("species", RdfMCPD.SPECIES);
columns.add(species);
JsonField columnDef;
columnDef = new JsonField("spauthor", RdfMCPD.SPAUTHOR);
columns.add(columnDef);
......@@ -123,9 +109,31 @@ public class GenesysJSON {
columnDef = new JsonField("orgCty", RdfMCPD.ORIGCTY);
columns.add(columnDef);
columnDef = new JsonField("geo.site", RdfMCPD.COLLSITE);
columnDef = new JsonField("coll.collNumb", RdfMCPD.COLLNUMB);
columns.add(columnDef);
columnDef = new JsonField("coll.collDate", RdfMCPD.COLLDATE);
columns.add(columnDef);
columnDef = new JsonField("coll.collCode", RdfMCPD.COLLCODE).setAllowMultiple(true);
columns.add(columnDef);
columnDef = new JsonField("coll.collName", RdfMCPD.COLLNAME).setAllowMultiple(true);
columns.add(columnDef);
columnDef = new JsonField("coll.collSite", RdfMCPD.COLLSITE);
columns.add(columnDef);
columnDef = new JsonField("coll.collInstAddr", RdfMCPD.COLLINSTADDRESS).setAllowMultiple(true);
columns.add(columnDef);
columnDef = new JsonField("coll.collMissId", RdfMCPD.COLLMISSID);
columns.add(columnDef);
columnDef = new JsonField("coll.collSrc", RdfMCPD.COLLSRC).setType(int.class);
columns.add(columnDef);
columnDef = new JsonField("geo.latitude", RdfMCPD.DECLATITUDE).setType(double.class);
columns.add(columnDef);
......@@ -144,9 +152,6 @@ public class GenesysJSON {
columnDef = new JsonField("geo.elevation", RdfMCPD.ELEVATION).setType(double.class);
columns.add(columnDef);
columnDef = new JsonField("coll.date", RdfMCPD.COLLDATE);
columns.add(columnDef);
columnDef = new JsonField("bredCode", RdfMCPD.BREDCODE);
columns.add(columnDef);
......@@ -156,13 +161,12 @@ public class GenesysJSON {
columnDef = new JsonField("ancest", RdfMCPD.ANCEST);
columns.add(columnDef);
columnDef = new JsonField("collSrc", RdfMCPD.COLLSRC).setType(int.class);
columns.add(columnDef);
columnDef = new JsonField("donorCode", RdfMCPD.DONORCODE);
columns.add(columnDef);
columnDef = new JsonField("donorNumb", RdfMCPD.DONORNUMB);
columns.add(columnDef);
columnDef = new JsonField("donorName", RdfMCPD.DONORNAME);
columns.add(columnDef);
......@@ -197,10 +201,10 @@ public class GenesysJSON {
Collection<JsonField> requiredFields = CollectionUtils.select(columns, new Predicate() {
@Override
public boolean evaluate(Object object) {
JsonField jsonField=(JsonField) object;
JsonField jsonField = (JsonField) object;
return jsonField.isRequired();
}
});
this.requiredFields = Collections.unmodifiableCollection(requiredFields);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment