Skip to content

Commit

Permalink
masterSourceType and displayOnNHCPortal columns added to grscicoll/ex…
Browse files Browse the repository at this point in the history
…port (#580)
  • Loading branch information
ahakanzn authored and marcos-lg committed Jun 7, 2024
1 parent 8e83aa6 commit 65720d8
Showing 1 changed file with 19 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
import org.gbif.api.vocabulary.DatasetSubtype;
import org.gbif.api.vocabulary.DatasetType;
import org.gbif.api.vocabulary.License;
import org.gbif.api.vocabulary.collections.MasterSourceType;

import org.supercsv.cellprocessor.*;
import org.supercsv.cellprocessor.ift.CellProcessor;
import org.supercsv.io.CsvBeanWriter;
Expand Down Expand Up @@ -271,7 +273,9 @@ public static CsvWriter<CollectionView> collections(
"collection.replacedBy",
"collection.featuredImageUrl",
"collection.featuredImageLicense",
"collection.temporalCoverage"
"collection.temporalCoverage",
"collection.masterSource",
"collection.displayOnNHCPortal"
})
.header(
new String[] {
Expand Down Expand Up @@ -320,7 +324,9 @@ public static CsvWriter<CollectionView> collections(
"replaced_by",
"featuredImageUrl",
"featuredImageLicense",
"temporalCoverage"
"temporalCoverage",
"masterSourceType",
"displayOnNHCPortal"
})
.processors(
new CellProcessor[] {
Expand Down Expand Up @@ -369,7 +375,9 @@ public static CsvWriter<CollectionView> collections(
new UUIDProcessor(), // replacedBy: UUID
new UriProcessor(), // featuredImageUrl : URI
new Optional(new ParseEnum(License.class)), // featuredImageLicense: License
new CleanStringProcessor() // temporalCoverage: String
new CleanStringProcessor(), // temporalCoverage: String
new Optional(new ParseEnum(MasterSourceType.class)), // masterSourceType: MasterSource
new Optional(new FmtBool("true", "false")) //displayOnNHCPortal: boolean
})
.forClass(CollectionView.class)
.preference(preference)
Expand Down Expand Up @@ -423,7 +431,9 @@ public static CsvWriter<Institution> institutions(
"replacedBy",
"convertedToCollection",
"featuredImageUrl",
"featuredImageLicense"
"featuredImageLicense",
"masterSource",
"displayOnNHCPortal"
})
.header(
new String[] {
Expand Down Expand Up @@ -466,7 +476,9 @@ public static CsvWriter<Institution> institutions(
"replaced_by",
"converted_to_collection",
"featuredImageUrl",
"featuredImageLicense"
"featuredImageLicense",
"masterSourceType",
"displayOnNHCPortal"
})
.processors(
new CellProcessor[] {
Expand Down Expand Up @@ -511,6 +523,8 @@ public static CsvWriter<Institution> institutions(
new UUIDProcessor(), // convertedToCollection: UUID
new UriProcessor(), // featuredImageUrl : URI
new Optional(new ParseEnum(License.class)), // featuredImageLicense: License
new Optional(new ParseEnum(MasterSourceType.class)), // masterSourceType: MasterSource
new Optional(new FmtBool("true", "false")) //displayOnNHCPortal: boolean
})
.preference(preference)
.pager(pager)
Expand Down

0 comments on commit 65720d8

Please sign in to comment.