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