Removed @NonNull checks
This commit is contained in:
parent
de8e5c6397
commit
71de9fbe9b
|
@ -8,7 +8,13 @@ import lombok.NonNull;
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class Community {
|
public class Community {
|
||||||
|
|
||||||
@NonNull
|
// @NonNull
|
||||||
private String identifier;
|
private String identifier;
|
||||||
|
|
||||||
|
public Community(String identifier) {
|
||||||
|
super();
|
||||||
|
this.identifier = identifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ import lombok.ToString;
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@ToString
|
@ToString
|
||||||
@RequiredArgsConstructor
|
//@RequiredArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class Contributor extends Creator {
|
public class Contributor extends Creator {
|
||||||
|
|
||||||
|
@ -40,9 +40,11 @@ public class Contributor extends Creator {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@NonNull
|
// @NonNull
|
||||||
private Type type;
|
private Type type;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
|
@ -66,6 +68,12 @@ public class Contributor extends Creator {
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Contributor(Type type) {
|
||||||
|
super();
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,12 +7,18 @@ import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@RequiredArgsConstructor
|
//@RequiredArgsConstructor
|
||||||
public class Creator {
|
public class Creator {
|
||||||
|
|
||||||
@NonNull
|
// @NonNull
|
||||||
private String name;
|
private String name;
|
||||||
private String affiliation;
|
private String affiliation;
|
||||||
private String orcid;
|
private String orcid;
|
||||||
private String gnd;
|
private String gnd;
|
||||||
|
public Creator(String name) {
|
||||||
|
super();
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,8 +15,9 @@ public class DateInterval {
|
||||||
|
|
||||||
private Date start;
|
private Date start;
|
||||||
private Date end;
|
private Date end;
|
||||||
@NonNull
|
// @NonNull
|
||||||
private Type type;
|
private Type type;
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@RequiredArgsConstructor
|
//@RequiredArgsConstructor
|
||||||
public class DepositionMetadata {
|
public class DepositionMetadata {
|
||||||
|
|
||||||
public static enum UploadType{
|
public static enum UploadType{
|
||||||
|
@ -64,20 +64,20 @@ public class DepositionMetadata {
|
||||||
closed
|
closed
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
// @NonNull
|
||||||
private UploadType upload_type;
|
private UploadType upload_type;
|
||||||
private PublicationType publication_type;
|
private PublicationType publication_type;
|
||||||
private ImageType image_type;
|
private ImageType image_type;
|
||||||
@NonNull
|
// @NonNull
|
||||||
@JsonFormat(pattern = Commons.ISO_DATE_PATTERN)
|
@JsonFormat(pattern = Commons.ISO_DATE_PATTERN)
|
||||||
private Date publication_date;
|
private Date publication_date;
|
||||||
@NonNull
|
// @NonNull
|
||||||
private String title;
|
private String title;
|
||||||
@NonNull
|
// @NonNull
|
||||||
private List<Creator> creators;
|
private List<Creator> creators;
|
||||||
@NonNull
|
// @NonNull
|
||||||
private String description; // TODO HTML
|
private String description; // TODO HTML
|
||||||
@NonNull
|
// @NonNull
|
||||||
private AccessRights access_right;
|
private AccessRights access_right;
|
||||||
private String license; // TODO ENUM https://licenses.opendefinition.org/licenses/groups/all.json
|
private String license; // TODO ENUM https://licenses.opendefinition.org/licenses/groups/all.json
|
||||||
@JsonFormat(pattern = Commons.ISO_DATE_PATTERN)
|
@JsonFormat(pattern = Commons.ISO_DATE_PATTERN)
|
||||||
|
@ -117,4 +117,17 @@ public class DepositionMetadata {
|
||||||
private List<DateInterval> dates;
|
private List<DateInterval> dates;
|
||||||
private String method; //TODO html
|
private String method; //TODO html
|
||||||
|
|
||||||
|
public DepositionMetadata(UploadType upload_type, Date publication_date, String title, List<Creator> creators,
|
||||||
|
String description, AccessRights access_right) {
|
||||||
|
super();
|
||||||
|
this.upload_type = upload_type;
|
||||||
|
this.publication_date = publication_date;
|
||||||
|
this.title = title;
|
||||||
|
this.creators = creators;
|
||||||
|
this.description = description;
|
||||||
|
this.access_right = access_right;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,6 @@ import lombok.NonNull;
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class Grant {
|
public class Grant {
|
||||||
|
|
||||||
@NonNull
|
// @NonNull
|
||||||
private String id;
|
private String id;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ public class Location {
|
||||||
|
|
||||||
private Double lat;
|
private Double lat;
|
||||||
private Double lon;
|
private Double lon;
|
||||||
@NonNull
|
// @NonNull
|
||||||
private String place;
|
private String place;
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@RequiredArgsConstructor
|
//@RequiredArgsConstructor
|
||||||
public class RelatedIdentifier {
|
public class RelatedIdentifier {
|
||||||
|
|
||||||
public static enum Relation{
|
public static enum Relation{
|
||||||
|
@ -25,9 +25,16 @@ public class RelatedIdentifier {
|
||||||
isAlternateIdentifier
|
isAlternateIdentifier
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
// @NonNull
|
||||||
private String identifier;
|
private String identifier;
|
||||||
@NonNull
|
// @NonNull
|
||||||
private Relation relation;
|
private Relation relation;
|
||||||
|
public RelatedIdentifier(String identifier, Relation relation) {
|
||||||
|
super();
|
||||||
|
this.identifier = identifier;
|
||||||
|
this.relation = relation;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,10 +8,17 @@ import lombok.NonNull;
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class Subject {
|
public class Subject {
|
||||||
|
|
||||||
@NonNull
|
// @NonNull
|
||||||
private String term;
|
private String term;
|
||||||
@NonNull
|
// @NonNull
|
||||||
private String identifier;
|
private String identifier;
|
||||||
private String scheme;
|
private String scheme;
|
||||||
|
public Subject(String term, String identifier) {
|
||||||
|
super();
|
||||||
|
this.term = term;
|
||||||
|
this.identifier = identifier;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue