/**
* =============================================================================
*
* ORCID (R) Open Source
* http://orcid.org
*
* Copyright (c) 2012-2014 ORCID, Inc.
* Licensed under an MIT-Style License (MIT)
* http://orcid.org/open-source-license
*
* This copyright and license information (including a link to the full license)
* shall be included in its entirety in all copies or substantial portion of
* the software.
*
* =============================================================================
*/
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2013.12.05 at 03:27:53 PM GMT
//
package org.orcid.jaxb.model.record_rc4;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.orcid.jaxb.model.common_rc4.CreatedDate;
import org.orcid.jaxb.model.common_rc4.Filterable;
import org.orcid.jaxb.model.common_rc4.FuzzyDate;
import org.orcid.jaxb.model.common_rc4.LastModifiedDate;
import org.orcid.jaxb.model.common_rc4.Organization;
import org.orcid.jaxb.model.common_rc4.OrganizationHolder;
import org.orcid.jaxb.model.common_rc4.Source;
import org.orcid.jaxb.model.common_rc4.Visibility;
import io.swagger.annotations.ApiModelProperty;
/**
* <p>
* Java class for anonymous complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(propOrder = { "createdDate", "lastModifiedDate", "source", "putCode", "path", "departmentName", "roleTitle", "startDate", "endDate", "organization" })
@XmlRootElement(name = "employment", namespace = "http://www.orcid.org/ns/employment")
public class Employment implements Serializable, Filterable, Activity, OrganizationHolder, SourceAware {
private final static long serialVersionUID = 1L;
@XmlElement(namespace = "http://www.orcid.org/ns/employment", name = "department-name")
protected String departmentName;
@XmlElement(namespace = "http://www.orcid.org/ns/employment", name = "role-title")
protected String roleTitle;
@XmlElement(namespace = "http://www.orcid.org/ns/common", name = "start-date")
protected FuzzyDate startDate;
@XmlElement(namespace = "http://www.orcid.org/ns/common", name = "end-date")
protected FuzzyDate endDate;
@XmlElement(namespace = "http://www.orcid.org/ns/employment", required = true)
protected Organization organization;
@XmlElement(namespace = "http://www.orcid.org/ns/common")
protected Source source;
@XmlElement(namespace = "http://www.orcid.org/ns/common", name = "last-modified-date")
protected LastModifiedDate lastModifiedDate;
@XmlElement(namespace = "http://www.orcid.org/ns/common", name = "created-date")
protected CreatedDate createdDate;
@XmlAttribute(name = "put-code")
@ApiModelProperty(hidden = true)
protected Long putCode;
@XmlAttribute(name = "path")
protected String path;
@XmlAttribute
protected Visibility visibility;
/**
* Gets the value of the departmentName property.
*
* @return possible object is {@link String }
*
*/
public String getDepartmentName() {
return departmentName;
}
/**
* Sets the value of the departmentName property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setDepartmentName(String value) {
this.departmentName = value;
}
/**
* Gets the value of the roleTitle property.
*
* @return possible object is {@link String }
*
*/
public String getRoleTitle() {
return roleTitle;
}
/**
* Sets the value of the roleTitle property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setRoleTitle(String value) {
this.roleTitle = value;
}
/**
* Gets the value of the startDate property.
*
* @return possible object is {@link FuzzyDate }
*
*/
public FuzzyDate getStartDate() {
return startDate;
}
/**
* Sets the value of the startDate property.
*
* @param value
* allowed object is {@link FuzzyDate }
*
*/
public void setStartDate(FuzzyDate value) {
this.startDate = value;
}
/**
* Gets the value of the endDate property.
*
* @return possible object is {@link FuzzyDate }
*
*/
public FuzzyDate getEndDate() {
return endDate;
}
/**
* Sets the value of the endDate property.
*
* @param value
* allowed object is {@link FuzzyDate }
*
*/
public void setEndDate(FuzzyDate value) {
this.endDate = value;
}
/**
* Gets the value of the organization property.
*
* @return possible object is {@link Organization }
*
*/
public Organization getOrganization() {
return organization;
}
/**
* Sets the value of the organization property.
*
* @param value
* allowed object is {@link Organization }
*
*/
public void setOrganization(Organization value) {
this.organization = value;
}
/**
* Gets the value of the source property.
*
* @return possible object is {@link Source }
*
*/
public Source getSource() {
return source;
}
/**
* Sets the value of the source property.
*
* @param value
* allowed object is {@link Source }
*
*/
public void setSource(Source value) {
this.source = value;
}
/**
* Gets the value of the visibility property.
*
* @return possible object is {@link Visibility }
*
*/
public Visibility getVisibility() {
return visibility;
}
/**
* Sets the value of the visibility property.
*
* @param value
* allowed object is {@link Visibility }
*
*/
public void setVisibility(Visibility value) {
this.visibility = value;
}
/**
* Gets the value of the putCode property.
*
* @return possible object is {@link String }
*
*/
public Long getPutCode() {
return putCode;
}
/**
* Sets the value of the putCode property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setPutCode(Long value) {
this.putCode = value;
}
/**
* Gets the value of the path property.
*
* @return possible object is {@link Object }
*
*/
public String getPath() {
return path;
}
/**
* Sets the value of the path property.
*
* @param path
* allowed object is {@link Object }
*
*/
public void setPath(String path) {
this.path = path;
}
@Override
public String retrieveSourcePath() {
if (source == null) {
return null;
}
return source.retrieveSourcePath();
}
@Override
public CreatedDate getCreatedDate() {
return createdDate;
}
@Override
public void setCreatedDate(CreatedDate value) {
createdDate = value;
}
@Override
public LastModifiedDate getLastModifiedDate() {
return lastModifiedDate;
}
@Override
public void setLastModifiedDate(LastModifiedDate value) {
lastModifiedDate = value;
}
/**
*
* Note that put-code is not part of hashCode or equals! This is to allow
* better de-duplication.
*
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((departmentName == null) ? 0 : departmentName.hashCode());
result = prime * result + ((endDate == null) ? 0 : endDate.hashCode());
result = prime * result + ((organization == null) ? 0 : organization.hashCode());
result = prime * result + ((roleTitle == null) ? 0 : roleTitle.hashCode());
result = prime * result + ((source == null) ? 0 : source.hashCode());
result = prime * result + ((startDate == null) ? 0 : startDate.hashCode());
result = prime * result + ((visibility == null) ? 0 : visibility.hashCode());
return result;
}
/**
*
* Note that put-code is not part of hashCode or equals! This is to allow
* better de-duplication.
*
*/
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Employment other = (Employment) obj;
if (departmentName == null) {
if (other.departmentName != null)
return false;
} else if (!departmentName.equals(other.departmentName))
return false;
if (endDate == null) {
if (other.endDate != null)
return false;
} else if (!endDate.equals(other.endDate))
return false;
if (organization == null) {
if (other.organization != null)
return false;
} else if (!organization.equals(other.organization))
return false;
if (roleTitle == null) {
if (other.roleTitle != null)
return false;
} else if (!roleTitle.equals(other.roleTitle))
return false;
if (source == null) {
if (other.source != null)
return false;
} else if (!source.equals(other.source))
return false;
if (startDate == null) {
if (other.startDate != null)
return false;
} else if (!startDate.equals(other.startDate))
return false;
if (visibility != other.visibility)
return false;
/*
* Breaks our deduping if (lastModifiedDate != other.lastModifiedDate)
* return false; if (createdDate != other.createdDate) return false;
*/
return true;
}
}