All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.epos.eposdatamodel.Person Maven / Gradle / Ivy

There is a newer version: 2.5.21
Show newest version
package org.epos.eposdatamodel;

import model.RoleType;
import org.eclipse.persistence.internal.jpa.rs.metadata.model.Link;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * Human being.
 */
public class Person extends EPOSDataModelEntity {

    /**
     * This property contains the physical address of the Person.
     */
    private LinkedEntity address;

    /**
     * This property refers to the organization to which the person is
     * affiliated.
     */
    private List affiliation;

    /**
     * This property refers to the URL of the Person curriculum vitae.
     **/
    private String CVURL;

    /**
     * This property contains the email address of the Person.
     **/
    private List email;

    /**
     * This property contains the last name of the Person.
     **/
    private String familyName;

    /**
     * This property contains the first name of the Person.
     **/
    private String givenName;

    /**
     * This property contains an identifier for the Person (e.g., ORCID, ScopusID, etc.).
     **/

    private List identifier = new ArrayList<>();

    /**
     * This property contains the specific qualifications of the Person.
     **/
    private List qualifications;

    /**
     * This property contains the telephone number of the Person.
     **/
    private List telephone;

    public void addQualifications(String qualification) {
        if (this.qualifications == null) {
            ArrayList qualificationsList = new ArrayList<>();
            qualificationsList.add(qualification);
            this.setQualifications(qualificationsList);
        } else {
            this.qualifications.add(qualification);
        }
    }

    public void addEmail(String email) {
        if (this.email == null) {
            ArrayList emailList = new ArrayList<>();
            emailList.add(email);
            this.setEmail(emailList);
        } else {
            this.email.add(email);
        }
    }

    public void addTelephone(String telephone) {
        if (this.telephone == null) {
            ArrayList telephoneList = new ArrayList<>();
            telephoneList.add(telephone);
            this.setTelephone(telephoneList);
        } else {
            this.telephone.add(telephone);
        }
    }

    public void addAffiliation(LinkedEntity affiliation) {
        if (this.affiliation == null) {
            ArrayList affiliationList = new ArrayList<>();
            affiliationList.add(affiliation);
            this.setAffiliation(affiliationList);
        } else {
            this.getAffiliation().add(affiliation);
        }
    }

    public void addIdentifier(LinkedEntity identifier) {
        if (this.identifier == null) {
            ArrayList identifierList = new ArrayList<>();
            identifierList.add(identifier);
            this.setIdentifier(identifierList);
        } else {
            this.getIdentifier().add(identifier);
        }
    }


    public Person address(LinkedEntity address) {
        this.address = address;
        return this;
    }

    /**
     * Get address
     *
     * @return address
     **/

    public LinkedEntity getAddress() {
        return address;
    }

    public void setAddress(LinkedEntity address) {
        this.address = address;
    }


    public Person CVURL(String CVURL) {
        this.CVURL = CVURL;
        return this;
    }

    /**
     * This property refers to the URL of the Person curriculum vitae.
     *
     * @return CVURL
     **/

    public String getCVURL() {
        return CVURL;
    }

    public void setCVURL(String CVURL) {
        this.CVURL = CVURL;
    }

    public Person email(List email) {
        this.email = email;
        return this;
    }

    public Person addEmailItem(String emailItem) {
        if (this.email == null) {
            this.email = new ArrayList<>();
        }
        this.email.add(emailItem);
        return this;
    }

    /**
     * This property contains the email address of the Person.
     *
     * @return email
     **/

    public List getEmail() {
        return email;
    }

    public void setEmail(List email) {
        this.email = email;
    }

    public Person familyName(String familyName) {
        this.familyName = familyName;
        return this;
    }

    /**
     * This property contains the last name of the Person.
     *
     * @return familyName
     **/

    public String getFamilyName() {
        return familyName;
    }

    public void setFamilyName(String familyName) {
        this.familyName = familyName;
    }

    public Person givenName(String givenName) {
        this.givenName = givenName;
        return this;
    }

    /**
     * This property contains the first name of the Person.
     *
     * @return givenName
     **/

    public String getGivenName() {
        return givenName;
    }

    public void setGivenName(String givenName) {
        this.givenName = givenName;
    }

    public Person identifier(List identifier) {
        this.identifier = identifier;
        return this;
    }

    public Person addIdentifierItem(LinkedEntity identifierItem) {
        this.identifier.add(identifierItem);
        return this;
    }

    /**
     * This property contains an identifier for the Person (e.g., ORCID, ScopusID, etc.).
     *
     * @return identifier
     **/


    public List getIdentifier() {
        return identifier;
    }

    public void setIdentifier(List identifier) {
        this.identifier = identifier;
    }


    public Person qualifications(List qualifications) {
        this.qualifications = qualifications;
        return this;
    }

    public Person addQualificationsItem(String qualificationsItem) {
        if (this.qualifications == null) {
            this.qualifications = new ArrayList<>();
        }
        this.qualifications.add(qualificationsItem);
        return this;
    }

    /**
     * This property contains the specific qualifications of the Person.
     *
     * @return qualification
     **/

    public List getQualifications() {
        return qualifications;
    }

    public void setQualifications(List qualifications) {
        this.qualifications = qualifications;
    }

    public Person telephone(List telephone) {
        this.telephone = telephone;
        return this;
    }

    public Person addTelephoneItem(String telephoneItem) {
        if (this.telephone == null) {
            this.telephone = new ArrayList<>();
        }
        this.telephone.add(telephoneItem);
        return this;
    }

    /**
     * This property contains the telephone number of the Person.
     *
     * @return telephone
     **/

    public List getTelephone() {
        return telephone;
    }

    public void setTelephone(List telephone) {
        this.telephone = telephone;
    }

    public List getAffiliation() {
        return affiliation;
    }

    public void setAffiliation(List affiliation) {
        this.affiliation = affiliation;
    }
    @Override
    public String toString() {
        return "Person{" +
                "address=" + address +
                ", affiliation=" + affiliation +
                ", CVURL='" + CVURL + '\'' +
                ", email=" + email +
                ", familyName='" + familyName + '\'' +
                ", givenName='" + givenName + '\'' +
                ", identifier=" + identifier +
                ", qualifications=" + qualifications +
                ", telephone=" + telephone +
                "} " + super.toString();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        Person person = (Person) o;
        return Objects.equals(getAddress(), person.getAddress()) && Objects.equals(getAffiliation(), person.getAffiliation()) && Objects.equals(getCVURL(), person.getCVURL()) && Objects.equals(getEmail(), person.getEmail()) && Objects.equals(getFamilyName(), person.getFamilyName()) && Objects.equals(getGivenName(), person.getGivenName()) && Objects.equals(getIdentifier(), person.getIdentifier()) && Objects.equals(getQualifications(), person.getQualifications()) && Objects.equals(getTelephone(), person.getTelephone());
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), getAddress(), getAffiliation(), getCVURL(), getEmail(), getFamilyName(), getGivenName(), getIdentifier(), getQualifications(), getTelephone());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy