3737 "keyword" ,
3838 "spatial_coverage_description" ,
3939 "use_restriction" ,
40- "use_restriction_date" ,
4140 "custom_type" ,
4241 "id" ,
4342 "owner" ,
@@ -173,21 +172,13 @@ public class Dataset implements Serializable
173172 /**
174173 * Use restriction
175174 * <p>
176- * Data set use restriction
175+ * Use restriction
177176 *
178177 */
179178 @ JsonProperty ("use_restriction" )
180- @ JsonPropertyDescription ("Data set use restriction" )
181- private Dataset .UseRestriction useRestriction ;
182- /**
183- * Use restriction date
184- * <p>
185- * Use restriction date, eg. the date (deadline) for when data must be deleted/anonymised.
186- *
187- */
188- @ JsonProperty ("use_restriction_date" )
189- @ JsonPropertyDescription ("Use restriction date, eg. the date (deadline) for when data must be deleted/anonymised." )
190- private Date useRestrictionDate ;
179+ @ JsonPropertyDescription ("Use restriction" )
180+ @ Valid
181+ private List <UseRestriction > useRestriction = new ArrayList <UseRestriction >();
191182 /**
192183 * Custom type for dataset metadata
193184 * <p>
@@ -296,7 +287,7 @@ public class Dataset implements Serializable
296287 @ JsonIgnore
297288 @ Valid
298289 private Map <String , Object > additionalProperties = new LinkedHashMap <String , Object >();
299- private final static long serialVersionUID = 5921825615679682644L ;
290+ private final static long serialVersionUID = 2857055632546550620L ;
300291
301292 /**
302293 * No args constructor for use in serialization
@@ -322,7 +313,7 @@ public Dataset() {
322313 * @param filePath
323314 * File path. The file path contains the data set's name and the path to where it is stored.
324315 * @param useRestriction
325- * Use restriction. Data set use restriction.
316+ * Use restriction. Use restriction.
326317 * @param description
327318 * Description. Free text description of the data set.
328319 * @param populationDescription
@@ -347,16 +338,14 @@ public Dataset() {
347338 * Metadata created by. Created by identifiable person.
348339 * @param name
349340 * Name. Name of data set.
350- * @param useRestrictionDate
351- * Use restriction date. Use restriction date, eg. the date (deadline) for when data must be deleted/anonymised.
352341 * @param id
353342 * Identifier. Unique identifier for the data set.
354343 * @param shortName
355344 * Short name. Name of (physical) data file, data table or dataset.
356345 * @param keyword
357346 * Keyword(s). A list of searchable keywords that can contribute to the development of effective filtering and search services.
358347 */
359- public Dataset (String shortName , Dataset .Assessment assessment , Dataset .DataSetStatus datasetStatus , Dataset .DataSetState datasetState , List <Object > name , List <Object > description , List <Object > populationDescription , String version , List <Object > versionDescription , String subjectField , List <String > keyword , List <Object > spatialCoverageDescription , Dataset . UseRestriction useRestriction , Date useRestrictionDate , List <CustomType > customType , UUID id , String owner , String filePath , Date metadataCreatedDate , String metadataCreatedBy , Date metadataLastUpdatedDate , String metadataLastUpdatedBy , String containsDataFrom , String containsDataUntil ) {
348+ public Dataset (String shortName , Dataset .Assessment assessment , Dataset .DataSetStatus datasetStatus , Dataset .DataSetState datasetState , List <Object > name , List <Object > description , List <Object > populationDescription , String version , List <Object > versionDescription , String subjectField , List <String > keyword , List <Object > spatialCoverageDescription , List < UseRestriction > useRestriction , List <CustomType > customType , UUID id , String owner , String filePath , Date metadataCreatedDate , String metadataCreatedBy , Date metadataLastUpdatedDate , String metadataLastUpdatedBy , String containsDataFrom , String containsDataUntil ) {
360349 super ();
361350 this .shortName = shortName ;
362351 this .assessment = assessment ;
@@ -371,7 +360,6 @@ public Dataset(String shortName, Dataset.Assessment assessment, Dataset.DataSetS
371360 this .keyword = keyword ;
372361 this .spatialCoverageDescription = spatialCoverageDescription ;
373362 this .useRestriction = useRestriction ;
374- this .useRestrictionDate = useRestrictionDate ;
375363 this .customType = customType ;
376364 this .id = id ;
377365 this .owner = owner ;
@@ -653,47 +641,25 @@ public void setSpatialCoverageDescription(List<Object> spatialCoverageDescriptio
653641 /**
654642 * Use restriction
655643 * <p>
656- * Data set use restriction
644+ * Use restriction
657645 *
658646 */
659647 @ JsonProperty ("use_restriction" )
660- public Dataset . UseRestriction getUseRestriction () {
648+ public List < UseRestriction > getUseRestriction () {
661649 return useRestriction ;
662650 }
663651
664652 /**
665653 * Use restriction
666654 * <p>
667- * Data set use restriction
655+ * Use restriction
668656 *
669657 */
670658 @ JsonProperty ("use_restriction" )
671- public void setUseRestriction (Dataset . UseRestriction useRestriction ) {
659+ public void setUseRestriction (List < UseRestriction > useRestriction ) {
672660 this .useRestriction = useRestriction ;
673661 }
674662
675- /**
676- * Use restriction date
677- * <p>
678- * Use restriction date, eg. the date (deadline) for when data must be deleted/anonymised.
679- *
680- */
681- @ JsonProperty ("use_restriction_date" )
682- public Date getUseRestrictionDate () {
683- return useRestrictionDate ;
684- }
685-
686- /**
687- * Use restriction date
688- * <p>
689- * Use restriction date, eg. the date (deadline) for when data must be deleted/anonymised.
690- *
691- */
692- @ JsonProperty ("use_restriction_date" )
693- public void setUseRestrictionDate (Date useRestrictionDate ) {
694- this .useRestrictionDate = useRestrictionDate ;
695- }
696-
697663 /**
698664 * Custom type for dataset metadata
699665 * <p>
@@ -994,10 +960,6 @@ public String toString() {
994960 sb .append ('=' );
995961 sb .append (((this .useRestriction == null )?"<null>" :this .useRestriction ));
996962 sb .append (',' );
997- sb .append ("useRestrictionDate" );
998- sb .append ('=' );
999- sb .append (((this .useRestrictionDate == null )?"<null>" :this .useRestrictionDate ));
1000- sb .append (',' );
1001963 sb .append ("customType" );
1002964 sb .append ('=' );
1003965 sb .append (((this .customType == null )?"<null>" :this .customType ));
@@ -1075,7 +1037,6 @@ public int hashCode() {
10751037 result = ((result * 31 )+((this .customType == null )? 0 :this .customType .hashCode ()));
10761038 result = ((result * 31 )+((this .metadataCreatedDate == null )? 0 :this .metadataCreatedDate .hashCode ()));
10771039 result = ((result * 31 )+((this .name == null )? 0 :this .name .hashCode ()));
1078- result = ((result * 31 )+((this .useRestrictionDate == null )? 0 :this .useRestrictionDate .hashCode ()));
10791040 result = ((result * 31 )+((this .additionalProperties == null )? 0 :this .additionalProperties .hashCode ()));
10801041 result = ((result * 31 )+((this .shortName == null )? 0 :this .shortName .hashCode ()));
10811042 return result ;
@@ -1090,7 +1051,7 @@ public boolean equals(Object other) {
10901051 return false ;
10911052 }
10921053 Dataset rhs = ((Dataset ) other );
1093- return ((((((((((((((((((((((((((this .versionDescription == rhs .versionDescription )||((this .versionDescription != null )&&this .versionDescription .equals (rhs .versionDescription )))&&((this .containsDataUntil == rhs .containsDataUntil )||((this .containsDataUntil != null )&&this .containsDataUntil .equals (rhs .containsDataUntil ))))&&((this .datasetState == rhs .datasetState )||((this .datasetState != null )&&this .datasetState .equals (rhs .datasetState ))))&&((this .datasetStatus == rhs .datasetStatus )||((this .datasetStatus != null )&&this .datasetStatus .equals (rhs .datasetStatus ))))&&((this .description == rhs .description )||((this .description != null )&&this .description .equals (rhs .description ))))&&((this .populationDescription == rhs .populationDescription )||((this .populationDescription != null )&&this .populationDescription .equals (rhs .populationDescription ))))&&((this .metadataLastUpdatedBy == rhs .metadataLastUpdatedBy )||((this .metadataLastUpdatedBy != null )&&this .metadataLastUpdatedBy .equals (rhs .metadataLastUpdatedBy ))))&&((this .subjectField == rhs .subjectField )||((this .subjectField != null )&&this .subjectField .equals (rhs .subjectField ))))&&((this .assessment == rhs .assessment )||((this .assessment != null )&&this .assessment .equals (rhs .assessment ))))&&((this .spatialCoverageDescription == rhs .spatialCoverageDescription )||((this .spatialCoverageDescription != null )&&this .spatialCoverageDescription .equals (rhs .spatialCoverageDescription ))))&&((this .metadataCreatedBy == rhs .metadataCreatedBy )||((this .metadataCreatedBy != null )&&this .metadataCreatedBy .equals (rhs .metadataCreatedBy ))))&&((this .id == rhs .id )||((this .id != null )&&this .id .equals (rhs .id ))))&&((this .keyword == rhs .keyword )||((this .keyword != null )&&this .keyword .equals (rhs .keyword ))))&&((this .owner == rhs .owner )||((this .owner != null )&&this .owner .equals (rhs .owner ))))&&((this .containsDataFrom == rhs .containsDataFrom )||((this .containsDataFrom != null )&&this .containsDataFrom .equals (rhs .containsDataFrom ))))&&((this .filePath == rhs .filePath )||((this .filePath != null )&&this .filePath .equals (rhs .filePath ))))&&((this .useRestriction == rhs .useRestriction )||((this .useRestriction != null )&&this .useRestriction .equals (rhs .useRestriction ))))&&((this .metadataLastUpdatedDate == rhs .metadataLastUpdatedDate )||((this .metadataLastUpdatedDate != null )&&this .metadataLastUpdatedDate .equals (rhs .metadataLastUpdatedDate ))))&&((this .version == rhs .version )||((this .version != null )&&this .version .equals (rhs .version ))))&&((this .customType == rhs .customType )||((this .customType != null )&&this .customType .equals (rhs .customType ))))&&((this .metadataCreatedDate == rhs .metadataCreatedDate )||((this .metadataCreatedDate != null )&&this .metadataCreatedDate .equals (rhs .metadataCreatedDate ))))&&((this .name == rhs .name )||((this .name != null )&&this .name .equals (rhs .name ))))&&((this .useRestrictionDate == rhs .useRestrictionDate )||((this .useRestrictionDate != null )&&this .useRestrictionDate .equals (rhs .useRestrictionDate ))))&&((this .additionalProperties == rhs .additionalProperties )||((this .additionalProperties != null )&&this .additionalProperties .equals (rhs .additionalProperties ))))&&((this .shortName == rhs .shortName )||((this .shortName != null )&&this .shortName .equals (rhs .shortName ))));
1054+ return (((((((((((((((((((((((((this .versionDescription == rhs .versionDescription )||((this .versionDescription != null )&&this .versionDescription .equals (rhs .versionDescription )))&&((this .containsDataUntil == rhs .containsDataUntil )||((this .containsDataUntil != null )&&this .containsDataUntil .equals (rhs .containsDataUntil ))))&&((this .datasetState == rhs .datasetState )||((this .datasetState != null )&&this .datasetState .equals (rhs .datasetState ))))&&((this .datasetStatus == rhs .datasetStatus )||((this .datasetStatus != null )&&this .datasetStatus .equals (rhs .datasetStatus ))))&&((this .description == rhs .description )||((this .description != null )&&this .description .equals (rhs .description ))))&&((this .populationDescription == rhs .populationDescription )||((this .populationDescription != null )&&this .populationDescription .equals (rhs .populationDescription ))))&&((this .metadataLastUpdatedBy == rhs .metadataLastUpdatedBy )||((this .metadataLastUpdatedBy != null )&&this .metadataLastUpdatedBy .equals (rhs .metadataLastUpdatedBy ))))&&((this .subjectField == rhs .subjectField )||((this .subjectField != null )&&this .subjectField .equals (rhs .subjectField ))))&&((this .assessment == rhs .assessment )||((this .assessment != null )&&this .assessment .equals (rhs .assessment ))))&&((this .spatialCoverageDescription == rhs .spatialCoverageDescription )||((this .spatialCoverageDescription != null )&&this .spatialCoverageDescription .equals (rhs .spatialCoverageDescription ))))&&((this .metadataCreatedBy == rhs .metadataCreatedBy )||((this .metadataCreatedBy != null )&&this .metadataCreatedBy .equals (rhs .metadataCreatedBy ))))&&((this .id == rhs .id )||((this .id != null )&&this .id .equals (rhs .id ))))&&((this .keyword == rhs .keyword )||((this .keyword != null )&&this .keyword .equals (rhs .keyword ))))&&((this .owner == rhs .owner )||((this .owner != null )&&this .owner .equals (rhs .owner ))))&&((this .containsDataFrom == rhs .containsDataFrom )||((this .containsDataFrom != null )&&this .containsDataFrom .equals (rhs .containsDataFrom ))))&&((this .filePath == rhs .filePath )||((this .filePath != null )&&this .filePath .equals (rhs .filePath ))))&&((this .useRestriction == rhs .useRestriction )||((this .useRestriction != null )&&this .useRestriction .equals (rhs .useRestriction ))))&&((this .metadataLastUpdatedDate == rhs .metadataLastUpdatedDate )||((this .metadataLastUpdatedDate != null )&&this .metadataLastUpdatedDate .equals (rhs .metadataLastUpdatedDate ))))&&((this .version == rhs .version )||((this .version != null )&&this .version .equals (rhs .version ))))&&((this .customType == rhs .customType )||((this .customType != null )&&this .customType .equals (rhs .customType ))))&&((this .metadataCreatedDate == rhs .metadataCreatedDate )||((this .metadataCreatedDate != null )&&this .metadataCreatedDate .equals (rhs .metadataCreatedDate ))))&&((this .name == rhs .name )||((this .name != null )&&this .name .equals (rhs .name ))))&&((this .additionalProperties == rhs .additionalProperties )||((this .additionalProperties != null )&&this .additionalProperties .equals (rhs .additionalProperties ))))&&((this .shortName == rhs .shortName )||((this .shortName != null )&&this .shortName .equals (rhs .shortName ))));
10941055 }
10951056
10961057
@@ -1150,8 +1111,8 @@ public DatasetBuilder() {
11501111 super ();
11511112 }
11521113
1153- public DatasetBuilder (String shortName , Dataset .Assessment assessment , Dataset .DataSetStatus datasetStatus , Dataset .DataSetState datasetState , List <Object > name , List <Object > description , List <Object > populationDescription , String version , List <Object > versionDescription , String subjectField , List <String > keyword , List <Object > spatialCoverageDescription , Dataset . UseRestriction useRestriction , Date useRestrictionDate , List <CustomType > customType , UUID id , String owner , String filePath , Date metadataCreatedDate , String metadataCreatedBy , Date metadataLastUpdatedDate , String metadataLastUpdatedBy , String containsDataFrom , String containsDataUntil ) {
1154- super (shortName , assessment , datasetStatus , datasetState , name , description , populationDescription , version , versionDescription , subjectField , keyword , spatialCoverageDescription , useRestriction , useRestrictionDate , customType , id , owner , filePath , metadataCreatedDate , metadataCreatedBy , metadataLastUpdatedDate , metadataLastUpdatedBy , containsDataFrom , containsDataUntil );
1114+ public DatasetBuilder (String shortName , Dataset .Assessment assessment , Dataset .DataSetStatus datasetStatus , Dataset .DataSetState datasetState , List <Object > name , List <Object > description , List <Object > populationDescription , String version , List <Object > versionDescription , String subjectField , List <String > keyword , List <Object > spatialCoverageDescription , List < UseRestriction > useRestriction , List <CustomType > customType , UUID id , String owner , String filePath , Date metadataCreatedDate , String metadataCreatedBy , Date metadataLastUpdatedDate , String metadataLastUpdatedBy , String containsDataFrom , String containsDataUntil ) {
1115+ super (shortName , assessment , datasetStatus , datasetState , name , description , populationDescription , version , versionDescription , subjectField , keyword , spatialCoverageDescription , useRestriction , customType , id , owner , filePath , metadataCreatedDate , metadataCreatedBy , metadataLastUpdatedDate , metadataLastUpdatedBy , containsDataFrom , containsDataUntil );
11551116 }
11561117
11571118 }
@@ -1169,10 +1130,10 @@ public DatasetBuilderBase() {
11691130 }
11701131
11711132 @ SuppressWarnings ("unchecked" )
1172- public DatasetBuilderBase (String shortName , Dataset .Assessment assessment , Dataset .DataSetStatus datasetStatus , Dataset .DataSetState datasetState , List <Object > name , List <Object > description , List <Object > populationDescription , String version , List <Object > versionDescription , String subjectField , List <String > keyword , List <Object > spatialCoverageDescription , Dataset . UseRestriction useRestriction , Date useRestrictionDate , List <CustomType > customType , UUID id , String owner , String filePath , Date metadataCreatedDate , String metadataCreatedBy , Date metadataLastUpdatedDate , String metadataLastUpdatedBy , String containsDataFrom , String containsDataUntil ) {
1133+ public DatasetBuilderBase (String shortName , Dataset .Assessment assessment , Dataset .DataSetStatus datasetStatus , Dataset .DataSetState datasetState , List <Object > name , List <Object > description , List <Object > populationDescription , String version , List <Object > versionDescription , String subjectField , List <String > keyword , List <Object > spatialCoverageDescription , List < UseRestriction > useRestriction , List <CustomType > customType , UUID id , String owner , String filePath , Date metadataCreatedDate , String metadataCreatedBy , Date metadataLastUpdatedDate , String metadataLastUpdatedBy , String containsDataFrom , String containsDataUntil ) {
11731134 // Skip initialization when called from subclass
11741135 if (this .getClass ().equals (Dataset .DatasetBuilder .class )) {
1175- this .instance = ((T ) new Dataset (shortName , assessment , datasetStatus , datasetState , name , description , populationDescription , version , versionDescription , subjectField , keyword , spatialCoverageDescription , useRestriction , useRestrictionDate , customType , id , owner , filePath , metadataCreatedDate , metadataCreatedBy , metadataLastUpdatedDate , metadataLastUpdatedBy , containsDataFrom , containsDataUntil ));
1136+ this .instance = ((T ) new Dataset (shortName , assessment , datasetStatus , datasetState , name , description , populationDescription , version , versionDescription , subjectField , keyword , spatialCoverageDescription , useRestriction , customType , id , owner , filePath , metadataCreatedDate , metadataCreatedBy , metadataLastUpdatedDate , metadataLastUpdatedBy , containsDataFrom , containsDataUntil ));
11761137 }
11771138 }
11781139
@@ -1243,16 +1204,11 @@ public Dataset.DatasetBuilderBase withSpatialCoverageDescription(List<Object> sp
12431204 return this ;
12441205 }
12451206
1246- public Dataset .DatasetBuilderBase withUseRestriction (Dataset . UseRestriction useRestriction ) {
1207+ public Dataset .DatasetBuilderBase withUseRestriction (List < UseRestriction > useRestriction ) {
12471208 ((Dataset ) this .instance ).useRestriction = useRestriction ;
12481209 return this ;
12491210 }
12501211
1251- public Dataset .DatasetBuilderBase withUseRestrictionDate (Date useRestrictionDate ) {
1252- ((Dataset ) this .instance ).useRestrictionDate = useRestrictionDate ;
1253- return this ;
1254- }
1255-
12561212 public Dataset .DatasetBuilderBase withCustomType (List <CustomType > customType ) {
12571213 ((Dataset ) this .instance ).customType = customType ;
12581214 return this ;
@@ -1409,52 +1365,4 @@ public static Dataset.DataSetStatus fromValue(String value) {
14091365
14101366 }
14111367
1412-
1413- /**
1414- * Use restriction
1415- * <p>
1416- * Data set use restriction
1417- *
1418- */
1419- @ Generated ("jsonschema2pojo" )
1420- public enum UseRestriction {
1421-
1422- DELETION_ANONYMIZATION ("DELETION_ANONYMIZATION" ),
1423- PROCESS_LIMITATIONS ("PROCESS_LIMITATIONS" ),
1424- SECONDARY_USE_RESTRICTIONS ("SECONDARY_USE_RESTRICTIONS" );
1425- private final String value ;
1426- private final static Map <String , Dataset .UseRestriction > CONSTANTS = new HashMap <String , Dataset .UseRestriction >();
1427-
1428- static {
1429- for (Dataset .UseRestriction c : values ()) {
1430- CONSTANTS .put (c .value , c );
1431- }
1432- }
1433-
1434- UseRestriction (String value ) {
1435- this .value = value ;
1436- }
1437-
1438- @ Override
1439- public String toString () {
1440- return this .value ;
1441- }
1442-
1443- @ JsonValue
1444- public String value () {
1445- return this .value ;
1446- }
1447-
1448- @ JsonCreator
1449- public static Dataset .UseRestriction fromValue (String value ) {
1450- Dataset .UseRestriction constant = CONSTANTS .get (value );
1451- if (constant == null ) {
1452- throw new IllegalArgumentException (value );
1453- } else {
1454- return constant ;
1455- }
1456- }
1457-
1458- }
1459-
14601368}
0 commit comments