Package no.unit.nva.model
Class Contributor
- java.lang.Object
-
- no.unit.nva.model.Contributor
-
public class Contributor extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classContributor.Builder
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCORRESPONDING_AUTHOR_EMAIL_MISSING
-
Constructor Summary
Constructors Constructor Description Contributor(Identity identity, java.util.List<Organization> affiliations, Role role, java.lang.Integer sequence, boolean correspondingAuthor, java.lang.String email)Constructor designed to ensure valid data in the object, since we can only have a corresponding author with an email.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)java.util.List<Organization>getAffiliations()java.lang.StringgetEmail()IdentitygetIdentity()RolegetRole()java.lang.IntegergetSequence()inthashCode()booleanisCorrespondingAuthor()
-
-
-
Field Detail
-
CORRESPONDING_AUTHOR_EMAIL_MISSING
public static final java.lang.String CORRESPONDING_AUTHOR_EMAIL_MISSING
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Contributor
public Contributor(Identity identity, java.util.List<Organization> affiliations, Role role, java.lang.Integer sequence, boolean correspondingAuthor, java.lang.String email) throws MalformedContributorException
Constructor designed to ensure valid data in the object, since we can only have a corresponding author with an email.- Parameters:
identity- The identity of the contributoraffiliations- The affiliation of the contributorrole- The role that the contributor playedsequence- The order of the contributor in the contributors listingcorrespondingAuthor- Whether the contributor was a corresponding authoremail- Contact email for contributor, required if the contributor was a corresponding author- Throws:
MalformedContributorException- If the contributor is corresponding author, but no email is present
-
-
Method Detail
-
getIdentity
public Identity getIdentity()
-
getAffiliations
public java.util.List<Organization> getAffiliations()
-
getSequence
public java.lang.Integer getSequence()
-
getRole
public Role getRole()
-
isCorrespondingAuthor
public boolean isCorrespondingAuthor()
-
getEmail
public java.lang.String getEmail()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-